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 =
469 common.data.sandbox-allow-list
471 iframe.attrs.allowfullscreen =
472 attribute allowfullscreen {
473 w:string "allowfullscreen" | w:string ""
476 ( ( text & HTMLonly ) | empty )
478 common.elem.phrasing |= iframe.elem
480 #######################################################################
483 ## Map Definition: <map>
486 element map { map.inner.flow & map.attrs }
488 element map { map.inner.phrasing & map.attrs }
492 & ( common.attrs.aria.role.presentation
493 | common.attrs.aria.role.menuitem
495 ) # REVISIT make id required in Schematron
501 ( common.inner.transparent.flow )
503 ( common.inner.phrasing )
505 common.elem.flow |= map.elem.flow
506 common.elem.phrasing |= map.elem.phrasing
508 ## Map Area Definition: <area>
511 element area { area.inner & area.attrs }
515 & common.attrs.present
517 & shared-hyperlink.attrs.download?
519 & shared-hyperlink.attrs.href
521 & shared-hyperlink.attrs.target?
522 & shared-hyperlink.attrs.ping?
523 & shared-hyperlink.attrs.rel?
524 & shared-hyperlink.attrs.hreflang?
525 & shared-hyperlink.attrs.type?
527 & ( common.attrs.aria.role.link
528 | common.attrs.aria.role.presentation
529 | common.attrs.aria.role.menuitem
537 ( ( area.attrs.shape.rect? & area.attrs.coords.rect )
538 | ( area.attrs.shape.circle & area.attrs.coords.circle )
539 | ( area.attrs.shape.poly & area.attrs.coords.poly )
540 | ( area.attrs.shape.default )
542 area.attrs.shape.rect =
546 area.attrs.coords.rect =
550 # pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+"
553 area.attrs.shape.circle =
557 area.attrs.coords.circle =
561 # pattern = "-?[0-9]+,-?[0-9]+,[0-9]+"
564 area.attrs.shape.poly =
568 area.attrs.coords.poly =
572 # pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+(,-?[0-9]+,-?[0-9]+)*"
575 area.attrs.shape.default =
582 common.elem.phrasing |= area.elem
584 ## Attributes Common to Embedded Content
586 embedded.content.attrs.crossorigin =
587 attribute crossorigin {
588 w:string "anonymous" | w:string "use-credentials" | w:string ""