]> code.delx.au - gnu-emacs-elpa/blob - packages/html5-schema/sectional.rnc
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[gnu-emacs-elpa] / packages / html5-schema / sectional.rnc
1 # #####################################################################
2 ## RELAX NG Schema for HTML 5: Sectioning Markup #
3 # #####################################################################
4
5 # #####################################################################
6 ## Headings
7
8 ## Heading (Rank 1): <h1>
9
10 h1.elem =
11 element h1 { h1.inner & h1.attrs }
12 h1.attrs =
13 ( common.attrs
14 & ( common.attrs.aria.implicit.heading
15 | common.attrs.aria.role.heading
16 | common.attrs.aria.role.tab
17 | common.attrs.aria.role.presentation
18 )?
19 )
20 h1.inner =
21 ( common.inner.phrasing )
22
23 common.elem.flow |= h1.elem
24
25 ## Heading (Rank 2): <h2>
26
27 h2.elem =
28 element h2 { h2.inner & h2.attrs }
29 h2.attrs =
30 ( common.attrs
31 & ( common.attrs.aria.implicit.heading
32 | common.attrs.aria.role.heading
33 | common.attrs.aria.role.tab
34 | common.attrs.aria.role.presentation
35 )?
36 )
37 h2.inner =
38 ( common.inner.phrasing )
39
40 common.elem.flow |= h2.elem
41
42 ## Heading (Rank 3): <h3>
43
44 h3.elem =
45 element h3 { h3.inner & h3.attrs }
46 h3.attrs =
47 ( common.attrs
48 & ( common.attrs.aria.implicit.heading
49 | common.attrs.aria.role.heading
50 | common.attrs.aria.role.tab
51 | common.attrs.aria.role.presentation
52 )?
53 )
54 h3.inner =
55 ( common.inner.phrasing )
56
57 common.elem.flow |= h3.elem
58
59 ## Heading (Rank 4): <h4>
60
61 h4.elem =
62 element h4 { h4.inner & h4.attrs }
63 h4.attrs =
64 ( common.attrs
65 & ( common.attrs.aria.implicit.heading
66 | common.attrs.aria.role.heading
67 | common.attrs.aria.role.tab
68 | common.attrs.aria.role.presentation
69 )?
70 )
71 h4.inner =
72 ( common.inner.phrasing )
73
74 common.elem.flow |= h4.elem
75
76 ## Heading (Rank 5): <h5>
77
78 h5.elem =
79 element h5 { h5.inner & h5.attrs }
80 h5.attrs =
81 ( common.attrs
82 & ( common.attrs.aria.implicit.heading
83 | common.attrs.aria.role.heading
84 | common.attrs.aria.role.tab
85 | common.attrs.aria.role.presentation
86 )?
87 )
88 h5.inner =
89 ( common.inner.phrasing )
90
91 common.elem.flow |= h5.elem
92
93 ## Heading (Rank 6): <h6>
94
95 h6.elem =
96 element h6 { h6.inner & h6.attrs }
97 h6.attrs =
98 ( common.attrs
99 & ( common.attrs.aria.implicit.heading
100 | common.attrs.aria.role.heading
101 | common.attrs.aria.role.tab
102 | common.attrs.aria.role.presentation
103 )?
104 )
105 h6.inner =
106 ( common.inner.phrasing )
107
108 common.elem.flow |= h6.elem
109
110 ## Heading Group: <hgroup>
111
112 hgroup.elem =
113 element hgroup { hgroup.inner & hgroup.attrs } & nonW3C
114 hgroup.attrs =
115 ( common.attrs
116 & ( common.attrs.aria.implicit.heading
117 | common.attrs.aria.role.heading
118 | common.attrs.aria.role.tab
119 | common.attrs.aria.role.presentation
120 )?
121 )
122 hgroup.inner =
123 ( ( h1.elem
124 | h2.elem
125 | h3.elem
126 | h4.elem
127 | h5.elem
128 | h6.elem
129 )
130 & common.elem.script-supporting*
131 )+
132
133 common.elem.flow |= hgroup.elem
134
135 # #####################################################################
136 ## Section Meta
137
138 ## Contact Info: <address>
139
140 address.elem =
141 element address { address.inner & address.attrs }
142 address.attrs =
143 ( common.attrs
144 & ( common.attrs.aria.role.contentinfo
145 | common.attrs.aria.role.presentation
146 )?
147 )
148 address.inner =
149 ( common.inner.flow )
150
151 common.elem.flow |= address.elem
152
153 # #####################################################################
154 ## Quotations
155
156 ## Block Quotes: <blockquote>
157
158 blockquote.elem =
159 element blockquote { blockquote.inner & blockquote.attrs }
160 blockquote.attrs =
161 ( common.attrs
162 & blockquote.attrs.cite?
163 & common.attrs.aria?
164 )
165 blockquote.attrs.cite =
166 attribute cite {
167 common.data.uri
168 }
169 blockquote.inner =
170 ( common.inner.flow )
171
172 common.elem.flow |= blockquote.elem