|
1 | 1 | <?xml version="1.1" encoding="UTF-8"?>
|
2 |
| -<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> |
| 2 | +<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" |
| 3 | + xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns="http://relaxng.org/ns/structure/1.0" |
| 4 | + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> |
3 | 5 | <!-- extension point -->
|
4 | 6 | <define name="node-content" combine="interleave">
|
5 | 7 | <interleave>
|
|
48 | 50 | <!-- new point -->
|
49 | 51 | <define name="color-content">
|
50 | 52 | <interleave>
|
51 |
| - <attribute name="r"> |
52 |
| - <ref name="color-channel"/> |
53 |
| - </attribute> |
54 |
| - <attribute name="g"> |
55 |
| - <ref name="color-channel"/> |
56 |
| - </attribute> |
57 |
| - <attribute name="b"> |
58 |
| - <ref name="color-channel"/> |
59 |
| - </attribute> |
| 53 | + <choice> |
| 54 | + <group> |
| 55 | + <attribute name="r"> |
| 56 | + <ref name="color-channel"/> |
| 57 | + </attribute> |
| 58 | + <attribute name="g"> |
| 59 | + <ref name="color-channel"/> |
| 60 | + </attribute> |
| 61 | + <attribute name="b"> |
| 62 | + <ref name="color-channel"/> |
| 63 | + </attribute> |
| 64 | + </group> |
| 65 | + <attribute name="hex"> |
| 66 | + <ref name="hex-color"/> |
| 67 | + </attribute> |
| 68 | + </choice> |
60 | 69 | <optional>
|
61 | 70 | <attribute name="a">
|
62 | 71 | <ref name="alpha-channel"/>
|
|
69 | 78 | <ref name="time-type"/>
|
70 | 79 | </attribute>
|
71 | 80 | </optional>
|
72 |
| - <optional> |
73 |
| - <attribute name="startopen"> |
74 |
| - <ref name="time-type"/> |
75 |
| - </attribute> |
76 |
| - </optional> |
77 | 81 | </choice>
|
78 | 82 | <interleave>
|
79 | 83 | <optional>
|
80 | 84 | <attribute name="end">
|
81 | 85 | <ref name="time-type"/>
|
82 | 86 | </attribute>
|
83 | 87 | </optional>
|
84 |
| - <optional> |
85 |
| - <attribute name="endopen"> |
86 |
| - <ref name="time-type"/> |
87 |
| - </attribute> |
88 |
| - </optional> |
89 | 88 | </interleave>
|
90 | 89 | </interleave>
|
91 | 90 | <optional>
|
|
114 | 113 | <ref name="time-type"/>
|
115 | 114 | </attribute>
|
116 | 115 | </optional>
|
117 |
| - <optional> |
118 |
| - <attribute name="startopen"> |
119 |
| - <ref name="time-type"/> |
120 |
| - </attribute> |
121 |
| - </optional> |
122 | 116 | </choice>
|
123 | 117 | <interleave>
|
124 | 118 | <optional>
|
125 | 119 | <attribute name="end">
|
126 | 120 | <ref name="time-type"/>
|
127 | 121 | </attribute>
|
128 | 122 | </optional>
|
129 |
| - <optional> |
130 |
| - <attribute name="endopen"> |
131 |
| - <ref name="time-type"/> |
132 |
| - </attribute> |
133 |
| - </optional> |
134 | 123 | </interleave>
|
135 | 124 | </interleave>
|
136 | 125 | <optional>
|
|
153 | 142 | <ref name="time-type"/>
|
154 | 143 | </attribute>
|
155 | 144 | </optional>
|
156 |
| - <optional> |
157 |
| - <attribute name="startopen"> |
158 |
| - <ref name="time-type"/> |
159 |
| - </attribute> |
160 |
| - </optional> |
161 | 145 | </choice>
|
162 | 146 | <interleave>
|
163 | 147 | <optional>
|
164 | 148 | <attribute name="end">
|
165 | 149 | <ref name="time-type"/>
|
166 | 150 | </attribute>
|
167 | 151 | </optional>
|
168 |
| - <optional> |
169 |
| - <attribute name="endopen"> |
170 |
| - <ref name="time-type"/> |
171 |
| - </attribute> |
172 |
| - </optional> |
173 | 152 | </interleave>
|
174 | 153 | </interleave>
|
175 | 154 | <optional>
|
|
192 | 171 | <ref name="time-type"/>
|
193 | 172 | </attribute>
|
194 | 173 | </optional>
|
195 |
| - <optional> |
196 |
| - <attribute name="startopen"> |
197 |
| - <ref name="time-type"/> |
198 |
| - </attribute> |
199 |
| - </optional> |
200 | 174 | </choice>
|
201 | 175 | <interleave>
|
202 | 176 | <optional>
|
203 | 177 | <attribute name="end">
|
204 | 178 | <ref name="time-type"/>
|
205 | 179 | </attribute>
|
206 | 180 | </optional>
|
207 |
| - <optional> |
208 |
| - <attribute name="endopen"> |
209 |
| - <ref name="time-type"/> |
210 |
| - </attribute> |
211 |
| - </optional> |
212 | 181 | </interleave>
|
213 | 182 | </interleave>
|
214 | 183 | <optional>
|
|
236 | 205 | <ref name="time-type"/>
|
237 | 206 | </attribute>
|
238 | 207 | </optional>
|
239 |
| - <optional> |
240 |
| - <attribute name="startopen"> |
241 |
| - <ref name="time-type"/> |
242 |
| - </attribute> |
243 |
| - </optional> |
244 | 208 | </choice>
|
245 | 209 | <interleave>
|
246 | 210 | <optional>
|
247 | 211 | <attribute name="end">
|
248 | 212 | <ref name="time-type"/>
|
249 | 213 | </attribute>
|
250 | 214 | </optional>
|
251 |
| - <optional> |
252 |
| - <attribute name="endopen"> |
253 |
| - <ref name="time-type"/> |
254 |
| - </attribute> |
255 |
| - </optional> |
256 | 215 | </interleave>
|
257 | 216 | </interleave>
|
258 | 217 | <optional>
|
|
275 | 234 | <ref name="time-type"/>
|
276 | 235 | </attribute>
|
277 | 236 | </optional>
|
278 |
| - <optional> |
279 |
| - <attribute name="startopen"> |
280 |
| - <ref name="time-type"/> |
281 |
| - </attribute> |
282 |
| - </optional> |
283 | 237 | </choice>
|
284 | 238 | <interleave>
|
285 | 239 | <optional>
|
286 | 240 | <attribute name="end">
|
287 | 241 | <ref name="time-type"/>
|
288 | 242 | </attribute>
|
289 | 243 | </optional>
|
290 |
| - <optional> |
291 |
| - <attribute name="endopen"> |
292 |
| - <ref name="time-type"/> |
293 |
| - </attribute> |
294 |
| - </optional> |
295 | 244 | </interleave>
|
296 | 245 | </interleave>
|
297 | 246 | <optional>
|
|
349 | 298 | <define name="space-point">
|
350 | 299 | <data type="float"/>
|
351 | 300 | </define>
|
| 301 | + <!-- new datatype --> |
| 302 | + <define name="hex-color"> |
| 303 | + <choice> |
| 304 | + <data type="hexBinary"> |
| 305 | + <param name="length">3</param> |
| 306 | + </data> |
| 307 | + <data type="string"> |
| 308 | + <param name="pattern">#[0-9a-fA-F]{6}</param> |
| 309 | + </data> |
| 310 | + </choice> |
| 311 | + </define> |
352 | 312 | </grammar>
|
0 commit comments