summaryrefslogtreecommitdiff
path: root/slides/schema/relaxng/htmltbl.rng
blob: c2fc3b1812f0444c4946f9c0a8926566c7e31d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
<?xml version="1.0" encoding="UTF-8"?>
<!--
  This file is part of DocBook V5.0
  
  Copyright 1992-2008 HaL Computer Systems, Inc.,
  O'Reilly & Associates, Inc., ArborText, Inc., Fujitsu Software
  Corporation, Norman Walsh, Sun Microsystems, Inc., and the
  Organization for the Advancement of Structured Information
  Standards (OASIS).
  
  Release: $Id: htmltbl.rnc 8931 2010-10-20 13:29:20Z nwalsh $
  
  Permission to use, copy, modify and distribute the DocBook schema
  and its accompanying documentation for any purpose and without fee
  is hereby granted in perpetuity, provided that the above copyright
  notice and this paragraph appear in all copies. The copyright
  holders make no representation about the suitability of the schema
  for any purpose. It is provided "as is" without expressed or implied
  warranty.
  
  If you modify the DocBook schema in any way, label your schema as a
  variant of DocBook. See the reference documentation
  (http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook)
  for more information.
  
  Please direct all questions, bug reports, or suggestions for changes
  to the docbook@lists.oasis-open.org mailing list. For more
  information, see http://www.oasis-open.org/docbook/.
  
  ======================================================================
