1 datatypes w = "http://whattf.org/datatype-draft"
4 # #####################################################################
5 ## RELAX NG Schema for HTML 5: Embedded Content #
6 # #####################################################################
8 #######################################################################
14 element img { img.inner & img.attrs }
20 & img.attrs.alt? # ARIA: if alt empty, only allowed role value is "presentation"; check in assertions
25 & img.attrs.border? # obsolete
26 & embedded.content.attrs.crossorigin?
27 & ( common.attrs.aria.implicit.img
33 common.data.uri.non-empty
41 common.data.source.size.list
49 common.data.integer.non-negative
53 common.data.integer.non-negative
61 w:string "ismap" | w:string ""
70 common.elem.phrasing |= img.elem
72 ## Image with multiple sources: <picture>
75 element picture { picture.inner & picture.attrs }
80 ( ( source.picture.elem*
81 & common.elem.script-supporting*
84 & common.elem.script-supporting*
88 common.elem.phrasing |= picture.elem
90 ## Picture source: <source srcset>
93 element source { source.picture.inner & source.picture.attrs }
94 source.picture.attrs =
96 & source.picture.attrs.media?
97 & source.picture.attrs.srcset
98 & source.picture.attrs.sizes?
99 & source.picture.attrs.type?
101 source.picture.attrs.media =
103 common.data.mediaquery
105 source.picture.attrs.srcset =
109 source.picture.attrs.sizes =
111 common.data.source.size.list
113 source.picture.attrs.type =
117 source.picture.inner =
123 element embed { embed.inner & embed.attrs }
128 & embed.attrs.height?
131 & ( common.attrs.aria.landmark.application
132 | common.attrs.aria.landmark.document
133 | common.attrs.aria.role.img
134 | common.attrs.aria.role.presentation
139 common.data.uri.non-empty
147 common.data.integer.non-negative
151 common.data.integer.non-negative
153 embed.attrs.other = # REVISIT common.attrs
154 attribute local:* - ( src
282 | its-term-confidence
290 | its-locale-filter-list
291 | its-locale-filter-type
305 | its-provenance-records-ref
306 | its-loc-quality-issues-ref
307 | its-loc-quality-issue-type
308 | its-loc-quality-issue-comment
309 | its-loc-quality-issue-severity
310 | its-loc-quality-issue-profile-ref
311 | its-loc-quality-issue-enabled
312 | its-loc-quality-rating-score
313 | its-loc-quality-rating-vote
314 | its-loc-quality-rating-score-threshold
315 | its-loc-quality-rating-vote-threshold
316 | its-loc-quality-rating-profile-ref
318 | its-allowed-characters
320 | its-storage-encoding
321 | its-line-break-type
330 common.elem.phrasing |= embed.elem
332 ## Generic Objects: <object>
335 element object { object.inner.flow & object.attrs }
336 object.elem.phrasing =
337 element object { object.inner.phrasing & object.attrs }
340 & ( ( object.attrs.data
345 & object.attrs.typemustmatch?
346 # & object.attrs.classid?
347 # & object.attrs.codebase?
348 # & object.attrs.codetype?
349 & object.attrs.height?
350 & object.attrs.width?
351 & object.attrs.usemap?
353 & common-form.attrs.form?
354 & ( common.attrs.aria.landmark.application
355 | common.attrs.aria.landmark.document
356 | common.attrs.aria.role.img
357 | common.attrs.aria.role.presentation
362 common.data.uri.non-empty
368 object.attrs.typemustmatch =
369 attribute typemustmatch {
370 w:string "typemustmatch" | w:string ""
372 object.attrs.height =
374 common.data.integer.non-negative
378 common.data.integer.non-negative
380 object.attrs.usemap =
382 common.data.hash-name
386 common.data.browsing-context
390 , common.inner.transparent.flow
392 object.inner.phrasing =
394 , common.inner.phrasing
397 common.elem.flow |= object.elem.flow
398 common.elem.phrasing |= object.elem.phrasing
400 ## Initialization Parameters: <param>
403 element param { param.inner & param.attrs }
408 & ( common.attrs.aria.role.presentation
409 | common.attrs.aria.role.menuitem
423 ## Inline Frame: <iframe>
426 element iframe { iframe.inner & iframe.attrs }
430 & iframe.attrs.srcdoc?
432 & iframe.attrs.width?
433 & iframe.attrs.height?
434 & iframe.attrs.sandbox?
435 & iframe.attrs.seamless?
436 & iframe.attrs.allowfullscreen?
437 & ( common.attrs.aria.landmark.application
438 | common.attrs.aria.landmark.document
439 | common.attrs.aria.role.img
440 | common.attrs.aria.role.presentation
445 common.data.uri.non-empty
447 iframe.attrs.srcdoc =
453 common.data.browsing-context
455 iframe.attrs.height =
457 common.data.integer.non-negative
461 common.data.integer.non-negative
463 iframe.attrs.seamless =
465 w:string "seamless" | w:string ""
467 iframe.attrs.sandbox =
470 { ( w:string "allow-top-navigation" )?
471 , ( w:string "allow-same-origin" )?
472 , ( w:string "allow-forms" )?
473 , ( w:string "allow-scripts" )?
476 { ( w:string "allow-top-navigation" )?
477 , ( w:string "allow-same-origin" )?
478 , ( w:string "allow-scripts" )?
479 , ( w:string "allow-forms" )?
482 { ( w:string "allow-top-navigation" )?
483 , ( w:string "allow-forms" )?
484 , ( w:string "allow-same-origin" )?
485 , ( w:string "allow-scripts" )?
488 { ( w:string "allow-top-navigation" )?
489 , ( w:string "allow-forms" )?
490 , ( w:string "allow-scripts" )?
491 , ( w:string "allow-same-origin" )?
494 { ( w:string "allow-top-navigation" )?
495 , ( w:string "allow-scripts" )?
496 , ( w:string "allow-same-origin" )?
497 , ( w:string "allow-forms" )?
500 { ( w:string "allow-top-navigation" )?
501 , ( w:string "allow-scripts" )?
502 , ( w:string "allow-forms" )?
503 , ( w:string "allow-same-origin" )?
506 { ( w:string "allow-same-origin" )?
507 , ( w:string "allow-top-navigation" )?
508 , ( w:string "allow-forms" )?
509 , ( w:string "allow-scripts" )?
512 { ( w:string "allow-same-origin" )?
513 , ( w:string "allow-top-navigation" )?
514 , ( w:string "allow-scripts" )?
515 , ( w:string "allow-forms" )?
518 { ( w:string "allow-forms" )?
519 , ( w:string "allow-top-navigation" )?
520 , ( w:string "allow-same-origin" )?
521 , ( w:string "allow-scripts" )?
524 { ( w:string "allow-forms" )?
525 , ( w:string "allow-top-navigation" )?
526 , ( w:string "allow-scripts" )?
527 , ( w:string "allow-same-origin" )?
530 { ( w:string "allow-scripts" )?
531 , ( w:string "allow-top-navigation" )?
532 , ( w:string "allow-same-origin" )?
533 , ( w:string "allow-forms" )?
536 { ( w:string "allow-scripts" )?
537 , ( w:string "allow-top-navigation" )?
538 , ( w:string "allow-forms" )?
539 , ( w:string "allow-same-origin" )?
542 { ( w:string "allow-same-origin" )?
543 , ( w:string "allow-forms" )?
544 , ( w:string "allow-top-navigation" )?
545 , ( w:string "allow-scripts" )?
548 { ( w:string "allow-same-origin" )?
549 , ( w:string "allow-scripts" )?
550 , ( w:string "allow-top-navigation" )?
551 , ( w:string "allow-forms" )?
554 { ( w:string "allow-forms" )?
555 , ( w:string "allow-same-origin" )?
556 , ( w:string "allow-top-navigation" )?
557 , ( w:string "allow-scripts" )?
560 { ( w:string "allow-forms" )?
561 , ( w:string "allow-scripts" )?
562 , ( w:string "allow-top-navigation" )?
563 , ( w:string "allow-same-origin" )?
566 { ( w:string "allow-scripts" )?
567 , ( w:string "allow-same-origin" )?
568 , ( w:string "allow-top-navigation" )?
569 , ( w:string "allow-forms" )?
572 { ( w:string "allow-scripts" )?
573 , ( w:string "allow-forms" )?
574 , ( w:string "allow-top-navigation" )?
575 , ( w:string "allow-same-origin" )?
578 { ( w:string "allow-same-origin" )?
579 , ( w:string "allow-forms" )?
580 , ( w:string "allow-scripts" )?
581 , ( w:string "allow-top-navigation" )?
584 { ( w:string "allow-same-origin" )?
585 , ( w:string "allow-scripts" )?
586 , ( w:string "allow-forms" )?
587 , ( w:string "allow-top-navigation" )?
590 { ( w:string "allow-forms" )?
591 , ( w:string "allow-same-origin" )?
592 , ( w:string "allow-scripts" )?
593 , ( w:string "allow-top-navigation" )?
596 { ( w:string "allow-forms" )?
597 , ( w:string "allow-scripts" )?
598 , ( w:string "allow-same-origin" )?
599 , ( w:string "allow-top-navigation" )?
602 { ( w:string "allow-scripts" )?
603 , ( w:string "allow-same-origin" )?
604 , ( w:string "allow-forms" )?
605 , ( w:string "allow-top-navigation" )?
608 { ( w:string "allow-scripts" )?
609 , ( w:string "allow-forms" )?
610 , ( w:string "allow-same-origin" )?
611 , ( w:string "allow-top-navigation" )?
614 iframe.attrs.allowfullscreen =
615 attribute allowfullscreen {
616 w:string "allowfullscreen" | w:string ""
619 ( ( text & HTMLonly ) | empty )
621 common.elem.phrasing |= iframe.elem
623 #######################################################################
626 ## Map Definition: <map>
629 element map { map.inner.flow & map.attrs }
631 element map { map.inner.phrasing & map.attrs }
635 & ( common.attrs.aria.role.presentation
636 | common.attrs.aria.role.menuitem
638 ) # REVISIT make id required in Schematron
644 ( common.inner.transparent.flow )
646 ( common.inner.phrasing )
648 common.elem.flow |= map.elem.flow
649 common.elem.phrasing |= map.elem.phrasing
651 ## Map Area Definition: <area>
654 element area { area.inner & area.attrs }
658 & common.attrs.present
660 & shared-hyperlink.attrs.download?
662 & shared-hyperlink.attrs.href
664 & shared-hyperlink.attrs.target?
665 & shared-hyperlink.attrs.ping?
666 & shared-hyperlink.attrs.rel?
667 & shared-hyperlink.attrs.hreflang?
668 & shared-hyperlink.attrs.type?
670 & ( common.attrs.aria.role.link
671 | common.attrs.aria.role.presentation
672 | common.attrs.aria.role.menuitem
680 ( ( area.attrs.shape.rect? & area.attrs.coords.rect )
681 | ( area.attrs.shape.circle & area.attrs.coords.circle )
682 | ( area.attrs.shape.poly & area.attrs.coords.poly )
683 | ( area.attrs.shape.default )
685 area.attrs.shape.rect =
689 area.attrs.coords.rect =
693 # pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+"
696 area.attrs.shape.circle =
700 area.attrs.coords.circle =
704 # pattern = "-?[0-9]+,-?[0-9]+,[0-9]+"
707 area.attrs.shape.poly =
711 area.attrs.coords.poly =
715 # pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+(,-?[0-9]+,-?[0-9]+)*"
718 area.attrs.shape.default =
725 common.elem.phrasing |= area.elem
727 ## Attributes Common to Embedded Content
729 embedded.content.attrs.crossorigin =
730 attribute crossorigin {
731 w:string "anonymous" | w:string "use-credentials" | w:string ""