source: BOOK/schema/docbook/4.5/rng/htmltblx.rnc@ a624ab5

sysvinit
Last change on this file since a624ab5 was da28cc3, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Validate the book against relax-ng instead of the
standard DTD.

  • Property mode set to 100644
File size: 7.4 KB
Line 
1# ......................................................................
2
3# DocBook XML HTML Table Module V4.5 ...................................
4
5# File htmltblx.mod ....................................................
6
7# Copyright 2003-2006 ArborText, Inc., Norman Walsh, Sun Microsystems,
8# Inc., and the Organization for the Advancement of Structured Information
9# Standards (OASIS).
10#
11# $Id: htmltblx.mod 6340 2006-10-03 13:23:24Z nwalsh $
12#
13# Permission to use, copy, modify and distribute the DocBook XML DTD
14# and its accompanying documentation for any purpose and without fee
15# is hereby granted in perpetuity, provided that the above copyright
16# notice and this paragraph appear in all copies. The copyright
17# holders make no representation about the suitability of the DTD for
18# any purpose. It is provided "as is" without expressed or implied
19# warranty.
20#
21# If you modify the DocBook XML DTD in any way, except for declaring and
22# referencing additional sets of general entities and declaring
23# additional notations, label your DTD as a variant of DocBook. See
24# the maintenance documentation for more information.
25#
26# Please direct all questions, bug reports, or suggestions for
27# changes to the docbook@lists.oasis-open.org mailing list. For more
28# information, see http://www.oasis-open.org/docbook/.
29
30# ......................................................................
31
32# This module contains the definitions for elements that are
33# isomorphic to the HTML elements. One could argue we should
34# instead have based ourselves on the XHTML Table Module, but the
35# HTML one is more like what browsers are likely to accept today
36# and users are likely to use.
37#
38# This module has been developed for use with the DocBook V4.5
39# "union table model" in which elements and attlists common to both
40# models are defined (as the union) in the CALS table module by
41# setting various parameter entities appropriately in this file.
42#
43# In DTD driver files referring to this module, please use an entity
44# declaration that uses the public identifier shown below:
45#
46# <!ENTITY % htmltbl PUBLIC
47# "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN"
48# "htmltblx.mod">
49# %htmltbl;
50#
51# See the documentation for detailed information on the parameter
52# entity and module scheme used in DocBook, customizing DocBook and
53# planning for interchange, and changes made since the last release
54# of DocBook.
55
56# ======================= XHTML Tables =======================================
57
58namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
59
60html.coreattrs =
61 common.attrib,
62 attribute class { text }?,
63 attribute style { text }?,
64 attribute title { text }?
65# Does not contain lang or dir because they are in %common.attribs
66i18n = attribute xml:lang { xsd:NMTOKEN }?
67events =
68 attribute onclick { text }?,
69 attribute ondblclick { text }?,
70 attribute onmousedown { text }?,
71 attribute onmouseup { text }?,
72 attribute onmouseover { text }?,
73 attribute onmousemove { text }?,
74 attribute onmouseout { text }?,
75 attribute onkeypress { text }?,
76 attribute onkeydown { text }?,
77 attribute onkeyup { text }?
78attrs = html.coreattrs, i18n, events
79cellhalign =
80 attribute align { "left" | "center" | "right" | "justify" | "char" }?,
81 attribute char { text }?,
82 attribute charoff { text }?
83cellvalign =
84 attribute valign { "top" | "middle" | "bottom" | "baseline" }?
85# doc:A group of columns in an HTML table.
86colgroup = element colgroup { colgroup.attlist, col* }
87# doc:Specifications for a column in an HTML table.
88col = element col { col.attlist, empty }
89# doc:A row in an HTML table.
90tr = element tr { tr.attlist, (th | td)+ }
91# doc:A table header entry in an HTML table.
92th =
93 element th {
94 th.attlist, (para.char.mix | tabentry.mix | table | informaltable)*
95 }
96# doc:A table ntry in an HTML table.
97td =
98 element td {
99 td.attlist, (para.char.mix | tabentry.mix | table | informaltable)*
100 }
101colgroup.attlist &=
102 attrs,
103 [ a:defaultValue = "1" ] attribute span { text }?,
104 attribute width { text }?,
105 cellhalign,
106 cellvalign
107col.attlist &=
108 attrs,
109 [ a:defaultValue = "1" ] attribute span { text }?,
110 attribute width { text }?,
111 cellhalign,
112 cellvalign
113tr.attlist &=
114 attrs,
115 cellhalign,
116 cellvalign,
117 attribute bgcolor { text }?
118th.attlist &=
119 attrs,
120 attribute abbr { text }?,
121 attribute axis { text }?,
122 attribute headers { xsd:IDREFS }?,
123 attribute scope { "row" | "col" | "rowgroup" | "colgroup" }?,
124 [ a:defaultValue = "1" ] attribute rowspan { text }?,
125 [ a:defaultValue = "1" ] attribute colspan { text }?,
126 cellhalign,
127 cellvalign,
128 attribute nowrap { "nowrap" }?,
129 attribute bgcolor { text }?,
130 attribute width { text }?,
131 attribute height { text }?
132td.attlist &=
133 attrs,
134 attribute abbr { text }?,
135 attribute axis { text }?,
136 attribute headers { xsd:IDREFS }?,
137 attribute scope { "row" | "col" | "rowgroup" | "colgroup" }?,
138 [ a:defaultValue = "1" ] attribute rowspan { text }?,
139 [ a:defaultValue = "1" ] attribute colspan { text }?,
140 cellhalign,
141 cellvalign,
142 attribute nowrap { "nowrap" }?,
143 attribute bgcolor { text }?,
144 attribute width { text }?,
145 attribute height { text }?
146# ======================================================
147
148# Set up to read in the CALS model configured to
149# merge with the XHTML table model
150
151# ======================================================
152tables.role.attrib = role.attrib
153# Add label and role attributes to table and informaltable
154bodyatt =
155 attribute floatstyle { text }?,
156 attribute rowheader { "firstcol" | "norowheader" }?,
157 label.attrib
158# Add common attributes to Table, TGroup, TBody, THead, TFoot, Row,
159# EntryTbl, and Entry (and InformalTable element).
160secur =
161 common.attrib,
162 attribute class { text }?,
163 attribute style { text }?,
164 attribute title { text }?,
165 i18n,
166 events,
167 tables.role.attrib
168common.table.attribs = bodyatt, secur
169# Content model for Table (that also allows HTML tables)
170tbl.table.mdl =
171 (blockinfo?,
172 formalobject.title.content,
173 ndxterm.class*,
174 textobject*,
175 (graphic+ | mediaobject+ | tgroup+))
176 | (caption, (col* | colgroup*), thead?, tfoot?, (tbody+ | tr+))
177informal.tbl.table.mdl =
178 (textobject*, (graphic+ | mediaobject+ | tgroup+))
179 | ((col* | colgroup*), thead?, tfoot?, (tbody+ | tr+))
180# Attributes for Table (including HTML ones)
181
182# N.B. rules = (none | groups | rows | cols | all) but it can't be spec'd
183
184# that way because 'all' already occurs in a different enumeration in
185
186# CALS tables (frame).
187tbl.table.att =
188 attribute tabstyle { text }?,
189 attribute tocentry { yesorno.attvals }?,
190 attribute shortentry { yesorno.attvals }?,
191 attribute orient { "port" | "land" }?,
192 attribute pgwide { yesorno.attvals }?,
193 attribute summary { text }?,
194 attribute width { text }?,
195 attribute border { text }?,
196 attribute rules { text }?,
197 attribute cellspacing { text }?,
198 attribute cellpadding { text }?,
199 attribute align { "left" | "center" | "right" }?,
200 attribute bgcolor { text }?
201tbl.frame.attval =
202 "void"
203 | "above"
204 | "below"
205 | "hsides"
206 | "lhs"
207 | "rhs"
208 | "vsides"
209 | "box"
210 | "border"
211 | "top"
212 | "bottom"
213 | "topbot"
214 | "all"
215 | "sides"
216 | "none"
217# Allow either objects or inlines; beware of REs between elements.
218tbl.entry.mdl = para.char.mix | tabentry.mix
219# thead, tfoot, and tbody are defined in both table models,
220# so we set up parameter entities to define union models for them
221tbl.hdft.mdl = tr+ | (colspec*, row+)
222tbl.tbody.mdl = tr+ | row+
223# End of DocBook XML HTML Table Module V4.5 ............................
224
225# ......................................................................
Note: See TracBrowser for help on using the repository browser.