1 datatypes w = "http://whattf.org/datatype-draft"
3 # #####################################################################
4 ## RELAX NG Schema for HTML 5: Common Definitions #
5 # #####################################################################
8 # #####################################################################
9 ## Language Parameters - redefine in inclusion block as necessary #
10 # #####################################################################
12 ## HTML vs. XHTML restrictions
17 ## HTML 4 Compatibility - set to notAllowed to disallow markup introduced in HTML 5
18 # (This only affects mixed-version modules; wholly HTML5
19 # modules should simply be left out of the inclusion list.)
23 ## HTML Compatibility Switches - set to notAllowed to disallow
25 ## XML features that can't be roundtripped HTML <-> XHTML
26 # (xml:base on elements other than <html>)
27 nonRoundtrippable = empty
29 ## XML features that can't be serialized as HTML
32 ## features that are not part of the W3C HTML spec
35 # #####################################################################
37 # #####################################################################
39 ## Any attribute from any namespace
41 common.attr.anything =
44 ## Any element from any namespace
46 common.elem.anything =
47 element * { common.inner.anything & common.attr.anything }
49 ## Any content from any namespace
51 common.inner.anything =
53 & common.elem.anything*
56 # #####################################################################
57 ## Common Element Classes #
58 # #####################################################################
62 common.elem.metadata =
67 common.elem.phrasing =
73 ( common.elem.phrasing )
76 # #####################################################################
77 ## Common Content Models #
78 # #####################################################################
82 common.inner.metadata =
83 ( common.elem.metadata* )
87 common.inner.phrasing =
88 ( text & common.elem.phrasing* )
92 common.inner.transparent.flow =
93 ( text & common.elem.flow* )
102 # #####################################################################
103 ## Common Attributes #
104 # #####################################################################
106 # When updating, check <bdo> definition too
111 & common.attrs.present
117 & common.attrs.class?
118 & common.attrs.title?
120 & common.attrs.space?
137 common.attrs.xmlbase =
142 common.attrs.xmlspace
143 common.attrs.xmlspace =
144 attribute xml:space {
145 string "preserve" | string "default"
150 & common.attrs.language?
151 & common.attrs.translate?
155 w:string "ltr" | w:string "rtl" | w:string "auto"
157 # This lang definition is a hack for enviroments where
158 # the HTML5 parser maps lang to xml:lang.
159 # Sameness check left to Schematron
160 common.attrs.language =
161 ( common.attrs.xmllang?
168 common.attrs.xmllang =
172 # common.attrs.language =
173 # ( common.attrs.lang
174 # | common.attrs.xmllang
176 # common.attrs.lang =
178 # common.data.langcode
180 # common.attrs.xmllang =
181 # attribute xml:lang {
182 # common.data.langcode
184 common.attrs.translate =
185 attribute translate {
186 w:string "" | w:string "yes" | w:string "no"
189 common.attrs.present =
190 ( common.attrs.style?
191 & common.attrs.tabindex?
192 & common.attrs.accesskey?
198 common.attrs.tabindex =
202 # REVISIT move style to a module and bundle tabindex with ARIA
203 common.attrs.accesskey =
204 attribute accesskey {
205 common.data.keylabellist
211 # #####################################################################
212 ## Common Datatypes #
213 # #####################################################################
220 common.data.browsing-context =
223 common.data.browsing-context-or-keyword =
224 w:browsing-context-or-keyword
226 # pattern = "()|([^_].*)|(_[bB][lL][aA][nN][kK])|(_[sS][eE][lL][fF])|(_[pP][aA][rR][eE][nN][tT])|(_[tT][oO][pP])"
247 common.data.hash-name =
255 common.data.integer =
258 # pattern = "-?[0-9]+"
261 common.data.integer.positive =
264 # pattern = "0*[1-9][0-9]*"
267 common.data.integer.non-negative =
268 w:integer-non-negative
273 # common.data.percent =
275 # pattern = "(100)|([1-9]?[0-9](\.[0-9]+)?)%"
281 # pattern = "-?[0-9]+(\.[0-9]+)?([eE]-?[0-9]+)?"
284 common.data.float.positive =
287 # pattern = "(0*[1-9][0-9]*(\.[0-9]+)?)|([0-9]+(\.0*[1-9][0-9]*)?)([eE]-?[0-9]+)?"
290 common.data.float.non-negative =
293 # pattern = "[0-9]+(\.[0-9]+)?([eE]-?[0-9]+)?"
298 common.data.datetime =
301 common.data.date-or-time =
307 common.data.time-datetime =
313 # allow either a non-empty IRI ref or zero or more HTML
314 # space characters (which are: space, tab, LF, FF, CR)
317 pattern = "[ \x{0A}-\x{0D}]*"
318 # NOTE The range above incorrectly allows U+000B
319 # in addition to the HTML space characters; but
320 # that's not a problem in practice because HTML
321 # and XML parsers will both catch any U+000B
322 # and report an error for it before that pattern
323 # ever gets evaluated.
327 common.data.uri.non-empty =
333 common.data.uri.absolute =
336 ## <link type='icon'> sizes
342 pattern = "[1-9][0-9]*x[1-9][0-9]*"
348 common.data.mimetype =
353 common.data.charset =
356 common.data.meta-charset =
361 common.data.refresh =
366 common.data.default-style =
372 common.data.x-ua-compatible =
377 common.data.mediaquery =
382 common.data.langcode =
383 w:string "" | w:language
385 ## List of Key Labels
386 common.data.keylabellist =
389 ## List of Source Sizes
390 common.data.source.size.list =
393 ## Subresource Integrity
394 common.data.integrity =
397 ## Content Security Policy
398 common.data.content-security-policy =
399 w:content-security-policy
401 ## List of sandbox keywords
402 common.data.sandbox-allow-list =
403 w:string "" | w:sandbox-allow-list
405 ## Microdata Properties
406 common.data.microdata-properties =
407 list { w:microdata-property+ }
413 ## ECMAScript FunctionBody
414 common.data.functionbody =
417 # #####################################################################
419 # #####################################################################
421 common-form.attrs.form = ( notAllowed )
423 # #####################################################################
424 ## Script-supporting elements
425 # #####################################################################
427 common.elem.script-supporting = ( notAllowed )
429 # #####################################################################
430 ## ARIA Module Hooks #
431 # #####################################################################
433 common.attrs.aria = ( notAllowed )
434 common.attrs.aria.role.alert = ( notAllowed )
435 common.attrs.aria.role.alertdialog = ( notAllowed )
436 common.attrs.aria.role.application = ( notAllowed )
437 common.attrs.aria.role.article = ( notAllowed )
438 common.attrs.aria.role.banner = ( notAllowed )
439 common.attrs.aria.role.button = ( notAllowed )
440 common.attrs.aria.role.checkbox = ( notAllowed )
441 common.attrs.aria.role.combobox = ( notAllowed )
442 common.attrs.aria.role.complementary = ( notAllowed )
443 common.attrs.aria.role.contentinfo = ( notAllowed )
444 common.attrs.aria.role.dialog = ( notAllowed )
445 common.attrs.aria.role.directory = ( notAllowed )
446 common.attrs.aria.role.document = ( notAllowed )
447 common.attrs.aria.role.group = ( notAllowed )
448 common.attrs.aria.role.heading = ( notAllowed )
449 common.attrs.aria.role.img = ( notAllowed )
450 common.attrs.aria.role.link = ( notAllowed )
451 common.attrs.aria.role.list = ( notAllowed )
452 common.attrs.aria.role.listitem = ( notAllowed )
453 common.attrs.aria.role.log = ( notAllowed )
454 common.attrs.aria.role.listbox = ( notAllowed )
455 common.attrs.aria.role.main = ( notAllowed )
456 common.attrs.aria.role.marquee = ( notAllowed )
457 common.attrs.aria.role.menu = ( notAllowed )
458 common.attrs.aria.role.menubar = ( notAllowed )
459 common.attrs.aria.role.menuitem = ( notAllowed )
460 common.attrs.aria.role.menuitemcheckbox = ( notAllowed )
461 common.attrs.aria.role.menuitemradio = ( notAllowed )
462 common.attrs.aria.role.note = ( notAllowed )
463 common.attrs.aria.role.option = ( notAllowed )
464 common.attrs.aria.role.presentation = ( notAllowed )
465 common.attrs.aria.role.progressbar = ( notAllowed )
466 common.attrs.aria.role.radio = ( notAllowed )
467 common.attrs.aria.role.region = ( notAllowed )
468 common.attrs.aria.role.search = ( notAllowed )
469 common.attrs.aria.role.separator = ( notAllowed )
470 common.attrs.aria.role.slider = ( notAllowed )
471 common.attrs.aria.role.spinbutton = ( notAllowed )
472 common.attrs.aria.role.status = ( notAllowed )
473 common.attrs.aria.role.switch = ( notAllowed )
474 common.attrs.aria.role.tab = ( notAllowed )
475 common.attrs.aria.role.tablist = ( notAllowed )
476 common.attrs.aria.role.tabpanel = ( notAllowed )
477 common.attrs.aria.role.textbox = ( notAllowed )
478 common.attrs.aria.role.toolbar = ( notAllowed )
479 common.attrs.aria.role.tree = ( notAllowed )
480 common.attrs.aria.role.treeitem = ( notAllowed )
481 common.attrs.aria.implicit.article = ( notAllowed )
482 common.attrs.aria.implicit.banner = ( notAllowed )
483 common.attrs.aria.implicit.button = ( notAllowed )
484 common.attrs.aria.implicit.checkbox = ( notAllowed )
485 common.attrs.aria.implicit.column-or-row-header = ( notAllowed )
486 common.attrs.aria.implicit.combobox = ( notAllowed )
487 common.attrs.aria.implicit.complementary = ( notAllowed )
488 common.attrs.aria.implicit.contentinfo = ( notAllowed )
489 common.attrs.aria.implicit.dialog = ( notAllowed )
490 common.attrs.aria.implicit.document = ( notAllowed )
491 common.attrs.aria.implicit.form = ( notAllowed )
492 common.attrs.aria.implicit.group = ( notAllowed )
493 common.attrs.aria.implicit.heading = ( notAllowed )
494 common.attrs.aria.implicit.img = ( notAllowed )
495 common.attrs.aria.implicit.landmark = ( notAllowed )
496 common.attrs.aria.implicit.link = ( notAllowed )
497 common.attrs.aria.implicit.list = ( notAllowed )
498 common.attrs.aria.implicit.listbox = ( notAllowed )
499 common.attrs.aria.implicit.listitem = ( notAllowed )
500 common.attrs.aria.implicit.main = ( notAllowed )
501 common.attrs.aria.implicit.navigation = ( notAllowed )
502 common.attrs.aria.implicit.option = ( notAllowed )
503 common.attrs.aria.implicit.progressbar = ( notAllowed )
504 common.attrs.aria.implicit.radio = ( notAllowed )
505 common.attrs.aria.implicit.region = ( notAllowed )
506 common.attrs.aria.implicit.section = ( notAllowed )
507 common.attrs.aria.implicit.select = ( notAllowed )
508 common.attrs.aria.implicit.slider = ( notAllowed )
509 common.attrs.aria.implicit.spinbutton = ( notAllowed )
510 common.attrs.aria.implicit.status = ( notAllowed )
511 common.attrs.aria.implicit.structure = ( notAllowed )
512 common.attrs.aria.implicit.textbox = ( notAllowed )
513 common.attrs.aria.implicit.toolbar = ( notAllowed )
514 common.attrs.aria.prop.readonly = ( notAllowed )
515 common.attrs.aria.landmark.application = ( notAllowed )
516 common.attrs.aria.landmark.banner = ( notAllowed )
517 common.attrs.aria.landmark.complementary = ( notAllowed )
518 common.attrs.aria.landmark.contentinfo = ( notAllowed )
519 common.attrs.aria.landmark.form = ( notAllowed )
520 common.attrs.aria.landmark.main = ( notAllowed )
521 common.attrs.aria.landmark.navigation = ( notAllowed )
522 common.attrs.aria.landmark.search = ( notAllowed )
523 # per ARIA spec: article, document, and note are not actually landmarks
524 common.attrs.aria.landmark.article = ( notAllowed )
525 common.attrs.aria.landmark.document = ( notAllowed )
526 common.attrs.aria.landmark.note = ( notAllowed )