summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rng
blob: 325c64c302b8fb6be59e24072f14663d7fe04c7c (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
<?xml version="1.0" encoding="UTF-8"?>
<!--
  /=====================================================================\ 
  |  LaTeXML-tabular.rnc                                                |
  | RelaxNG model for LaTeXML generated documents                       |
  |=====================================================================|
  | Part of LaTeXML:                                                    |
  |  Public domain software, produced as part of work done by the       |
  |  United States Government & not subject to copyright in the US.     |
  |=====================================================================|
  | Bruce Miller <bruce.miller@nist.gov>                        #_#     |
  | http://dlmf.nist.gov/LaTeXML/                              (o o)    |
  \=========================================================ooo==U==ooo=/
-->
<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">
  <define name="Misc.class" combine="choice">
    <a:documentation>This module defines the basic tabular, or alignment, structure.
It is roughly parallel to the HTML model.</a:documentation>
    <ref name="tabular"/>
  </define>
  <!-- ====================================================================== -->
  <define name="tabular">
    <element name="tabular">
      <a:documentation>An alignment structure corresponding to tabular  or various similar forms.
The model is basically a copy of HTML4's table.</a:documentation>
      <ref name="tabular_attributes"/>
      <ref name="tabular_model"/>
    </element>
  </define>
  <define name="tabular_attributes">
    <a:documentation>Attributes for \elementref{tabular}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="vattach">
        <a:documentation>which row's baseline aligns with the container's baseline.</a:documentation>
        <choice>
          <value>top</value>
          <value>middle</value>
          <value>bottom</value>
        </choice>
      </attribute>
    </optional>
    <optional>
      <attribute name="width">
        <a:documentation>the desired width of the tabular.</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
  </define>
  <define name="tabular_model">
    <a:documentation>Content model for \elementref{tabular}.</a:documentation>
    <zeroOrMore>
      <choice>
        <ref name="thead"/>
        <ref name="tfoot"/>
        <ref name="tbody"/>
        <ref name="tr"/>
      </choice>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="thead">
    <element name="thead">
      <a:documentation>A container for a set of rows that correspond to the header of the tabular.</a:documentation>
      <ref name="thead_attributes"/>
      <ref name="thead_model"/>
    </element>
  </define>
  <define name="thead_attributes">
    <a:documentation>Attributes for \elementref{thead}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="thead_model">
    <a:documentation>Content model for \elementref{thead}.</a:documentation>
    <zeroOrMore>
      <ref name="tr"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="tfoot">
    <element name="tfoot">
      <a:documentation>A container for a set of rows that correspond to the footer of the tabular.</a:documentation>
      <ref name="tfoot_attributes"/>
      <ref name="tfoot_model"/>
    </element>
  </define>
  <define name="tfoot_attributes">
    <a:documentation>Attributes for \elementref{tfoot}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="tfoot_model">
    <a:documentation>Content model for \elementref{tfoot}.</a:documentation>
    <zeroOrMore>
      <ref name="tr"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="tbody">
    <element name="tbody">
      <a:documentation>A container for a set of rows corresponding to the body of the tabular.</a:documentation>
      <ref name="tbody_attributes"/>
      <ref name="tbody_model"/>
    </element>
  </define>
  <define name="tbody_attributes">
    <a:documentation>Attributes for \elementref{tbody}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="tbody_model">
    <a:documentation>Content model for \elementref{tbody}.</a:documentation>
    <zeroOrMore>
      <ref name="tr"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="tr">
    <element name="tr">
      <a:documentation>A row of a tabular.</a:documentation>
      <ref name="tr_attributes"/>
      <ref name="tr_model"/>
    </element>
  </define>
  <define name="tr_attributes">
    <a:documentation>Attributes for \elementref{tr}.</a:documentation>
    <ref name="Common.attributes"/>
  </define>
  <define name="tr_model">
    <a:documentation>Content model for \elementref{tr}.</a:documentation>
    <zeroOrMore>
      <ref name="td"/>
    </zeroOrMore>
  </define>
  <!-- ====================================================================== -->
  <define name="td">
    <element name="td">
      <a:documentation>A cell in a row of a tabular.</a:documentation>
      <ref name="td_attributes"/>
      <ref name="td_model"/>
    </element>
  </define>
  <define name="td_attributes">
    <a:documentation>Attributes for \elementref{td}.</a:documentation>
    <ref name="Common.attributes"/>
    <optional>
      <attribute name="colspan">
        <a:documentation>indicates how many columns this cell spans or covers.</a:documentation>
        <data type="nonNegativeInteger"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="rowspan">
        <a:documentation>indicates how many rows this cell spans or covers.</a:documentation>
        <data type="nonNegativeInteger"/>
      </attribute>
    </optional>
    <optional>
      <!--
        This would have been clearer, but messes up conversion to dtd
         attribute align { "left" | "right" | "center" | "justify" | text }?,
      -->
      <attribute name="align">
        <a:documentation> specifies the alignment of the content.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="width">
        <a:documentation>specifies the desired width for the column.</a:documentation>
        <ref name="Length.type"/>
      </attribute>
    </optional>
    <optional>
      <attribute name="border">
        <a:documentation>records a sequence of t or tt, r or rr, b or bb and l or ll
for borders or doubled borders on any side of the cell.</a:documentation>
      </attribute>
    </optional>
    <optional>
      <attribute name="thead">
        <a:documentation>whether this cell corresponds to a table head or foot.</a:documentation>
        <data type="boolean"/>
      </attribute>
    </optional>
  </define>
  <define name="td_model">
    <a:documentation>Content model for \elementref{td}.</a:documentation>
    <ref name="Flow.model"/>
  </define>
</grammar>
<!-- ====================================================================== -->