1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  /=====================================================================\
4  |  LaTeXML-tabular.rnc                                                |
5  | RelaxNG model for LaTeXML generated documents                       |
6  |=====================================================================|
7  | Part of LaTeXML:                                                    |
8  |  Public domain software, produced as part of work done by the       |
9  |  United States Government & not subject to copyright in the US.     |
10  |=====================================================================|
11  | Bruce Miller <bruce.miller@nist.gov>                        #_#     |
12  | http://dlmf.nist.gov/LaTeXML/                              (o o)    |
13  \=========================================================ooo==U==ooo=/
14-->
15<grammar ns="http://dlmf.nist.gov/LaTeXML" 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">
16  <define name="Misc.class" combine="choice">
17    <a:documentation>This module defines the basic tabular, or alignment, structure.
18It is roughly parallel to the HTML model.</a:documentation>
19    <ref name="tabular"/>
20  </define>
21  <!-- ====================================================================== -->
22  <define name="tabular">
23    <element name="tabular">
24      <a:documentation>An alignment structure corresponding to tabular  or various similar forms.
25The model is basically a copy of HTML4's table.</a:documentation>
26      <ref name="tabular_attributes"/>
27      <ref name="tabular_model"/>
28    </element>
29  </define>
30  <define name="tabular_attributes">
31    <a:documentation>Attributes for \elementref{tabular}.</a:documentation>
32    <ref name="Common.attributes"/>
33    <ref name="Backgroundable.attributes"/>
34    <ref name="ID.attributes"/>
35    <optional>
36      <attribute name="vattach">
37        <a:documentation>which row's baseline aligns with the container's baseline.</a:documentation>
38        <choice>
39          <value>top</value>
40          <value>middle</value>
41          <value>bottom</value>
42        </choice>
43      </attribute>
44    </optional>
45    <optional>
46      <attribute name="width">
47        <a:documentation>the desired width of the tabular.</a:documentation>
48        <ref name="Length.type"/>
49      </attribute>
50    </optional>
51    <optional>
52      <attribute name="rowsep">
53        <a:documentation>the spacing between rows</a:documentation>
54        <ref name="Length.type"/>
55      </attribute>
56    </optional>
57    <optional>
58      <attribute name="colsep">
59        <a:documentation>the spacing between columns</a:documentation>
60        <ref name="Length.type"/>
61      </attribute>
62    </optional>
63  </define>
64  <define name="tabular_model">
65    <a:documentation>Content model for \elementref{tabular}.</a:documentation>
66    <zeroOrMore>
67      <choice>
68        <ref name="thead"/>
69        <ref name="tfoot"/>
70        <ref name="tbody"/>
71        <ref name="tr"/>
72      </choice>
73    </zeroOrMore>
74  </define>
75  <!-- ====================================================================== -->
76  <define name="thead">
77    <element name="thead">
78      <a:documentation>A container for a set of rows that correspond to the header of the tabular.</a:documentation>
79      <ref name="thead_attributes"/>
80      <ref name="thead_model"/>
81    </element>
82  </define>
83  <define name="thead_attributes">
84    <a:documentation>Attributes for \elementref{thead}.</a:documentation>
85    <ref name="Common.attributes"/>
86    <ref name="Backgroundable.attributes"/>
87  </define>
88  <define name="thead_model">
89    <a:documentation>Content model for \elementref{thead}.</a:documentation>
90    <zeroOrMore>
91      <ref name="tr"/>
92    </zeroOrMore>
93  </define>
94  <!-- ====================================================================== -->
95  <define name="tfoot">
96    <element name="tfoot">
97      <a:documentation>A container for a set of rows that correspond to the footer of the tabular.</a:documentation>
98      <ref name="tfoot_attributes"/>
99      <ref name="tfoot_model"/>
100    </element>
101  </define>
102  <define name="tfoot_attributes">
103    <a:documentation>Attributes for \elementref{tfoot}.</a:documentation>
104    <ref name="Common.attributes"/>
105    <ref name="Backgroundable.attributes"/>
106  </define>
107  <define name="tfoot_model">
108    <a:documentation>Content model for \elementref{tfoot}.</a:documentation>
109    <zeroOrMore>
110      <ref name="tr"/>
111    </zeroOrMore>
112  </define>
113  <!-- ====================================================================== -->
114  <define name="tbody">
115    <element name="tbody">
116      <a:documentation>A container for a set of rows corresponding to the body of the tabular.</a:documentation>
117      <ref name="tbody_attributes"/>
118      <ref name="tbody_model"/>
119    </element>
120  </define>
121  <define name="tbody_attributes">
122    <a:documentation>Attributes for \elementref{tbody}.</a:documentation>
123    <ref name="Common.attributes"/>
124    <ref name="Backgroundable.attributes"/>
125  </define>
126  <define name="tbody_model">
127    <a:documentation>Content model for \elementref{tbody}.</a:documentation>
128    <zeroOrMore>
129      <ref name="tr"/>
130    </zeroOrMore>
131  </define>
132  <!-- ====================================================================== -->
133  <define name="tr">
134    <element name="tr">
135      <a:documentation>A row of a tabular.</a:documentation>
136      <ref name="tr_attributes"/>
137      <ref name="tr_model"/>
138    </element>
139  </define>
140  <define name="tr_attributes">
141    <a:documentation>Attributes for \elementref{tr}.</a:documentation>
142    <ref name="Common.attributes"/>
143    <ref name="Backgroundable.attributes"/>
144    <ref name="ID.attributes"/>
145  </define>
146  <define name="tr_model">
147    <a:documentation>Content model for \elementref{tr}.</a:documentation>
148    <zeroOrMore>
149      <ref name="td"/>
150    </zeroOrMore>
151  </define>
152  <!-- ====================================================================== -->
153  <define name="td">
154    <element name="td">
155      <a:documentation>A cell in a row of a tabular.</a:documentation>
156      <ref name="td_attributes"/>
157      <ref name="td_model"/>
158    </element>
159  </define>
160  <define name="td_attributes">
161    <a:documentation>Attributes for \elementref{td}.</a:documentation>
162    <ref name="Common.attributes"/>
163    <ref name="Backgroundable.attributes"/>
164    <ref name="ID.attributes"/>
165    <optional>
166      <attribute name="colspan">
167        <a:documentation>indicates how many columns this cell spans or covers.</a:documentation>
168        <data type="nonNegativeInteger"/>
169      </attribute>
170    </optional>
171    <optional>
172      <attribute name="rowspan">
173        <a:documentation>indicates how many rows this cell spans or covers.</a:documentation>
174        <data type="nonNegativeInteger"/>
175      </attribute>
176    </optional>
177    <optional>
178      <attribute name="align">
179        <a:documentation> specifies the horizontal alignment of the content.
180The allowed values are open-ended to accomodate \texttt{char:.} type alignments.</a:documentation>
181        <choice>
182          <value>left</value>
183          <value>right</value>
184          <value>center</value>
185          <value>justify</value>
186          <text/>
187        </choice>
188      </attribute>
189    </optional>
190    <optional>
191      <attribute name="width">
192        <a:documentation>specifies the desired width for the column.</a:documentation>
193        <ref name="Length.type"/>
194      </attribute>
195    </optional>
196    <optional>
197      <attribute name="vattach">
198        <a:documentation>how the cell contents aligns with the row's baseline.</a:documentation>
199        <choice>
200          <value>top</value>
201          <value>middle</value>
202          <value>bottom</value>
203        </choice>
204      </attribute>
205    </optional>
206    <optional>
207      <attribute name="border">
208        <a:documentation>records a sequence of t or tt, r or rr, b or bb and l or ll
209for borders or doubled borders on any side of the cell.</a:documentation>
210      </attribute>
211    </optional>
212    <optional>
213      <attribute name="thead">
214        <a:documentation>whether this cell corresponds to a table row or column heading or both
215(whether in head or foot).</a:documentation>
216        <choice>
217          <value>column</value>
218          <value>column row</value>
219          <value>row</value>
220        </choice>
221      </attribute>
222    </optional>
223  </define>
224  <define name="td_model">
225    <a:documentation>Content model for \elementref{td}.</a:documentation>
226    <ref name="Flow.model"/>
227  </define>
228</grammar>
229<!-- ====================================================================== -->
230