--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+ xmlns:rng="http://relaxng.org/ns/structure/1.0"
+ xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
+ xmlns:s="http://www.ascc.net/xml/schematron"
+ xmlns:doc="http://nwalsh.com/xmlns/documentation"
+ xmlns:db="http://nwalsh.com/xmlns/docbook-grammar-structure"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+<rng:div doc:docbook="yes" xmlns="">
+<partinfo>
+<releaseinfo
+ role="cvs">$Id$</releaseinfo>
+<title>DocBook HTML Table Model</title>
+<productname>DocBook</productname>
+<productnumber>4.2+</productnumber>
+<releaseinfo role="filename">htmltbl</releaseinfo>
+<copyright>
+<year>2002</year>
+<holder>HaL Computer Systems, Inc.</holder>
+<holder>O'Reilly & Associates, Inc.</holder>
+<holder>ArborText, Inc.</holder>
+<holder>Fujitsu Software Corporation</holder>
+<holder>Norman Walsh</holder>
+<holder>Sun Microsystems, Inc.</holder>
+<holder>OASIS Open, Inc.</holder>
+</copyright>
+
+<legalnotice>
+<para>This DTD is based on the HTML table model
+("-//W3C//DTD XHTML 1.0 Strict//EN").</para>
+
+<para>Permission to use, copy, modify and distribute the DocBook DTD
+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 DTD for
+any purpose. It is provided "as is" without expressed or implied
+warranty.</para>
+
+<para>If you modify the DocBook DTD in any way, except for declaring and
+referencing additional sets of general entities and declaring
+additional notations, label your DTD as a variant of DocBook. See
+the maintenance documentation for more information.</para>
+
+<para>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/.</para>
+</legalnotice>
+</partinfo>
+</rng:div>
+
+<!-- ...................................................................... -->
+<!-- This module contains the definitions for the HTML table model for
+ use in DocBook. -->
+
+ <define name="Flow">
+ <zeroOrMore>
+ <ref name="tbl.entry.mdl"/>
+ </zeroOrMore>
+ </define>
+
+ <define name="Inline">
+ <zeroOrMore>
+ <ref name="para.char.mix"/>
+ </zeroOrMore>
+ </define>
+
+<!-- a language code, as per [RFC3066] -->
+ <define name="Character">
+ <data type="string"/>
+ </define>
+<!-- a single character, as per section 2.2 of [XML] -->
+ <define name="Number">
+ <data type="string"/>
+ </define>
+<!-- nn for pixels or nn% for percentage length -->
+ <define name="MultiLength">
+ <data type="string"/>
+ </define>
+<!-- style sheet data -->
+ <define name="Text">
+ <data type="string"/>
+ </define>
+<!-- used for titles etc. -->
+ <define name="Length">
+ <data type="string"/>
+ </define>
+<!-- pixel, percentage, or relative -->
+ <define name="Pixels">
+ <data type="string"/>
+ </define>
+<!-- date and time information. ISO date format -->
+ <define name="Script">
+ <data type="string"/>
+ </define>
+<!-- script expression -->
+ <define name="StyleSheet">
+ <data type="string"/>
+ </define>
+<!-- a space separated list of character encodings, as per [RFC2045] -->
+ <define name="LanguageCode">
+ <data type="NMTOKEN"/>
+ </define>
+
+ <define name="coreattrs">
+ <optional>
+ <attribute name="id">
+ <data type="ID"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="class"/>
+ </optional>
+ <optional>
+ <attribute name="style">
+ <ref name="StyleSheet"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="title">
+ <ref name="Text"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="i18n">
+ <optional>
+ <attribute name="lang">
+ <ref name="LanguageCode"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="xml:lang">
+ <ref name="LanguageCode"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="dir">
+ <choice>
+ <value>ltr</value>
+ <value>rtl</value>
+ </choice>
+ </attribute>
+ </optional>
+ </define>
+ <define name="events">
+ <optional>
+ <attribute name="onclick">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="ondblclick">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onmousedown">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onmouseup">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onmouseover">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onmousemove">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onmouseout">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onkeypress">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onkeydown">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="onkeyup">
+ <ref name="Script"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="attrs">
+ <ref name="coreattrs"/>
+ <ref name="i18n"/>
+ <ref name="events"/>
+ </define>
+
+<!--======================= Tables =======================================-->
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+ <define name="TFrame">
+ <choice>
+ <value>void</value>
+ <value>above</value>
+ <value>below</value>
+ <value>hsides</value>
+ <value>lhs</value>
+ <value>rhs</value>
+ <value>vsides</value>
+ <value>box</value>
+ <value>border</value>
+ </choice>
+ </define>
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+ <define name="TRules">
+ <choice>
+ <value>none</value>
+ <value>groups</value>
+ <value>rows</value>
+ <value>cols</value>
+ <value>all</value>
+ </choice>
+ </define>
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+ <define name="cellhalign">
+ <optional>
+ <attribute name="align">
+ <choice>
+ <value>left</value>
+ <value>center</value>
+ <value>right</value>
+ <value>justify</value>
+ <value>char</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="char">
+ <ref name="Character"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="charoff">
+ <ref name="Length"/>
+ </attribute>
+ </optional>
+ </define>
+<!-- vertical alignment attributes for cell contents -->
+ <define name="cellvalign">
+ <optional>
+ <attribute name="valign">
+ <choice>
+ <value>top</value>
+ <value>middle</value>
+ <value>bottom</value>
+ <value>baseline</value>
+ </choice>
+ </attribute>
+ </optional>
+ </define>
+ <define name="table" combine="choice">
+ <element name="table">
+ <ref name="html.table.attlist"/>
+ <optional>
+ <ref name="html.caption"/>
+ </optional>
+ <choice>
+ <zeroOrMore>
+ <ref name="col"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="colgroup"/>
+ </zeroOrMore>
+ </choice>
+ <optional>
+ <ref name="html.thead"/>
+ </optional>
+ <optional>
+ <ref name="html.tfoot"/>
+ </optional>
+ <choice>
+ <oneOrMore>
+ <ref name="html.tbody"/>
+ </oneOrMore>
+ <oneOrMore>
+ <ref name="tr"/>
+ </oneOrMore>
+ </choice>
+ </element>
+ </define>
+
+ <define name="html.caption">
+ <element name="caption">
+ <ref name="html.caption.attlist"/>
+ <ref name="Inline"/>
+ </element>
+ </define>
+
+ <define name="html.thead">
+ <element name="thead">
+ <ref name="html.thead.attlist"/>
+ <oneOrMore>
+ <ref name="tr"/>
+ </oneOrMore>
+ </element>
+ </define>
+ <define name="html.tfoot">
+ <element name="tfoot">
+ <ref name="html.tfoot.attlist"/>
+ <oneOrMore>
+ <ref name="tr"/>
+ </oneOrMore>
+ </element>
+ </define>
+ <define name="html.tbody">
+ <element name="tbody">
+ <ref name="html.tbody.attlist"/>
+ <oneOrMore>
+ <ref name="tr"/>
+ </oneOrMore>
+ </element>
+ </define>
+ <define name="colgroup">
+ <element name="colgroup">
+ <ref name="colgroup.attlist"/>
+ <zeroOrMore>
+ <ref name="col"/>
+ </zeroOrMore>
+ </element>
+ </define>
+ <define name="col">
+ <element name="col">
+ <ref name="col.attlist"/>
+ <empty/>
+ </element>
+ </define>
+ <define name="tr">
+ <element name="tr">
+ <ref name="tr.attlist"/>
+ <oneOrMore>
+ <choice>
+ <ref name="th"/>
+ <ref name="td"/>
+ </choice>
+ </oneOrMore>
+ </element>
+ </define>
+ <define name="th">
+ <element name="th">
+ <ref name="th.attlist"/>
+ <ref name="Flow"/>
+ </element>
+ </define>
+ <define name="td">
+ <element name="td">
+ <ref name="td.attlist"/>
+ <ref name="Flow"/>
+ </element>
+ </define>
+ <define name="html.table.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <optional>
+ <attribute name="summary">
+ <ref name="Text"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="width">
+ <ref name="Length"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="border">
+ <ref name="Pixels"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="frame">
+ <ref name="TFrame"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="rules">
+ <ref name="TRules"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="cellspacing">
+ <ref name="Length"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="cellpadding">
+ <ref name="Length"/>
+ </attribute>
+ </optional>
+ </define>
+ <define name="html.caption.attlist" combine="interleave">
+ <ref name="attrs"/>
+ </define>
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+ <define name="colgroup.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <optional>
+ <attribute name="span" a:defaultValue="1">
+ <ref name="Number"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="width">
+ <ref name="MultiLength"/>
+ </attribute>
+ </optional>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+ <define name="col.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <optional>
+ <attribute name="span" a:defaultValue="1">
+ <ref name="Number"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="width">
+ <ref name="MultiLength"/>
+ </attribute>
+ </optional>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+ <define name="html.thead.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+ <define name="html.tfoot.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+ <define name="html.tbody.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+ <define name="tr.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+<!-- Scope is simpler than headers attribute for common tables -->
+ <define name="Scope">
+ <choice>
+ <value>row</value>
+ <value>col</value>
+ <value>rowgroup</value>
+ <value>colgroup</value>
+ </choice>
+ </define>
+<!-- th is for headers, td for data and for cells acting as both -->
+ <define name="th.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <optional>
+ <attribute name="abbr">
+ <ref name="Text"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="axis"/>
+ </optional>
+ <optional>
+ <attribute name="headers">
+ <data type="IDREFS"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="scope">
+ <ref name="Scope"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="rowspan" a:defaultValue="1">
+ <ref name="Number"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="colspan" a:defaultValue="1">
+ <ref name="Number"/>
+ </attribute>
+ </optional>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+ <define name="td.attlist" combine="interleave">
+ <ref name="attrs"/>
+ <optional>
+ <attribute name="abbr">
+ <ref name="Text"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="axis"/>
+ </optional>
+ <optional>
+ <attribute name="headers">
+ <data type="IDREFS"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="scope">
+ <ref name="Scope"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="rowspan" a:defaultValue="1">
+ <ref name="Number"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="colspan" a:defaultValue="1">
+ <ref name="Number"/>
+ </attribute>
+ </optional>
+ <ref name="cellhalign"/>
+ <ref name="cellvalign"/>
+ </define>
+
+<!-- End of DocBook HTML Table Model V4.2 ................................. -->
+<!-- ...................................................................... -->
+</grammar>