-->
<grammar ns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:ctrl="http://nwalsh.com/xmlns/schema-control/" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <define name="db.table.choice" combine="choice">
    <ref name="db.html.table"/>
  </define>
  <define name="db.informaltable.choice" combine="choice">
    <ref name="db.html.informaltable"/>
  </define>
  <define name="db.html.coreattrs">
    <interleave>
      <optional>
        <attribute name="class">
          <db:refpurpose>This attribute assigns a class name or set of class names to an element. Any number of elements may be assigned the same class name or names. Multiple class names must be separated by white space characters.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="style">
          <db:refpurpose>This attribute specifies style information for the current element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="title">
          <db:refpurpose>This attribute offers advisory information about the element for which it is set.</db:refpurpose>
        </attribute>
      </optional>
    </interleave>
  </define>
  <!-- dir isn't listed here because it's already a common attribute -->
  <define name="db.html.i18n">
    <optional>
      <attribute name="lang">
        <db:refpurpose>This attribute specifies the base language of an element's attribute values and text content. The default value of this attribute is unknown.</db:refpurpose>
      </attribute>
    </optional>
  </define>
  <define name="db.html.events">
    <interleave>
      <optional>
        <attribute name="onclick">
          <db:refpurpose>Occurs when the pointing device button is clicked over an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="ondblclick">
          <db:refpurpose>Occurs when the pointing device button is double clicked over an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onmousedown">
          <db:refpurpose>Occurs when the pointing device button is pressed over an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onmouseup">
          <db:refpurpose>Occurs when the pointing device button is released over an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onmouseover">
          <db:refpurpose>Occurs when the pointing device is moved onto an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onmousemove">
          <db:refpurpose>Occurs when the pointing device is moved while it is over an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onmouseout">
          <db:refpurpose>Occurs when the pointing device is moved away from an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onkeypress">
          <db:refpurpose>Occurs when a key is pressed and released over an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onkeydown">
          <db:refpurpose>Occurs when a key is pressed down over an element.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="onkeyup">
          <db:refpurpose>Occurs when a key is released over an element.</db:refpurpose>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="db.html.attrs">
    <interleave>
      <ref name="db.common.attributes"/>
      <ref name="db.html.coreattrs"/>
      <ref name="db.html.i18n"/>
      <ref name="db.html.events"/>
    </interleave>
  </define>
  <define name="db.html.cellhalign">
    <interleave>
      <optional>
        <attribute name="align">
          <db:refpurpose>Specifies the alignment of data and the justification of text in a cell.</db:refpurpose>
          <choice>
            <value>left</value>
            <a:documentation>Left-flush data/Left-justify text. This is the default value for table data.</a:documentation>
            <value>center</value>
            <a:documentation>Center data/Center-justify text. This is the default value for table headers.</a:documentation>
            <value>right</value>
            <a:documentation>Right-flush data/Right-justify text.</a:documentation>
            <value>justify</value>
            <a:documentation>Double-justify text.</a:documentation>
            <value>char</value>
            <a:documentation>Align text around a specific character. If a user agent doesn't support character alignment, behavior in the presence of this value is unspecified.</a:documentation>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="char">
          <db:refpurpose>This attribute specifies a single character within a text fragment to act as an axis for alignment. The default value for this attribute is the decimal point character for the current language as set by the lang attribute (e.g., the period in English and the comma in French). User agents are not required to support this attribute.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="charoff">
          <db:refpurpose>When present, this attribute specifies the offset to the first occurrence of the alignment character on each line. If a line doesn't include the alignment character, it should be horizontally shifted to end at the alignment position. When charoff is used to set the offset of an alignment character, the direction of offset is determined by the current text direction (set by the dir attribute). In left-to-right texts (the default), offset is from the left margin. In right-to-left texts, offset is from the right margin. User agents are not required to support this attribute.</db:refpurpose>
          <choice>
            <data type="integer"/>
            <a:documentation>An explicit offset.</a:documentation>
            <data type="string">
              <param name="pattern">[0-9]+%</param>
            </data>
            <a:documentation>A percentage offset.</a:documentation>
          </choice>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="db.html.cellvalign">
    <optional>
      <attribute name="valign">
        <db:refpurpose>Specifies the vertical position of data within a cell.</db:refpurpose>
        <choice>
          <value>top</value>
          <a:documentation>Cell data is flush with the top of the cell.</a:documentation>
          <value>middle</value>
          <a:documentation>Cell data is centered vertically within the cell. This is the default value.</a:documentation>
          <value>bottom</value>
          <a:documentation>Cell data is flush with the bottom of the cell.</a:documentation>
          <value>baseline</value>
          <a:documentation>All cells in the same row as a cell whose valign attribute has this value should have their textual data positioned so that the first text line occurs on a baseline common to all cells in the row. This constraint does not apply to subsequent text lines in these cells.</a:documentation>
        </choice>
      </attribute>
    </optional>
  </define>
  <define name="db.html.table.attributes">
    <interleave>
      <optional>
        <attribute name="summary">
          <db:refpurpose>Provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="width">
          <db:refpurpose>Specifies the desired width of the entire table and is intended for visual user agents. When the value is a percentage value, the value is relative to the user agent's available horizontal space. In the absence of any width specification, table width is determined by the user agent.</db:refpurpose>
          <choice>
            <data type="integer"/>
            <a:documentation>An explicit width.</a:documentation>
            <data type="string">
              <param name="pattern">[0-9]+%</param>
            </data>
            <a:documentation>A percentage width.</a:documentation>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="border">
          <db:refpurpose>Specifies the width (in pixels only) of the frame around a table.</db:refpurpose>
          <data type="nonNegativeInteger"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="frame">
          <db:refpurpose>Specifies which sides of the frame surrounding a table will be visible.</db:refpurpose>
          <choice>
            <value>void</value>
            <a:documentation>No sides. This is the default value.</a:documentation>
            <value>above</value>
            <a:documentation>The top side only.</a:documentation>
            <value>below</value>
            <a:documentation>The bottom side only.</a:documentation>
            <value>hsides</value>
            <a:documentation>The top and bottom sides only.</a:documentation>
            <value>lhs</value>
            <a:documentation>The left-hand side only.</a:documentation>
            <value>rhs</value>
            <a:documentation>The right-hand side only.</a:documentation>
            <value>vsides</value>
            <a:documentation>The right and left sides only.</a:documentation>
            <value>box</value>
            <a:documentation>All four sides.</a:documentation>
            <value>border</value>
            <a:documentation>All four sides.</a:documentation>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="rules">
          <db:refpurpose>Specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent.</db:refpurpose>
          <choice>
            <value>none</value>
            <a:documentation>No rules. This is the default value.</a:documentation>
            <value>groups</value>
            <a:documentation>Rules will appear between row groups (see thead, tfoot, and tbody) and column groups (see colgroup and col) only.</a:documentation>
            <value>rows</value>
            <a:documentation>Rules will appear between rows only.</a:documentation>
            <value>cols</value>
            <a:documentation>Rules will appear between columns only.</a:documentation>
            <value>all</value>
            <a:documentation>Rules will appear between all rows and columns.</a:documentation>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="cellspacing">
          <db:refpurpose>Specifies how much space the user agent should leave between the left side of the table and the left-hand side of the leftmost column, the top of the table and the top side of the topmost row, and so on for the right and bottom of the table. The attribute also specifies the amount of space to leave between cells.</db:refpurpose>
          <choice>
            <data type="integer"/>
            <a:documentation>An explicit spacing.</a:documentation>
            <data type="string">
              <param name="pattern">[0-9]+%</param>
            </data>
            <a:documentation>A percentage spacing.</a:documentation>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="cellpadding">
          <db:refpurpose>Specifies the amount of space between the border of the cell and its contents. If the value of this attribute is a pixel length, all four margins should be this distance from the contents. If the value of the attribute is a percentage length, the top and bottom margins should be equally separated from the content based on a percentage of the available vertical space, and the left and right margins should be equally separated from the content based on a percentage of the available horizontal space.</db:refpurpose>
          <choice>
            <data type="integer"/>
            <a:documentation>An explicit padding.</a:documentation>
            <data type="string">
              <param name="pattern">[0-9]+%</param>
            </data>
            <a:documentation>A percentage padding.</a:documentation>
          </choice>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="db.html.tablecell.attributes">
    <interleave>
      <optional>
        <attribute name="abbr">
          <db:refpurpose>Provides an abbreviated form of the cell's content and may be rendered by user agents when appropriate in place of the cell's content. Abbreviated names should be short since user agents may render them repeatedly. For instance, speech synthesizers may render the abbreviated headers relating to a particular cell before rendering that cell's content.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="axis">
          <db:refpurpose>This attribute may be used to place a cell into conceptual categories that can be considered to form axes in an n-dimensional space. User agents may give users access to these categories (e.g., the user may query the user agent for all cells that belong to certain categories, the user agent may present a table in the form of a table of contents, etc.). Please consult an HTML reference for more details.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="headers">
          <db:refpurpose>Specifies the list of header cells that provide header information for the current data cell. The value of this attribute is a space-separated list of cell names; those cells must be named by setting their id attribute. Authors generally use the headers attribute to help non-visual user agents render header information about data cells (e.g., header information is spoken prior to the cell data), but the attribute may also be used in conjunction with style sheets.</db:refpurpose>
        </attribute>
      </optional>
      <optional>
        <attribute name="scope">
          <db:refpurpose>Specifies the set of data cells for which the current header cell provides header information. This attribute may be used in place of the headers attribute, particularly for simple tables.</db:refpurpose>
          <choice>
            <value>row</value>
            <a:documentation>The current cell provides header information for the rest of the row that contains it</a:documentation>
            <value>col</value>
            <a:documentation>The current cell provides header information for the rest of the column that contains it.</a:documentation>
            <value>rowgroup</value>
            <a:documentation>The header cell provides header information for the rest of the row group that contains it.</a:documentation>
            <value>colgroup</value>
            <a:documentation>The header cell provides header information for the rest of the column group that contains it.</a:documentation>
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="rowspan">
          <db:refpurpose>Specifies the number of rows spanned by the current cell. The default value of this attribute is one (<db:quote>1</db:quote>
). The value zero (<db:quote>0</db:quote>
) means that the cell spans all rows from the current row to the last row of the table section (<db:tag>thead</db:tag>
, <db:tag>tbody</db:tag>
, or <db:tag>tfoot</db:tag>
) in which the cell is defined.</db:refpurpose>
          <data type="nonNegativeInteger"/>
        </attribute>
      </optional>
      <optional>
        <attribute name="colspan">
          <db:refpurpose>Specifies the number of columns spanned by the current cell. The default value of this attribute is one (<db:quote>1</db:quote>
). The value zero (<db:quote>0</db:quote>
) means that the cell spans all columns from the current column to the last column of the column group (<db:tag>colgroup</db:tag>
) in which the cell is defined.</db:refpurpose>
          <data type="nonNegativeInteger"/>
        </attribute>
      </optional>
    </interleave>
  </define>
  <define name="db.html.table.info">
    <ref name="db._info.title.forbidden"/>
  </define>
  <define name="db.html.table.model">
    <optional>
      <ref name="db.html.table.info"/>
    </optional>
    <ref name="db.html.caption"/>
    <choice>
      <zeroOrMore>
        <ref name="db.html.col"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="db.html.colgroup"/>
      </zeroOrMore>
    </choice>
    <optional>
      <ref name="db.html.thead"/>
    </optional>
    <optional>
      <ref name="db.html.tfoot"/>
    </optional>
    <choice>
      <oneOrMore>
        <ref name="db.html.tbody"/>
      </oneOrMore>
      <oneOrMore>
        <ref name="db.html.tr"/>
      </oneOrMore>
    </choice>
  </define>
  <define name="db.html.informaltable.info">
    <ref name="db._info.title.forbidden"/>
  </define>
  <define name="db.html.informaltable.model">
    <optional>
      <ref name="db.html.informaltable.info"/>
    </optional>
    <choice>
      <zeroOrMore>
        <ref name="db.html.col"/>
      </zeroOrMore>
      <zeroOrMore>
        <ref name="db.html.colgroup"/>
      </zeroOrMore>
    </choice>
    <optional>
      <ref name="db.html.thead"/>
    </optional>
    <optional>
      <ref name="db.html.tfoot"/>
    </optional>
    <choice>
      <oneOrMore>
        <ref name="db.html.tbody"/>
      </oneOrMore>
      <oneOrMore>
        <ref name="db.html.tr"/>
      </oneOrMore>
    </choice>
  </define>
  <!-- ====================================================================== -->
  <div>
    <db:refname>table</db:refname>
    <db:refpurpose>A formal (captioned) HTML table in a document</db:refpurpose>
    <define name="db.html.table.role.attribute">
      <attribute name="role"/>
    </define>
    <define name="db.html.table.label.attribute">
      <ref name="db.label.attribute"/>
    </define>
    <define name="db.html.table.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.table.attributes"/>
        <optional>
          <ref name="db.html.table.role.attribute"/>
        </optional>
        <optional>
          <ref name="db.html.table.label.attribute"/>
        </optional>
        <optional>
          <ref name="db.orient.attribute"/>
        </optional>
        <optional>
          <ref name="db.pgwide.attribute"/>
        </optional>
        <optional>
          <ref name="db.tabstyle.attribute"/>
        </optional>
        <optional>
          <ref name="db.floatstyle.attribute"/>
        </optional>
      </interleave>
    </define>
    <define name="db.html.table">
      <element name="table">
        <ref name="db.html.table.attlist"/>
        <ref name="db.html.table.model"/>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>informaltable</db:refname>
    <db:refpurpose>An HTML table without a title</db:refpurpose>
    <define name="db.html.informaltable.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.table.attributes"/>
      </interleave>
    </define>
    <define name="db.html.informaltable">
      <element name="informaltable">
        <ref name="db.html.informaltable.attlist"/>
        <ref name="db.html.informaltable.model"/>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>caption</db:refname>
    <db:refpurpose>An HTML table caption</db:refpurpose>
    <define name="db.html.caption.attlist">
      <ref name="db.html.attrs"/>
    </define>
    <define name="db.html.caption">
      <element name="caption">
        <ref name="db.html.caption.attlist"/>
        <zeroOrMore>
          <ref name="db.all.inlines"/>
        </zeroOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>col</db:refname>
    <db:refpurpose>Specifications for a column in an HTML table</db:refpurpose>
    <define name="db.html.col.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <optional>
          <attribute name="span">
            <db:refpurpose>This attribute, whose value must be an integer &gt; 0, specifies the number of columns <db:quote>spanned</db:quote>
 by the <db:tag>col</db:tag>
 element; the <db:tag>col</db:tag>
 element shares its attributes with all the columns it spans. The default value for this attribute is 1 (i.e., a single column). If the span attribute is set to N &gt; 1, the current <db:tag>col</db:tag>
 element shares its attributes with the next N-1 columns.</db:refpurpose>
            <data type="nonNegativeInteger"/>
          </attribute>
        </optional>
        <optional>
          <attribute name="width">
            <db:refpurpose>Specifies a default width for each column spanned by the current <db:tag>col</db:tag>
 element. It has the same meaning as the <db:tag class="attribute">width</db:tag>
 attribute for the <db:tag>colgroup</db:tag>
 element and overrides it.</db:refpurpose>
          </attribute>
        </optional>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.col">
      <element name="col">
        <ref name="db.html.col.attlist"/>
        <empty/>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>colgroup</db:refname>
    <db:refpurpose>A group of columns in an HTML table</db:refpurpose>
    <define name="db.html.colgroup.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <optional>
          <attribute name="span">
            <db:refpurpose>This attribute, which must be an integer &gt; 0, specifies the number of columns in a column group. In the absence of a span attribute, each <db:tag>colgroup</db:tag>
 defines a column group containing one column. If the span attribute is set to N &gt; 0, the current <db:tag>colgroup</db:tag>
 element defines a column group containing N columns. User agents must ignore this attribute if the <db:tag>colgroup</db:tag>
 element contains one or more <db:tag>col</db:tag>
 elements.</db:refpurpose>
            <data type="nonNegativeInteger"/>
          </attribute>
        </optional>
        <optional>
          <attribute name="width">
            <db:refpurpose>This attribute specifies a default width for each column in the current column group. In addition to the standard pixel, percentage, and relative values, this attribute allows the special form <db:quote>0*</db:quote>
 (zero asterisk) which means that the width of the each column in the group should be the minimum width necessary to hold the column's contents. This implies that a column's entire contents must be known before its width may be correctly computed. Authors should be aware that specifying <db:quote>0*</db:quote>
 will prevent visual user agents from rendering a table incrementally. This attribute is overridden for any column in the column group whose width is specified via a <db:tag>col</db:tag>
 element.</db:refpurpose>
          </attribute>
        </optional>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.colgroup">
      <element name="colgroup">
        <ref name="db.html.colgroup.attlist"/>
        <zeroOrMore>
          <ref name="db.html.col"/>
        </zeroOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>thead</db:refname>
    <db:refpurpose>A table header consisting of one or more rows in an HTML table</db:refpurpose>
    <define name="db.html.thead.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.thead">
      <element name="thead">
        <ref name="db.html.thead.attlist"/>
        <oneOrMore>
          <ref name="db.html.tr"/>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>tfoot</db:refname>
    <db:refpurpose>A table footer consisting of one or more rows in an HTML table</db:refpurpose>
    <define name="db.html.tfoot.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.tfoot">
      <element name="tfoot">
        <ref name="db.html.tfoot.attlist"/>
        <oneOrMore>
          <ref name="db.html.tr"/>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>tbody</db:refname>
    <db:refpurpose>A wrapper for the rows of an HTML table or informal HTML table</db:refpurpose>
    <define name="db.html.tbody.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.tbody">
      <element name="tbody">
        <ref name="db.html.tbody.attlist"/>
        <oneOrMore>
          <ref name="db.html.tr"/>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>tr</db:refname>
    <db:refpurpose>A row in an HTML table</db:refpurpose>
    <define name="db.html.tr.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.tr">
      <element name="tr">
        <ref name="db.html.tr.attlist"/>
        <oneOrMore>
          <choice>
            <ref name="db.html.th"/>
            <ref name="db.html.td"/>
          </choice>
        </oneOrMore>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>th</db:refname>
    <db:refpurpose>A table header entry in an HTML table</db:refpurpose>
    <define name="db.html.th.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.tablecell.attributes"/>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.th">
      <element name="th">
        <ref name="db.html.th.attlist"/>
        <choice>
          <zeroOrMore>
            <ref name="db.all.inlines"/>
          </zeroOrMore>
          <zeroOrMore>
            <ref name="db.all.blocks"/>
          </zeroOrMore>
        </choice>
      </element>
    </define>
  </div>
  <!-- ====================================================================== -->
  <div>
    <db:refname>td</db:refname>
    <db:refpurpose>A table entry in an HTML table</db:refpurpose>
    <define name="db.html.td.attlist">
      <interleave>
        <ref name="db.html.attrs"/>
        <ref name="db.html.tablecell.attributes"/>
        <ref name="db.html.cellhalign"/>
        <ref name="db.html.cellvalign"/>
      </interleave>
    </define>
    <define name="db.html.td">
      <element name="td">
        <ref name="db.html.td.attlist"/>
        <choice>
          <zeroOrMore>
            <ref name="db.all.inlines"/>
          </zeroOrMore>
          <zeroOrMore>
            <ref name="db.all.blocks"/>
          </zeroOrMore>
        </choice>
      </element>
    </define>
  </div>
</grammar>