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
173 | onautocompleteerror
279 | its-term-confidence
287 | its-locale-filter-list
288 | its-locale-filter-type
302 | its-provenance-records-ref
303 | its-loc-quality-issues-ref
304 | its-loc-quality-issue-type
305 | its-loc-quality-issue-comment
306 | its-loc-quality-issue-severity
307 | its-loc-quality-issue-profile-ref
308 | its-loc-quality-issue-enabled
309 | its-loc-quality-rating-score
310 | its-loc-quality-rating-vote
311 | its-loc-quality-rating-score-threshold
312 | its-loc-quality-rating-vote-threshold
313 | its-loc-quality-rating-profile-ref
315 | its-allowed-characters
317 | its-storage-encoding
318 | its-line-break-type
327 common.elem.phrasing |= embed.elem
329 ## Generic Objects: <object>
332 element object { object.inner.flow & object.attrs }
333 object.elem.phrasing =
334 element object { object.inner.phrasing & object.attrs }
337 & ( ( object.attrs.data
342 & object.attrs.typemustmatch?
343 # & object.attrs.classid?
344 # & object.attrs.codebase?
345 # & object.attrs.codetype?
346 & object.attrs.height?
347 & object.attrs.width?
348 & object.attrs.usemap?
350 & common-form.attrs.form?
351 & ( common.attrs.aria.landmark.application
352 | common.attrs.aria.landmark.document
353 | common.attrs.aria.role.img
354 | common.attrs.aria.role.presentation
359 common.data.uri.non-empty
365 object.attrs.typemustmatch =
366 attribute typemustmatch {
367 w:string "typemustmatch" | w:string ""
369 object.attrs.height =
371 common.data.integer.non-negative
375 common.data.integer.non-negative
377 object.attrs.usemap =
379 common.data.hash-name
383 common.data.browsing-context
387 , common.inner.transparent.flow
389 object.inner.phrasing =
391 , common.inner.phrasing
394 common.elem.flow |= object.elem.flow
395 common.elem.phrasing |= object.elem.phrasing
397 ## Initialization Parameters: <param>
400 element param { param.inner & param.attrs }
405 & ( common.attrs.aria.role.presentation
406 | common.attrs.aria.role.menuitem
420 ## Inline Frame: <iframe>
423 element iframe { iframe.inner & iframe.attrs }
427 & iframe.attrs.srcdoc?
429 & iframe.attrs.width?
430 & iframe.attrs.height?
431 & iframe.attrs.sandbox?
432 & iframe.attrs.seamless?
433 & iframe.attrs.allowfullscreen?
434 & ( common.attrs.aria.landmark.application
435 | common.attrs.aria.landmark.document
436 | common.attrs.aria.role.img
437 | common.attrs.aria.role.presentation
442 common.data.uri.non-empty
444 iframe.attrs.srcdoc =
450 common.data.browsing-context
452 iframe.attrs.height =
454 common.data.integer.non-negative
458 common.data.integer.non-negative
460 iframe.attrs.seamless =
462 w:string "seamless" | w:string ""
464 iframe.attrs.sandbox =
466 common.data.sandbox-allow-list
468 iframe.attrs.allowfullscreen =
469 attribute allowfullscreen {
470 w:string "allowfullscreen" | w:string ""
473 ( ( text & HTMLonly ) | empty )
475 common.elem.phrasing |= iframe.elem
477 #######################################################################
480 ## Map Definition: <map>
483 element map { map.inner.flow & map.attrs }
485 element map { map.inner.phrasing & map.attrs }
489 & ( common.attrs.aria.role.presentation
490 | common.attrs.aria.role.menuitem
492 ) # REVISIT make id required in Schematron
498 ( common.inner.transparent.flow )
500 ( common.inner.phrasing )
502 common.elem.flow |= map.elem.flow
503 common.elem.phrasing |= map.elem.phrasing
505 ## Map Area Definition: <area>
508 element area { area.inner & area.attrs }
512 & common.attrs.present
514 & shared-hyperlink.attrs.download?
516 & shared-hyperlink.attrs.href
518 & shared-hyperlink.attrs.target?
519 & shared-hyperlink.attrs.ping?
520 & shared-hyperlink.attrs.rel?
521 & shared-hyperlink.attrs.hreflang?
522 & shared-hyperlink.attrs.type?
524 & ( common.attrs.aria.role.link
525 | common.attrs.aria.role.presentation
526 | common.attrs.aria.role.menuitem
534 ( ( area.attrs.shape.rect? & area.attrs.coords.rect )
535 | ( area.attrs.shape.circle & area.attrs.coords.circle )
536 | ( area.attrs.shape.poly & area.attrs.coords.poly )
537 | ( area.attrs.shape.default )
539 area.attrs.shape.rect =
543 area.attrs.coords.rect =
547 # pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+"
550 area.attrs.shape.circle =
554 area.attrs.coords.circle =
558 # pattern = "-?[0-9]+,-?[0-9]+,[0-9]+"
561 area.attrs.shape.poly =
565 area.attrs.coords.poly =
569 # pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+(,-?[0-9]+,-?[0-9]+)*"
572 area.attrs.shape.default =
579 common.elem.phrasing |= area.elem
581 ## Attributes Common to Embedded Content
583 embedded.content.attrs.crossorigin =
584 attribute crossorigin {
585 w:string "anonymous" | w:string "use-credentials" | w:string ""