X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/9ac55abceb5888cca4942380ffddef1aab6275fc..07bcdb8deee88ab740108cb7ff6bd9f75b5d349f:/packages/html5-schema/meta.rnc diff --git a/packages/html5-schema/meta.rnc b/packages/html5-schema/meta.rnc new file mode 100644 index 000000000..ff67c2d4e --- /dev/null +++ b/packages/html5-schema/meta.rnc @@ -0,0 +1,424 @@ +datatypes w = "http://whattf.org/datatype-draft" + +# ##################################################################### +## RELAX NG Schema for HTML 5: Global Structure & Metadata # +# ##################################################################### + +## Root Element: + + html.elem = + element html { html.inner & html.attrs } + html.attrs = + ( common.attrs + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) + html.inner = + ( head.elem + , body.elem + ) + +## Metadata Container:
+ + head.elem = + element head { head.inner & head.attrs } + head.attrs = + ( common.attrs +# & head.attrs.profile? + & ( common.attrs.aria.role.presentation + | common.attrs.aria.role.menuitem + )? + ) +# head.attrs.profile = +# attribute profile { +# common.data.uris #REVISIT should these be absolute (zero or more) +# } + head.inner = + ( title.elem + & base.elem? # REVISIT need a non-schema checker or Schematron + & common.inner.metadata # Limit encoding decl position in Schematron + ) +# head.inner = +# ( meta.elem.encoding? +# , ( title.elem +# & base.elem? # REVISIT need a non-schema checker or Schematron +# & common.inner.metadata +# ) +# ) + +## Content Container: + + body.elem = + element body { body.inner & body.attrs } + body.attrs = + ( common.attrs + & ( common.attrs.aria.landmark.application + | common.attrs.aria.landmark.document + | common.attrs.aria.role.presentation + | common.attrs.aria.implicit.document + )? + & body.attrs.onafterprint? + & body.attrs.onbeforeprint? + & body.attrs.onbeforeunload? + & body.attrs.onhashchange? + & body.attrs.onmessage? + & body.attrs.onoffline? + & body.attrs.ononline? + & body.attrs.onpagehide? + & body.attrs.onpageshow? + & body.attrs.onpopstate? + & body.attrs.onstorage? + & body.attrs.onunload? + ) + body.inner = + ( common.inner.flow ) + + body.attrs.onafterprint = + attribute onafterprint { common.data.functionbody } + body.attrs.onbeforeprint = + attribute onbeforeprint { common.data.functionbody } + body.attrs.onbeforeunload = + attribute onbeforeunload { common.data.functionbody } + body.attrs.onhashchange = + attribute onhashchange { common.data.functionbody } + body.attrs.onmessage = + attribute onmessage { common.data.functionbody } + body.attrs.onoffline = + attribute onoffline { common.data.functionbody } + body.attrs.ononline = + attribute ononline { common.data.functionbody } + body.attrs.onpopstate = + attribute onpopstate { common.data.functionbody } + body.attrs.onpagehide = + attribute onpagehide { common.data.functionbody } + body.attrs.onpageshow = + attribute onpageshow { common.data.functionbody } + body.attrs.onredo = + attribute onredo { common.data.functionbody } + body.attrs.onresize = + attribute onresize { common.data.functionbody } + body.attrs.onstorage = + attribute onstorage { common.data.functionbody } + body.attrs.onundo = + attribute onundo { common.data.functionbody } + body.attrs.onunload = + attribute onunload { common.data.functionbody } + +## Document Title: