source: BOOK/schema/clfs/0.1/rng/htmltblx.rng@ 88ef769

Last change on this file since 88ef769 was 4fe47e3, checked in by Joe Ciccone <jciccone@…>, 14 years ago

Add the initial changes for a new xml format for the packages part
of the book. This is still preliminary and currently is pretty
broken, more to come in the future as bugs get squashed.

  • Property mode set to 100644
File size: 15.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- ...................................................................... -->
3<!-- DocBook XML HTML Table Module V4.5 ................................... -->
4<!-- File htmltblx.mod .................................................... -->
5<!--
6 Copyright 2003-2006 ArborText, Inc., Norman Walsh, Sun Microsystems,
7 Inc., and the Organization for the Advancement of Structured Information
8 Standards (OASIS).
9
10 $Id: htmltblx.mod 6340 2006-10-03 13:23:24Z nwalsh $
11
12 Permission to use, copy, modify and distribute the DocBook XML DTD
13 and its accompanying documentation for any purpose and without fee
14 is hereby granted in perpetuity, provided that the above copyright
15 notice and this paragraph appear in all copies. The copyright
16 holders make no representation about the suitability of the DTD for
17 any purpose. It is provided "as is" without expressed or implied
18 warranty.
19
20 If you modify the DocBook XML DTD in any way, except for declaring and
21 referencing additional sets of general entities and declaring
22 additional notations, label your DTD as a variant of DocBook. See
23 the maintenance documentation for more information.
24
25 Please direct all questions, bug reports, or suggestions for
26 changes to the docbook@lists.oasis-open.org mailing list. For more
27 information, see http://www.oasis-open.org/docbook/.
28-->
29<!-- ...................................................................... -->
30<!--
31 This module contains the definitions for elements that are
32 isomorphic to the HTML elements. One could argue we should
33 instead have based ourselves on the XHTML Table Module, but the
34 HTML one is more like what browsers are likely to accept today
35 and users are likely to use.
36
37 This module has been developed for use with the DocBook V4.5
38 "union table model" in which elements and attlists common to both
39 models are defined (as the union) in the CALS table module by
40 setting various parameter entities appropriately in this file.
41
42 In DTD driver files referring to this module, please use an entity
43 declaration that uses the public identifier shown below:
44
45 <!ENTITY % htmltbl PUBLIC
46 "-//OASIS//ELEMENTS DocBook XML HTML Tables V4.5//EN"
47 "htmltblx.mod">
48 %htmltbl;
49
50 See the documentation for detailed information on the parameter
51 entity and module scheme used in DocBook, customizing DocBook and
52 planning for interchange, and changes made since the last release
53 of DocBook.
54-->
55<!-- ======================= XHTML Tables ======================================= -->
56<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
57 <define name="html.coreattrs">
58 <ref name="common.attrib"/>
59 <optional>
60 <attribute name="class"/>
61 </optional>
62 <optional>
63 <attribute name="style"/>
64 </optional>
65 <optional>
66 <attribute name="title"/>
67 </optional>
68 </define>
69 <!-- Does not contain lang or dir because they are in %common.attribs -->
70 <define name="i18n">
71 <optional>
72 <attribute name="xml:lang">
73 <data type="NMTOKEN"/>
74 </attribute>
75 </optional>
76 </define>
77 <define name="events">
78 <optional>
79 <attribute name="onclick"/>
80 </optional>
81 <optional>
82 <attribute name="ondblclick"/>
83 </optional>
84 <optional>
85 <attribute name="onmousedown"/>
86 </optional>
87 <optional>
88 <attribute name="onmouseup"/>
89 </optional>
90 <optional>
91 <attribute name="onmouseover"/>
92 </optional>
93 <optional>
94 <attribute name="onmousemove"/>
95 </optional>
96 <optional>
97 <attribute name="onmouseout"/>
98 </optional>
99 <optional>
100 <attribute name="onkeypress"/>
101 </optional>
102 <optional>
103 <attribute name="onkeydown"/>
104 </optional>
105 <optional>
106 <attribute name="onkeyup"/>
107 </optional>
108 </define>
109 <define name="attrs">
110 <ref name="html.coreattrs"/>
111 <ref name="i18n"/>
112 <ref name="events"/>
113 </define>
114 <define name="cellhalign">
115 <optional>
116 <attribute name="align">
117 <choice>
118 <value>left</value>
119 <value>center</value>
120 <value>right</value>
121 <value>justify</value>
122 <value>char</value>
123 </choice>
124 </attribute>
125 </optional>
126 <optional>
127 <attribute name="char"/>
128 </optional>
129 <optional>
130 <attribute name="charoff"/>
131 </optional>
132 </define>
133 <define name="cellvalign">
134 <optional>
135 <attribute name="valign">
136 <choice>
137 <value>top</value>
138 <value>middle</value>
139 <value>bottom</value>
140 <value>baseline</value>
141 </choice>
142 </attribute>
143 </optional>
144 </define>
145 <!-- doc:A group of columns in an HTML table. -->
146 <define name="colgroup">
147 <element name="colgroup">
148 <ref name="colgroup.attlist"/>
149 <zeroOrMore>
150 <ref name="col"/>
151 </zeroOrMore>
152 </element>
153 </define>
154 <!-- doc:Specifications for a column in an HTML table. -->
155 <define name="col">
156 <element name="col">
157 <ref name="col.attlist"/>
158 <empty/>
159 </element>
160 </define>
161 <!-- doc:A row in an HTML table. -->
162 <define name="tr">
163 <element name="tr">
164 <ref name="tr.attlist"/>
165 <oneOrMore>
166 <choice>
167 <ref name="th"/>
168 <ref name="td"/>
169 </choice>
170 </oneOrMore>
171 </element>
172 </define>
173 <!-- doc:A table header entry in an HTML table. -->
174 <define name="th">
175 <element name="th">
176 <ref name="th.attlist"/>
177 <zeroOrMore>
178 <choice>
179 <ref name="para.char.mix"/>
180 <ref name="tabentry.mix"/>
181 <ref name="table"/>
182 <ref name="informaltable"/>
183 </choice>
184 </zeroOrMore>
185 </element>
186 </define>
187 <!-- doc:A table ntry in an HTML table. -->
188 <define name="td">
189 <element name="td">
190 <ref name="td.attlist"/>
191 <zeroOrMore>
192 <choice>
193 <ref name="para.char.mix"/>
194 <ref name="tabentry.mix"/>
195 <ref name="table"/>
196 <ref name="informaltable"/>
197 </choice>
198 </zeroOrMore>
199 </element>
200 </define>
201 <define name="colgroup.attlist" combine="interleave">
202 <ref name="attrs"/>
203 <optional>
204 <attribute name="span" a:defaultValue="1"/>
205 </optional>
206 <optional>
207 <attribute name="width"/>
208 </optional>
209 <ref name="cellhalign"/>
210 <ref name="cellvalign"/>
211 </define>
212 <define name="col.attlist" combine="interleave">
213 <ref name="attrs"/>
214 <optional>
215 <attribute name="span" a:defaultValue="1"/>
216 </optional>
217 <optional>
218 <attribute name="width"/>
219 </optional>
220 <ref name="cellhalign"/>
221 <ref name="cellvalign"/>
222 </define>
223 <define name="tr.attlist" combine="interleave">
224 <ref name="attrs"/>
225 <ref name="cellhalign"/>
226 <ref name="cellvalign"/>
227 <optional>
228 <attribute name="bgcolor"/>
229 </optional>
230 </define>
231 <define name="th.attlist" combine="interleave">
232 <ref name="attrs"/>
233 <optional>
234 <attribute name="abbr"/>
235 </optional>
236 <optional>
237 <attribute name="axis"/>
238 </optional>
239 <optional>
240 <attribute name="headers">
241 <data type="IDREFS"/>
242 </attribute>
243 </optional>
244 <optional>
245 <attribute name="scope">
246 <choice>
247 <value>row</value>
248 <value>col</value>
249 <value>rowgroup</value>
250 <value>colgroup</value>
251 </choice>
252 </attribute>
253 </optional>
254 <optional>
255 <attribute name="rowspan" a:defaultValue="1"/>
256 </optional>
257 <optional>
258 <attribute name="colspan" a:defaultValue="1"/>
259 </optional>
260 <ref name="cellhalign"/>
261 <ref name="cellvalign"/>
262 <optional>
263 <attribute name="nowrap">
264 <value>nowrap</value>
265 </attribute>
266 </optional>
267 <optional>
268 <attribute name="bgcolor"/>
269 </optional>
270 <optional>
271 <attribute name="width"/>
272 </optional>
273 <optional>
274 <attribute name="height"/>
275 </optional>
276 </define>
277 <define name="td.attlist" combine="interleave">
278 <ref name="attrs"/>
279 <optional>
280 <attribute name="abbr"/>
281 </optional>
282 <optional>
283 <attribute name="axis"/>
284 </optional>
285 <optional>
286 <attribute name="headers">
287 <data type="IDREFS"/>
288 </attribute>
289 </optional>
290 <optional>
291 <attribute name="scope">
292 <choice>
293 <value>row</value>
294 <value>col</value>
295 <value>rowgroup</value>
296 <value>colgroup</value>
297 </choice>
298 </attribute>
299 </optional>
300 <optional>
301 <attribute name="rowspan" a:defaultValue="1"/>
302 </optional>
303 <optional>
304 <attribute name="colspan" a:defaultValue="1"/>
305 </optional>
306 <ref name="cellhalign"/>
307 <ref name="cellvalign"/>
308 <optional>
309 <attribute name="nowrap">
310 <value>nowrap</value>
311 </attribute>
312 </optional>
313 <optional>
314 <attribute name="bgcolor"/>
315 </optional>
316 <optional>
317 <attribute name="width"/>
318 </optional>
319 <optional>
320 <attribute name="height"/>
321 </optional>
322 </define>
323 <!-- ====================================================== -->
324 <!--
325 Set up to read in the CALS model configured to
326 merge with the XHTML table model
327 -->
328 <!-- ====================================================== -->
329 <define name="tables.role.attrib">
330 <ref name="role.attrib"/>
331 </define>
332 <!-- Add label and role attributes to table and informaltable -->
333 <define name="bodyatt">
334 <optional>
335 <attribute name="floatstyle"/>
336 </optional>
337 <optional>
338 <attribute name="rowheader">
339 <choice>
340 <value>firstcol</value>
341 <value>norowheader</value>
342 </choice>
343 </attribute>
344 </optional>
345 <ref name="label.attrib"/>
346 </define>
347 <!--
348 Add common attributes to Table, TGroup, TBody, THead, TFoot, Row,
349 EntryTbl, and Entry (and InformalTable element).
350 -->
351 <define name="secur">
352 <ref name="common.attrib"/>
353 <optional>
354 <attribute name="class"/>
355 </optional>
356 <optional>
357 <attribute name="style"/>
358 </optional>
359 <optional>
360 <attribute name="title"/>
361 </optional>
362 <ref name="i18n"/>
363 <ref name="events"/>
364 <ref name="tables.role.attrib"/>
365 </define>
366 <define name="common.table.attribs">
367 <ref name="bodyatt"/>
368 <ref name="secur"/>
369 </define>
370 <!-- Content model for Table (that also allows HTML tables) -->
371 <define name="tbl.table.mdl">
372 <choice>
373 <group>
374 <optional>
375 <ref name="blockinfo"/>
376 </optional>
377 <ref name="formalobject.title.content"/>
378 <zeroOrMore>
379 <ref name="ndxterm.class"/>
380 </zeroOrMore>
381 <zeroOrMore>
382 <ref name="textobject"/>
383 </zeroOrMore>
384 <choice>
385 <oneOrMore>
386 <ref name="graphic"/>
387 </oneOrMore>
388 <oneOrMore>
389 <ref name="mediaobject"/>
390 </oneOrMore>
391 <oneOrMore>
392 <ref name="tgroup"/>
393 </oneOrMore>
394 </choice>
395 </group>
396 <group>
397 <ref name="caption"/>
398 <choice>
399 <zeroOrMore>
400 <ref name="col"/>
401 </zeroOrMore>
402 <zeroOrMore>
403 <ref name="colgroup"/>
404 </zeroOrMore>
405 </choice>
406 <optional>
407 <ref name="thead"/>
408 </optional>
409 <optional>
410 <ref name="tfoot"/>
411 </optional>
412 <choice>
413 <oneOrMore>
414 <ref name="tbody"/>
415 </oneOrMore>
416 <oneOrMore>
417 <ref name="tr"/>
418 </oneOrMore>
419 </choice>
420 </group>
421 </choice>
422 </define>
423 <define name="informal.tbl.table.mdl">
424 <choice>
425 <group>
426 <zeroOrMore>
427 <ref name="textobject"/>
428 </zeroOrMore>
429 <choice>
430 <oneOrMore>
431 <ref name="graphic"/>
432 </oneOrMore>
433 <oneOrMore>
434 <ref name="mediaobject"/>
435 </oneOrMore>
436 <oneOrMore>
437 <ref name="tgroup"/>
438 </oneOrMore>
439 </choice>
440 </group>
441 <group>
442 <choice>
443 <zeroOrMore>
444 <ref name="col"/>
445 </zeroOrMore>
446 <zeroOrMore>
447 <ref name="colgroup"/>
448 </zeroOrMore>
449 </choice>
450 <optional>
451 <ref name="thead"/>
452 </optional>
453 <optional>
454 <ref name="tfoot"/>
455 </optional>
456 <choice>
457 <oneOrMore>
458 <ref name="tbody"/>
459 </oneOrMore>
460 <oneOrMore>
461 <ref name="tr"/>
462 </oneOrMore>
463 </choice>
464 </group>
465 </choice>
466 </define>
467 <!-- Attributes for Table (including HTML ones) -->
468 <!-- N.B. rules = (none | groups | rows | cols | all) but it can't be spec'd -->
469 <!-- that way because 'all' already occurs in a different enumeration in -->
470 <!-- CALS tables (frame). -->
471 <define name="tbl.table.att">
472 <optional>
473 <attribute name="tabstyle"/>
474 </optional>
475 <optional>
476 <attribute name="tocentry">
477 <ref name="yesorno.attvals"/>
478 </attribute>
479 </optional>
480 <optional>
481 <attribute name="shortentry">
482 <ref name="yesorno.attvals"/>
483 </attribute>
484 </optional>
485 <optional>
486 <attribute name="orient">
487 <choice>
488 <value>port</value>
489 <value>land</value>
490 </choice>
491 </attribute>
492 </optional>
493 <optional>
494 <attribute name="pgwide">
495 <ref name="yesorno.attvals"/>
496 </attribute>
497 </optional>
498 <optional>
499 <attribute name="summary"/>
500 </optional>
501 <optional>
502 <attribute name="width"/>
503 </optional>
504 <optional>
505 <attribute name="border"/>
506 </optional>
507 <optional>
508 <attribute name="rules"/>
509 </optional>
510 <optional>
511 <attribute name="cellspacing"/>
512 </optional>
513 <optional>
514 <attribute name="cellpadding"/>
515 </optional>
516 <optional>
517 <attribute name="align">
518 <choice>
519 <value>left</value>
520 <value>center</value>
521 <value>right</value>
522 </choice>
523 </attribute>
524 </optional>
525 <optional>
526 <attribute name="bgcolor"/>
527 </optional>
528 </define>
529 <define name="tbl.frame.attval">
530 <choice>
531 <value>void</value>
532 <value>above</value>
533 <value>below</value>
534 <value>hsides</value>
535 <value>lhs</value>
536 <value>rhs</value>
537 <value>vsides</value>
538 <value>box</value>
539 <value>border</value>
540 <value>top</value>
541 <value>bottom</value>
542 <value>topbot</value>
543 <value>all</value>
544 <value>sides</value>
545 <value>none</value>
546 </choice>
547 </define>
548 <!-- Allow either objects or inlines; beware of REs between elements. -->
549 <define name="tbl.entry.mdl">
550 <choice>
551 <ref name="para.char.mix"/>
552 <ref name="tabentry.mix"/>
553 </choice>
554 </define>
555 <!--
556 thead, tfoot, and tbody are defined in both table models,
557 so we set up parameter entities to define union models for them
558 -->
559 <define name="tbl.hdft.mdl">
560 <choice>
561 <oneOrMore>
562 <ref name="tr"/>
563 </oneOrMore>
564 <group>
565 <zeroOrMore>
566 <ref name="colspec"/>
567 </zeroOrMore>
568 <oneOrMore>
569 <ref name="row"/>
570 </oneOrMore>
571 </group>
572 </choice>
573 </define>
574 <define name="tbl.tbody.mdl">
575 <choice>
576 <oneOrMore>
577 <ref name="tr"/>
578 </oneOrMore>
579 <oneOrMore>
580 <ref name="row"/>
581 </oneOrMore>
582 </choice>
583 </define>
584</grammar>
585<!-- End of DocBook XML HTML Table Module V4.5 ............................ -->
586<!-- ...................................................................... -->
Note: See TracBrowser for help on using the repository browser.