1 datatypes w = "http://whattf.org/datatype-draft"
3 # #####################################################################
4 ## RELAX NG Schema for HTML 5: Tables #
5 # #####################################################################
7 # #####################################################################
12 # tables.data.multilen =
13 # ( common.data.integer.positive
14 # | common.data.percent
15 # | xsd:token { pattern = "[0-9]+\*" } #REVISIT should this one be string?
18 ## Table Alignment Attributes
20 tables.attrs.alignment =
23 & tables.attrs.valign?
36 xsd:string { pattern = "." }
47 ## Data Table: <table>
50 element table { table.inner & table.attrs }
57 , common.elem.script-supporting*
59 , common.elem.script-supporting*
61 , common.elem.script-supporting*
63 , common.elem.script-supporting*
64 , ( tbody.elem* | tr.elem+ )
65 , common.elem.script-supporting*
67 | ( ( tbody.elem* | tr.elem+ )
68 , common.elem.script-supporting*
74 common.elem.flow |= table.elem
76 ## Table Caption: <caption>
79 element caption { caption.inner & caption.attrs }
87 # #####################################################################
88 ## Table Super Structure
90 ## Table Column Group: <colgroup>
93 element colgroup { colgroup.inner & colgroup.attrs }
100 common.data.integer.positive
104 & common.elem.script-supporting*
106 | colgroup.attrs.span?
109 ## Table Column: <col>
112 element col { col.inner & col.attrs }
120 common.data.integer.positive
125 ## Table Header Row Group
128 element thead { thead.inner & thead.attrs }
135 & common.elem.script-supporting*
138 ## Table Footer Row Group
141 element tfoot { tfoot.inner & tfoot.attrs }
148 & common.elem.script-supporting*
154 element tbody { tbody.inner & tbody.attrs }
161 & common.elem.script-supporting*
164 # #####################################################################
170 element tr { tr.inner & tr.attrs }
176 ( ( td.elem | th.elem | common.elem.script-supporting )* )
178 ## Common Table Cell Attributes
180 tables.attrs.cell-structure =
181 ( tables.attrs.colspan?
182 & tables.attrs.rowspan?
184 tables.attrs.colspan =
186 common.data.integer.positive
188 tables.attrs.rowspan =
190 common.data.integer.non-negative
193 tables.attrs.access-headers =
194 ( tables.attrs.headers? )
195 tables.attrs.headers =
200 tables.attrs.define-headers =
201 ( tables.attrs.scope? )
206 | w:string "rowgroup"
207 | w:string "colgroup"
215 ## Table Data Cell: <td>
218 element td { td.inner & td.attrs }
221 & tables.attrs.cell-structure
222 & tables.attrs.headers?
223 # & tables.attrs.alignment
227 ( common.inner.flow )
229 ## Table Header Cells: <th>
232 element th { th.inner & th.attrs }
235 & tables.attrs.cell-structure
236 & tables.attrs.scope?
237 & tables.attrs.headers?
238 # & tables.attrs.alignment
239 & ( common.attrs.aria?
240 | common.attrs.aria.implicit.column-or-row-header
244 ( common.inner.flow )