From 4c6420f190a49c3d2f58a382e65ef5d0bca54649 Mon Sep 17 00:00:00 2001 From: Romain Deltour Date: Wed, 9 Jan 2019 11:31:29 +0100 Subject: [PATCH] feat: update XHTML, SVG and MathML schemas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a major schema update, to reuse the latest schemas from the Nu Html Checker, with the following tweaks: - adapt the integration in schema drivers - replace the Nu Html Checker's pluggable datatype library with EPUBCheck’s more limited static RelaxNG datatypes - add EPUB-specific content model extensions Changes specific to XHTML: - keep allowing missing `title` in the `head` element - but report missing `title` as a WARNING (with a Schematron check) - keep allowing `meta http-equiv` in encoding declaration state (allowed in W3C but forbidden in WHATWG's HTML standard) - keep allowing the `border` attribute on `table` elements (allowed in W3C but forbidden in WHATWG's HTML standard) - report `aria-describedat` as a schema error - add tests for several obsolete features which appeared in previous test content (`time/@pubdate`, `iframe/@seamless`, `keygen`, `menu`, `dropzone`, `contextmenu`, in-body `style`, `style/@scoped`) Changes specific to MathML: - use the schemas from Nu Html Checker, which are based on older MathML schema but bring some specific tweaks. - re-add the changes from the newer MathML 3.0 (2nd edition) schemas - improve the schema checks of EPUB-specific `annotation-xml` restrictions (notably check the combination of the `name` and `encoding` attributes) Changes specific to SVG: - use the schemas from Nu Html Checker, which are based SVG 1.1 Changes specific to Navigation Documents: - do not check the presence of mandatory headings on `nav` elements with no `epub:type` attribute Fixes #892 Fixes #779 Fixes #896 Fixes (partially?) #893 Closes #448 --- .../adobe/epubcheck/schema/30/epub-nav-30.rnc | 34 +- .../adobe/epubcheck/schema/30/epub-nav-30.sch | 2 +- .../adobe/epubcheck/schema/30/epub-svg-30.rnc | 18 +- .../epubcheck/schema/30/epub-xhtml-30.rnc | 42 +- .../epubcheck/schema/30/epub-xhtml-30.sch | 51 +- .../epubcheck/schema/30/epub30-catalog.xml | 466 +- .../epubcheck/schema/30/idx/idx-xhtml.sch | 2 +- .../schema/30/mod/epub-mathml3-30.rnc | 74 - .../epubcheck/schema/30/mod/epub-mathml3.rnc | 101 + .../schema/30/mod/epub-prefix-attr.rnc | 2 +- .../schema/30/mod/epub-ssml-attrs.rnc | 2 +- .../epubcheck/schema/30/mod/epub-svg11-30.rnc | 296 -- .../epubcheck/schema/30/mod/epub-svg11.rnc | 39 + .../epubcheck/schema/30/mod/epub-switch.rnc | 20 +- .../epubcheck/schema/30/mod/epub-trigger.rnc | 6 +- .../schema/30/mod/epub-type-attr.rnc | 10 +- .../schema/30/mod/epub-xhtml-mathml3-30.rnc | 5 - .../schema/30/mod/epub-xhtml-mathml3.rnc | 5 + .../schema/30/mod/epub-xhtml-svg11-30.rnc | 6 - .../schema/30/mod/epub-xhtml-svg11.rnc | 39 + .../epubcheck/schema/30/mod/epub-xhtml.rnc | 115 + .../epubcheck/schema/30/mod/html5/LICENSE | 6 +- .../epubcheck/schema/30/mod/html5/README | 21 +- .../schema/30/mod/html5/applications.rnc | 236 + .../epubcheck/schema/30/mod/html5/aria.rnc | 1724 +++++++ .../schema/30/mod/html5/assertions.sch | 1235 +++++ .../epubcheck/schema/30/mod/html5/block.rnc | 279 ++ .../epubcheck/schema/30/mod/html5/common.rnc | 596 +++ .../schema/30/mod/html5/core-scripting.rnc | 388 ++ .../epubcheck/schema/30/mod/html5/data.rnc | 98 + .../epubcheck/schema/30/mod/html5/embed.rnc | 609 +++ .../schema/30/mod/html5/form-datatypes.rnc | 59 + .../schema/30/mod/html5/html5-aria-30.rnc | 106 - .../schema/30/mod/html5/html5-attrib-30.rnc | 44 - .../schema/30/mod/html5/html5-document-30.rnc | 45 - .../schema/30/mod/html5/html5-edit-30.rnc | 24 - .../schema/30/mod/html5/html5-embed-30.rnc | 156 - .../schema/30/mod/html5/html5-forms-30.rnc | 431 -- .../schema/30/mod/html5/html5-grouping-30.rnc | 115 - .../30/mod/html5/html5-interactive-30.rnc | 86 - .../schema/30/mod/html5/html5-md.rnc | 56 - .../schema/30/mod/html5/html5-models-30.rnc | 10 - .../schema/30/mod/html5/html5-phrasing-30.rnc | 134 - .../schema/30/mod/html5/html5-rdfa.rnc | 218 - .../schema/30/mod/html5/html5-script-30.rnc | 164 - .../schema/30/mod/html5/html5-sections-30.rnc | 62 - .../schema/30/mod/html5/html5-style-30.rnc | 18 - .../epubcheck/schema/30/mod/html5/html5.rnc | 59 + .../schema/30/mod/html5/html5exclusions.rnc | 63 + .../epubcheck/schema/30/mod/html5/media.rnc | 213 + .../epubcheck/schema/30/mod/html5/meta.rnc | 455 ++ .../schema/30/mod/html5/microdata.rnc | 100 + .../epubcheck/schema/30/mod/html5/phrase.rnc | 409 ++ .../epubcheck/schema/30/mod/html5/rdfa.rnc | 292 ++ .../schema/30/mod/html5/revision.rnc | 54 + .../epubcheck/schema/30/mod/html5/ruby.rnc | 80 + .../schema/30/mod/html5/sectional.rnc | 176 + .../schema/30/mod/html5/structural.rnc | 176 + .../epubcheck/schema/30/mod/html5/tables.rnc | 244 + .../schema/30/mod/html5/web-components.rnc | 54 + .../30/mod/html5/web-forms-scripting.rnc | 27 + .../schema/30/mod/html5/web-forms.rnc | 610 +++ .../30/mod/html5/web-forms2-scripting.rnc | 9 + .../schema/30/mod/html5/web-forms2.rnc | 754 ++++ .../epubcheck/schema/30/mod/html5/xhtml5.rnc | 43 + .../schema/30/mod/mathml/mathml3-common.rnc | 67 +- .../schema/30/mod/mathml/mathml3-content.rnc | 27 +- .../schema/30/mod/mathml/mathml3-inc.rnc | 29 + .../30/mod/mathml/mathml3-presentation.rnc | 16 +- .../30/mod/mathml/mathml3-strict-content.rnc | 2 +- .../schema/30/mod/mathml/mathml3.rnc | 18 + .../epubcheck/schema/30/mod/svg11/LICENSE | 1 - .../epubcheck/schema/30/mod/svg11/README.txt | 8 - .../schema/30/mod/svg11/inkscape-draft.rnc | 303 ++ .../schema/30/mod/svg11/inkscape.rnc | 69 + .../schema/30/mod/svg11/svg-animation.rnc | 214 + .../30/mod/svg11/svg-animevents-attrib.rnc | 35 + .../schema/30/mod/svg11/svg-basic-clip.rnc | 69 + .../schema/30/mod/svg11/svg-basic-filter.rnc | 362 ++ .../schema/30/mod/svg11/svg-basic-font.rnc | 201 + .../mod/svg11/svg-basic-graphics-attrib.rnc | 53 + .../30/mod/svg11/svg-basic-structure.rnc | 303 ++ .../schema/30/mod/svg11/svg-basic-text.rnc | 150 + .../schema/30/mod/svg11/svg-clip.rnc | 32 + .../schema/30/mod/svg11/svg-conditional.rnc | 75 + .../30/mod/svg11/svg-container-attrib.rnc | 35 + .../schema/30/mod/svg11/svg-core-attrib.rnc | 41 + .../schema/30/mod/svg11/svg-cursor.rnc | 53 + .../schema/30/mod/svg11/svg-datatypes.rnc | 137 + .../30/mod/svg11/svg-docevents-attrib.rnc | 40 + .../schema/30/mod/svg11/svg-extensibility.rnc | 71 + .../30/mod/svg11/svg-extresources-attrib.rnc | 30 + .../schema/30/mod/svg11/svg-filter.rnc | 218 + .../schema/30/mod/svg11/svg-font.rnc | 111 + .../schema/30/mod/svg11/svg-gradient.rnc | 107 + .../30/mod/svg11/svg-graphevents-attrib.rnc | 49 + .../30/mod/svg11/svg-graphics-attrib.rnc | 66 + .../schema/30/mod/svg11/svg-hyperlink.rnc | 69 + .../schema/30/mod/svg11/svg-image.rnc | 61 + .../schema/30/mod/svg11/svg-marker.rnc | 84 + .../schema/30/mod/svg11/svg-mask.rnc | 76 + .../30/mod/svg11/svg-opacity-attrib.rnc | 36 + .../schema/30/mod/svg11/svg-paint-attrib.rnc | 100 + .../schema/30/mod/svg11/svg-pattern.rnc | 82 + .../schema/30/mod/svg11/svg-profile.rnc | 60 + .../schema/30/mod/svg11/svg-qname.rnc | 119 + .../schema/30/mod/svg11/svg-script.rnc | 44 + .../schema/30/mod/svg11/svg-shape.rnc | 221 + .../schema/30/mod/svg11/svg-structure.rnc | 71 + .../schema/30/mod/svg11/svg-style.rnc | 59 + .../schema/30/mod/svg11/svg-text.rnc | 285 ++ .../schema/30/mod/svg11/svg-view.rnc | 46 + .../30/mod/svg11/svg-viewport-attrib.rnc | 38 + .../schema/30/mod/svg11/svg-xlink-attrib.rnc | 92 + .../schema/30/mod/svg11/svg11-basic-inc.rnc | 186 + .../schema/30/mod/svg11/svg11-basic.rnc | 57 + .../schema/30/mod/svg11/svg11-flat.rnc | 4000 ----------------- .../schema/30/mod/svg11/svg11-inc.rnc | 196 + .../schema/30/mod/svg11/svg11-tiny-inc.rnc | 141 + .../schema/30/mod/svg11/svg11-tiny.rnc | 57 + .../epubcheck/schema/30/mod/svg11/svg11.rnc | 57 + .../api/Epub30CheckExpandedTest.java | 14 - .../java/com/adobe/epubcheck/cli/CLITest.java | 2 +- .../adobe/epubcheck/nav/NavCheckerTest.java | 13 +- .../adobe/epubcheck/ops/OPSCheckerTest.java | 281 +- .../20/epub/invalid/issue194.bad.epub.bak | Bin 4121 -> 0 bytes .../20/epub/invalid/issue313.epub.bak | Bin 4095 -> 0 bytes .../20/epub/invalid/issue316.epub.bak | Bin 4034 -> 0 bytes .../20/epub/invalid/lorem-mimetype.epub.bak | Bin 4048 -> 0 bytes .../20/epub/invalid/ncx-dupe-id.epub.bak | Bin 4046 -> 0 bytes .../unresolved-internal-xhtml-link.epub.bak | Bin 4069 -> 0 bytes .../20/epub/valid/issue194.good.epub.bak | Bin 4047 -> 0 bytes .../resources/20/epub/valid/lorem.epub.bak | Bin 4047 -> 0 bytes ...upub-multiple-renditions-nodctype-pub.epub | Bin 248086 -> 248125 bytes ...ultiple-renditions-nodctype-rendition.epub | Bin 248083 -> 248122 bytes .../resources/30/epub/invalid/issue203.epub | Bin 4721 -> 4730 bytes .../multiple-renditions-badmediaquery.epub | Bin 245029 -> 245052 bytes ...multiple-renditions-nodctermsmodified.epub | Bin 244968 -> 244991 bytes .../multiple-renditions-nometadata.epub | Bin 244654 -> 244693 bytes .../multiple-renditions-noselection.epub | Bin 244991 -> 245014 bytes ...ultiple-renditions-undefinedselection.epub | Bin 245028 -> 245051 bytes .../valid/edupub-multiple-renditions.epub | Bin 248114 -> 248137 bytes .../resources/30/epub/valid/issue158.epub | Bin 2207 -> 2232 bytes .../resources/30/epub/valid/issue262.epub | Bin 2626 -> 2636 bytes .../30/epub/valid/multiple-renditions.epub | Bin 245038 -> 245061 bytes .../EPUB/wasteland-nav.xhtml | 1 + .../EPUB/wasteland-nav.xhtml | 1 + .../wasteland-otf/EPUB/wasteland-nav.xhtml | 3 +- .../cc-shared-culture/EPUB/xhtml/cover.xhtml | 1 + .../cc-shared-culture/EPUB/xhtml/p10.xhtml | 1 + .../cc-shared-culture/EPUB/xhtml/p20.xhtml | 3 +- .../cc-shared-culture/EPUB/xhtml/p30.xhtml | 3 +- .../cc-shared-culture/EPUB/xhtml/p40.xhtml | 3 +- .../cc-shared-culture/EPUB/xhtml/p50.xhtml | 3 +- .../cc-shared-culture/EPUB/xhtml/p60.xhtml | 1 + .../cc-shared-culture/EPUB/xhtml/toc.xhtml | 1 + .../expanded/valid/issue211a/EPUB/lorem.css | 6 - .../expanded/valid/issue211a/EPUB/lorem.opf | 17 - .../expanded/valid/issue211a/EPUB/lorem.xhtml | 115 - .../valid/issue211a/META-INF/container.xml | 7 - .../30/expanded/valid/issue211a/mimetype | 1 - .../expanded/valid/issue211b/EPUB/lorem.css | 6 - .../expanded/valid/issue211b/EPUB/lorem.opf | 17 - .../expanded/valid/issue211b/EPUB/lorem.xhtml | 115 - .../valid/issue211b/META-INF/container.xml | 7 - .../30/expanded/valid/issue211b/mimetype | 1 - .../EPUB/wasteland-nav.xhtml | 1 + .../EPUB/wasteland-nav.xhtml | 1 + .../wasteland-basic/EPUB/wasteland-nav.xhtml | 1 + .../wasteland-otf/EPUB/wasteland-nav.xhtml | 3 +- .../30/single/nav/invalid/h-text.xhtml | 2 +- .../single/nav/invalid/nav-labels-001.xhtml | 4 +- .../single/nav/invalid/nav-labels-002.xhtml | 4 +- .../nav/invalid/nav-landmarks-001.xhtml | 4 +- .../nav/invalid/nav-landmarks-002.xhtml | 4 +- .../invalid/nav-landmarks-duplicates.xhtml | 4 +- .../30/single/nav/invalid/nav-no-toc.xhtml | 4 +- .../30/single/nav/invalid/nav-no-type.xhtml | 33 + .../single/nav/invalid/nav-pagelist-001.xhtml | 4 +- .../30/single/nav/invalid/noTocNav.xhtml | 2 +- .../30/single/nav/invalid/req-heading.xhtml | 6 +- .../30/single/nav/valid/issue156.xhtml | 2 +- .../30/single/nav/valid/issue538.xhtml | 2 +- .../30/single/nav/valid/minimal.xhtml | 2 +- .../30/single/nav/valid/nav001.xhtml | 2 +- .../30/single/xhtml/invalid/doctype-1.xhtml | 29 +- .../30/single/xhtml/invalid/link.xhtml | 1 + ...mathml-annotationxml-mathml-in-xhtml.xhtml | 31 + ...annotationxml-mathml-invalidencoding.xhtml | 48 + ...hml-annotationxml-mathml-invalidname.xhtml | 48 + .../mathml-annotationxml-mathml-noname.xhtml | 48 + ...-annotationxml-xhtml-invalidencoding.xhtml | 23 + ...thml-annotationxml-xhtml-invalidname.xhtml | 23 + .../mathml-annotationxml-xhtml-noname.xhtml | 23 + ...l-001.xhtml => mathml-contentmathml.xhtml} | 15 +- .../xhtml/invalid/obsolete-contextmenu.xhtml | 11 + .../xhtml/invalid/obsolete-dropzone.xhtml | 10 + .../xhtml/invalid/obsolete-keygen.xhtml | 13 + .../single/xhtml/invalid/obsolete-menus.xhtml | 23 + .../xhtml/invalid/obsolete-pubdate.xhtml | 10 + .../invalid/obsolete-seamless-iframe.xhtml | 11 + .../single/xhtml/invalid/ops-mathml-002.xhtml | 61 - .../30/single/xhtml/invalid/sch-001.xhtml | 10 +- .../single/xhtml/invalid/style-in-body.xhtml | 9 + .../single/xhtml/invalid/styleAttr001.xhtml | 1 + .../invalid/svg-foreignobject-body.xhtml} | 2 +- .../invalid/svg-foreignobject-not-flow.xhtml | 21 + .../single/xhtml/invalid/table-border.xhtml | 12 + .../single/xhtml/invalid/time-in-time.xhtml | 12 + .../single/xhtml/invalid/title-missing.xhtml | 8 + .../30/single/xhtml/invalid/trigger.xhtml | 1 + .../xhtml/invalid/url-checks_issue-708.xhtml | 4 +- .../30/single/xhtml/valid/doctype-1.xhtml | 31 +- .../30/single/xhtml/valid/doctype-2.xhtml | 29 +- .../30/single/xhtml/valid/embed-001.xhtml | 15 +- .../30/single/xhtml/valid/forms-001.xhtml | 63 +- .../single/xhtml/valid/global-attrs-001.xhtml | 4 +- .../30/single/xhtml/valid/http-equiv-1.xhtml | 28 +- .../30/single/xhtml/valid/http-equiv-2.xhtml | 30 +- .../30/single/xhtml/valid/issue153.xhtml | 21 - .../30/single/xhtml/valid/link.xhtml | 1 + .../30/single/xhtml/valid/mathml-01.xhtml | 29 + .../30/single/xhtml/valid/mathml-02.xhtml | 88 + .../xhtml/valid/mathml-annotation-tex.xhtml | 28 + .../mathml-annotationxml-mathml-content.xhtml | 47 + ...ml-annotationxml-mathml-presentation.xhtml | 72 + .../valid/mathml-annotationxml-xhtml.xhtml | 23 + .../30/single/xhtml/valid/mathml.xhtml | 29 - .../single/xhtml/valid/ops-mathml-001.xhtml | 89 - .../single/xhtml/valid/ops-mathml-002.xhtml | 53 - .../30/single/xhtml/valid/sch-001.xhtml | 4 +- .../30/single/xhtml/valid/sections-001.xhtml | 2 +- .../30/single/xhtml/valid/style-001.xhtml | 17 - .../30/single/xhtml/valid/styleAttr001.xhtml | 1 + .../xhtml/valid/svg-foreignobject.xhtml | 20 + .../30/single/xhtml/valid/table-border.xhtml | 15 + .../30/single/xhtml/valid/text-001.xhtml | 18 +- .../30/single/xhtml/valid/trigger.xhtml | 1 + .../encryption/epub30_font_obfuscation.epub | Bin 744072 -> 744082 bytes ...font_obfuscation.epub_expected_results.xml | 2 +- ...font_obfuscation.epub_expected_results.xmp | 2 +- .../scripts/properties_expected_results.json | 2 +- ...ml5_deprecated_epub3_expected_results.json | 8 +- 243 files changed, 16117 insertions(+), 7173 deletions(-) delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3-30.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11-30.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3-30.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11-30.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/assertions.sch create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/data.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/embed.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/form-datatypes.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-aria-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-attrib-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-document-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-edit-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-embed-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-forms-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-grouping-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-interactive-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-md.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-models-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-phrasing-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-rdfa.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-script-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-sections-30.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5-style-30.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/html5exclusions.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/media.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/meta.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/microdata.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/phrase.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/rdfa.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/revision.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/ruby.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/sectional.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/structural.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/tables.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-components.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms-scripting.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms2-scripting.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/web-forms2.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/xhtml5.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/mathml/mathml3-inc.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/mathml/mathml3.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/LICENSE delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/README.txt create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/inkscape-draft.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/inkscape.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-animation.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-animevents-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-basic-clip.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-basic-filter.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-basic-font.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-basic-graphics-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-basic-structure.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-basic-text.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-clip.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-conditional.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-container-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-core-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-cursor.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-datatypes.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-docevents-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-extensibility.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-extresources-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-filter.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-font.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-gradient.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-graphevents-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-graphics-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-hyperlink.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-image.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-marker.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-mask.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-opacity-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-paint-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-pattern.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-profile.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-qname.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-script.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-shape.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-structure.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-style.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-text.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-view.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-viewport-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg-xlink-attrib.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg11-basic-inc.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg11-basic.rnc delete mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg11-flat.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg11-inc.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg11-tiny-inc.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg11-tiny.rnc create mode 100644 src/main/resources/com/adobe/epubcheck/schema/30/mod/svg11/svg11.rnc delete mode 100644 src/test/resources/20/epub/invalid/issue194.bad.epub.bak delete mode 100644 src/test/resources/20/epub/invalid/issue313.epub.bak delete mode 100644 src/test/resources/20/epub/invalid/issue316.epub.bak delete mode 100644 src/test/resources/20/epub/invalid/lorem-mimetype.epub.bak delete mode 100644 src/test/resources/20/epub/invalid/ncx-dupe-id.epub.bak delete mode 100644 src/test/resources/20/epub/invalid/unresolved-internal-xhtml-link.epub.bak delete mode 100644 src/test/resources/20/epub/valid/issue194.good.epub.bak delete mode 100644 src/test/resources/20/epub/valid/lorem.epub.bak delete mode 100644 src/test/resources/30/expanded/valid/issue211a/EPUB/lorem.css delete mode 100644 src/test/resources/30/expanded/valid/issue211a/EPUB/lorem.opf delete mode 100644 src/test/resources/30/expanded/valid/issue211a/EPUB/lorem.xhtml delete mode 100644 src/test/resources/30/expanded/valid/issue211a/META-INF/container.xml delete mode 100644 src/test/resources/30/expanded/valid/issue211a/mimetype delete mode 100644 src/test/resources/30/expanded/valid/issue211b/EPUB/lorem.css delete mode 100644 src/test/resources/30/expanded/valid/issue211b/EPUB/lorem.opf delete mode 100644 src/test/resources/30/expanded/valid/issue211b/EPUB/lorem.xhtml delete mode 100644 src/test/resources/30/expanded/valid/issue211b/META-INF/container.xml delete mode 100644 src/test/resources/30/expanded/valid/issue211b/mimetype create mode 100644 src/test/resources/30/single/nav/invalid/nav-no-type.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/mathml-annotationxml-mathml-in-xhtml.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/mathml-annotationxml-mathml-invalidencoding.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/mathml-annotationxml-mathml-invalidname.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/mathml-annotationxml-mathml-noname.xhtml create mode 100755 src/test/resources/30/single/xhtml/invalid/mathml-annotationxml-xhtml-invalidencoding.xhtml create mode 100755 src/test/resources/30/single/xhtml/invalid/mathml-annotationxml-xhtml-invalidname.xhtml create mode 100755 src/test/resources/30/single/xhtml/invalid/mathml-annotationxml-xhtml-noname.xhtml rename src/test/resources/30/single/xhtml/invalid/{ops-mathml-001.xhtml => mathml-contentmathml.xhtml} (62%) create mode 100644 src/test/resources/30/single/xhtml/invalid/obsolete-contextmenu.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/obsolete-dropzone.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/obsolete-keygen.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/obsolete-menus.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/obsolete-pubdate.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/obsolete-seamless-iframe.xhtml delete mode 100644 src/test/resources/30/single/xhtml/invalid/ops-mathml-002.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/style-in-body.xhtml rename src/test/resources/30/single/{svg/valid/issue222.xhtml => xhtml/invalid/svg-foreignobject-body.xhtml} (90%) create mode 100755 src/test/resources/30/single/xhtml/invalid/svg-foreignobject-not-flow.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/table-border.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/time-in-time.xhtml create mode 100644 src/test/resources/30/single/xhtml/invalid/title-missing.xhtml delete mode 100755 src/test/resources/30/single/xhtml/valid/issue153.xhtml create mode 100644 src/test/resources/30/single/xhtml/valid/mathml-01.xhtml create mode 100644 src/test/resources/30/single/xhtml/valid/mathml-02.xhtml create mode 100644 src/test/resources/30/single/xhtml/valid/mathml-annotation-tex.xhtml create mode 100644 src/test/resources/30/single/xhtml/valid/mathml-annotationxml-mathml-content.xhtml create mode 100644 src/test/resources/30/single/xhtml/valid/mathml-annotationxml-mathml-presentation.xhtml create mode 100755 src/test/resources/30/single/xhtml/valid/mathml-annotationxml-xhtml.xhtml delete mode 100644 src/test/resources/30/single/xhtml/valid/mathml.xhtml delete mode 100644 src/test/resources/30/single/xhtml/valid/ops-mathml-001.xhtml delete mode 100644 src/test/resources/30/single/xhtml/valid/ops-mathml-002.xhtml create mode 100755 src/test/resources/30/single/xhtml/valid/svg-foreignobject.xhtml create mode 100644 src/test/resources/30/single/xhtml/valid/table-border.xhtml diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.rnc index 8faece873..b1aded662 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.rnc @@ -3,19 +3,33 @@ namespace epub = "http://www.idpf.org/2007/ops" include "epub-xhtml-30.rnc" { - html5.nav.attlist &= epub.nav.attrs + nav.attrs = nav.attrs.noepubtype } + + ## "reset" the definition of nav.attrs to what it was + ## before epub:type was set to augment common.attrs + nav.attrs.noepubtype = + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other + & ( common.attrs.aria.implicit.navigation + | common.attrs.aria.landmark.navigation + | common.attrs.aria.role.doc-index + | common.attrs.aria.role.doc-pagelist + | common.attrs.aria.role.doc-toc + )? + ) + + html5.headings.class = hgroup.elem | h1.elem | h2.elem | h3.elem | h4.elem | h5.elem | h6.elem - epub.nav.attrs &= html5.global.common.attrs & epub.nav.xml.attrs - epub.nav.xml.attrs &= html5.xml.lang.attr? & html5.xml.base.attr? & html5.xml.space.attr? - - html5.sections.class |= epub.nav - - epub.nav = element nav { epub.type.attr & epub.nav.attrs & epub.nav.content } + epub.nav = element nav { epub.type.attr & nav.attrs.noepubtype & epub.nav.content } epub.nav.content = html5.headings.class?, epub.nav.ol - epub.nav.ol = element ol { html5.ol.attlist & epub.nav.ol.content } + epub.nav.ol = element ol { ol.attrs & epub.nav.ol.content } epub.nav.ol.content = epub.nav.oli+ - epub.nav.oli = element li { html5.oli.attlist & epub.nav.oli.content } - epub.nav.oli.content = html5.a.phrasing | ((html5.a.phrasing | html5.span), epub.nav.ol) + epub.nav.oli = element li { oli.attrs & epub.nav.oli.content } + epub.nav.oli.content = a.elem.phrasing | ((a.elem.phrasing | span.elem), epub.nav.ol) + + common.elem.flow |= epub.nav diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch b/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch index de8c558b7..9ed775886 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch +++ b/src/main/resources/com/adobe/epubcheck/schema/30/epub-nav-30.sch @@ -60,7 +60,7 @@ + context="html:nav[@epub:type][not(tokenize(@epub:type,'\s+') = ('toc','page-list','landmarks'))]"> nav elements other than 'toc', 'page-list' and 'landmarks' must have a heading as their first child diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/epub-svg-30.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/epub-svg-30.rnc index 916e4dfeb..87363bdf2 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/epub-svg-30.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/epub-svg-30.rnc @@ -1,17 +1 @@ - - namespace x = "http://www.w3.org/1999/xhtml" - - include "./mod/html5/html5-grouping-30.rnc" inherit = x - include "./mod/html5/html5-phrasing-30.rnc" inherit = x - include "./mod/html5/html5-sections-30.rnc" inherit = x - include "./mod/html5/html5-style-30.rnc" inherit = x - include "./mod/epub-ssml-attrs.rnc" - - include "./mod/html5/html5-attrib-30.rnc" - - include "./mod/html5/html5-aria-30.rnc" - - include "./mod/datatypes.rnc" - include "./mod/html5/html5-models-30.rnc" - - start = external "mod/epub-svg11-30.rnc" +include "./mod/epub-svg11.rnc" diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.rnc index 1c7fdd2e1..acbe1a6aa 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.rnc @@ -1,39 +1,7 @@ +## XHTML5 +include "./mod/epub-xhtml.rnc" +## SVG and MathML - - default namespace = "http://www.w3.org/1999/xhtml" - - include "./mod/html5/html5-document-30.rnc" - - include "./mod/html5/html5-sections-30.rnc" - include "./mod/html5/html5-grouping-30.rnc" - include "./mod/html5/html5-phrasing-30.rnc" - include "./mod/html5/html5-embed-30.rnc" - - include "./mod/html5/html5-edit-30.rnc" - include "./mod/html5/html5-style-30.rnc" - include "./mod/html5/html5-script-30.rnc" - include "./mod/html5/html5-interactive-30.rnc" - include "./mod/html5/html5-forms-30.rnc" - - include "./mod/html5/html5-attrib-30.rnc" - include "./mod/html5/html5-aria-30.rnc" - include "./mod/html5/html5-rdfa.rnc" - include "./mod/html5/html5-md.rnc" - - include "./mod/datatypes.rnc" - include "./mod/html5/html5-models-30.rnc" - - include "./mod/epub-xhtml-mathml3-30.rnc" - include "./mod/epub-xhtml-svg11-30.rnc" - - include "./mod/epub-trigger.rnc" - include "./mod/epub-switch.rnc" - - include "./mod/epub-type-attr.rnc" - include "./mod/epub-prefix-attr.rnc" - include "./mod/epub-ssml-attrs.rnc" - - start = html5.html - - +include "./mod/epub-xhtml-mathml3.rnc" +include "./mod/epub-xhtml-svg11.rnc" diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.sch b/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.sch index f238a921d..19321bf38 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.sch +++ b/src/main/resources/com/adobe/epubcheck/schema/30/epub-xhtml-30.sch @@ -20,6 +20,14 @@ the charset attribute present. + + + + + WARNING: The 'head' element should have a 'title' child element. + + @@ -100,11 +108,6 @@ - - - - - @@ -191,12 +194,6 @@ - - - - - - @@ -222,14 +219,13 @@ test="some $elem in $id-set satisfies $elem/@id eq current()/@for and (local-name($elem) eq 'button' or (local-name($elem) eq 'input' and not($elem/@type='hidden')) - or local-name($elem) eq 'keygen' or local-name($elem) eq 'meter' or local-name($elem) eq 'output' or local-name($elem) eq 'progress' or local-name($elem) eq 'select' or local-name($elem) eq 'textarea')" >The for attribute does not refer to an allowed target element (expecting: - button|keygen|meter|output|progress|select|textarea|input[not(@type='hidden')]). + button|meter|output|progress|select|textarea|input[not(@type='hidden')]). @@ -306,18 +302,6 @@ - - - - The scoped style element must occur before any other flow content other than other - style elements and inter-element whitespace. - - - The sizes attribute must not be specified on link elements @@ -332,21 +316,6 @@ - - - For each article element, there must be - no more than one time element child with a pubdate attribute - - - - - - For each - Document, there must be no more than one time element with a pubdate attribute that - does not have an ancestor article element. - - - If the itemprop is specified on an a element, then the href @@ -419,7 +388,7 @@ + |h:label|h:menu|h:object[@usemap]|h:select|h:textarea|h:video[@controls]"> The element must not appear inside elements. diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/epub30-catalog.xml b/src/main/resources/com/adobe/epubcheck/schema/30/epub30-catalog.xml index 123f09889..c0916fb8f 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/epub30-catalog.xml +++ b/src/main/resources/com/adobe/epubcheck/schema/30/epub30-catalog.xml @@ -40,9 +40,9 @@ uri="mod/datatypes.rnc"/> - - + + @@ -52,9 +52,9 @@ uri="mod/epub-ssml-attrs.rnc"/> - - + + @@ -72,79 +72,147 @@ uri="mod/epub-type-attr.rnc"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -308,11 +376,241 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/idx/idx-xhtml.sch b/src/main/resources/com/adobe/epubcheck/schema/30/idx/idx-xhtml.sch index 651ae8913..1b4bec77a 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/idx/idx-xhtml.sch +++ b/src/main/resources/com/adobe/epubcheck/schema/30/idx/idx-xhtml.sch @@ -176,7 +176,7 @@ test="self::h:a|self::h:abbr|self::h:area|self::h:audio|self::h:b|self::h:bdi|self::h:bdo|self::h:br |self::h:button|self::h:canvas|self::h:cite|self::h:code|self::h:data|self::h:datalist|self::h:del |self::h:dfn|self::h:em|self::h:embed|self::h:i|self::h:iframe|self::h:img|self::h:input|self::h:ins - |self::h:kbd|self::h:keygen|self::h:label|self::h:map|self::h:mark|self::h:math|self::h:meter + |self::h:kbd|self::h:label|self::h:map|self::h:mark|self::h:math|self::h:meter |self::h:noscript|self::h:object|self::h:output|self::h:progress|self::h:q|self::h:ruby|self::h:s |self::h:samp|self::h:script|self::h:select|self::h:small|self::h:span|self::h:strong|self::h:sub |self::h:sup|self::h:svg|self::h:textarea|self::h:time|self::h:u|self::h:var|self::h:video" diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3-30.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3-30.rnc deleted file mode 100644 index f3c24c682..000000000 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3-30.rnc +++ /dev/null @@ -1,74 +0,0 @@ - - - default namespace m = "http://www.w3.org/1998/Math/MathML" - namespace local = "" - namespace x = "http://www.w3.org/1999/xhtml" - namespace ev = "http://www.w3.org/2001/xml-events" - namespace ssml = "http://www.w3.org/2001/10/synthesis" - - include "mathml/mathml3-common.rnc" { - start = element math { math.attributes & MathExpression+ } - - # redefine annotation-xml to point to ops specialization and allow validation of content mathml - annotation-xml = - element annotation-xml { - html5.annotation.xml.attlist & html5.annotation.xml.content - } - - # redefine to refer to datatype proxy and remove deprecated attributes - CommonAtt = - attribute id { parent datatype.ID }?, - attribute xref { parent datatype.IDREF }?, - attribute class { parent datatype.NMTOKENS }?, - attribute style { parent datatype.string }?, - attribute href { parent datatype.URI }?, - NonMathMLAtt* - - CommonAtt &= parent epub.ssml.ph.attr? - - # remove deprecated attributes - math.deprecatedattributes = empty - semantics.attributes = CommonAtt - - # extend to circumvent datatype collisions - NonMathMLAtt = - attribute * - (local:* | m:* | xml:* | x:* | ev:* | ssml:*) { - parent datatype.string - } - } - - html5.annotation.xml.attlist = - CommonAtt - & attribute cd { "mathmlkeys" }? - & attribute name { "contentequiv" | "alternate-representation" }? - & attribute definitionURL { parent datatype.URI }? - - # The choice pattern for combinations of values of @encoding and actual xml annotation content. - html5.annotation.xml.content |= - (attribute encoding { "application/mathml-content+xml" | "MathML-Content" }, - (src | ContExp+)) - | (attribute encoding { "application/mathml-presentation+xml" | "MathML-Presentation" }, - (src | MathExpression+)) - | (attribute encoding { "application/xhtml+xml" }, - parent html5.flow.model) - - # add xml:base - CommonAtt &= parent html5.xml.base.attr? - - include "mathml/mathml3-presentation.rnc" { - # redefine to refer to datatype proxy - idref = parent datatype.IDREF - - # remove deprecated - mglyph.deprecatedattributes = empty - DeprecatedTokenAtt = empty - mstyle.deprecatedattributes = empty - } - - include "mathml/mathml3-content.rnc" { - # as ops allows presentation mathml only at top level, kill the contribution to MathExpression - MathExpression |= notAllowed - - # remove deprecated - DeprecatedContExp = empty -} diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3.rnc new file mode 100644 index 000000000..fb65a4e9d --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-mathml3.rnc @@ -0,0 +1,101 @@ +default namespace m = "http://www.w3.org/1998/Math/MathML" +namespace local = "" +namespace x = "http://www.w3.org/1999/xhtml" +namespace ev = "http://www.w3.org/2001/xml-events" +namespace ssml = "http://www.w3.org/2001/10/synthesis" + +# ##################################################################### +# +# MathML validation based on the schemas from the Nu Html Checker, +# with the following changes: +# - Content MathML is only allowed in annotation-xml +# - annotation-xml follows the restrictions defined in +# EPUB Content Documents +# - EPUB SSML attributes are allowed +# +# ##################################################################### + +include "mathml/mathml3-inc.rnc" { + + # extend to circumvent datatype collisions + NonMathMLAtt = + attribute * - (local:* | m:* | xml:* | x:* | ev:* | ssml:*) { + datatype.string + } + + # as ops allows presentation mathml only at top level, kill the contribution to MathExpression + MathExpression = semantics | PresentationExpression + + # override annotation-xml with EPUB restrictions + annotation-xml = epub.annotation-xml +} + +# Common attribute extensions +# - SSML attributes +CommonAtt &= epub.ssml.ph.attr? +# - xml:base +CommonAtt &= common.attrs.xmlbase? + +annotation-xml.model.xhtml |= common.inner.flow +annotation-xml.model.mathml |= common.inner.flow + +# The following comes from validator.nu’s xhtml5-svg-mathml.rnc driver: +# in our integration, is the only MathML "token element" that can +# contain HTML element content; the , , and elements +# cannot; see http://www.w3.org/Bugs/Public/show_bug.cgi?id=9859#c8 for a +# rationale +mtext.content |= common.elem.phrasing + +# EPUB very specific annotation-xml restrictions: +epub.annotation-xml = + ( epub.annotation-xml.xhtml + | epub.annotation-xml.mathml.content + | epub.annotation-xml.mathml.presentation + ) + epub.annotation-xml.attributes = CommonAtt, cd?, src? + epub.annotation-xml.xhtml = + element annotation-xml { + epub.annotation-xml.model.xhtml, epub.annotation-xml.attributes, + epub.att-encoding.xhtml, epub.att-name.xhtml + } + epub.annotation-xml.model.xhtml = + common.inner.flow + epub.att-encoding.xhtml = + attribute encoding { + string "application/xhtml+xml" + } + epub.att-name.xhtml = + attribute name { + string "alternate-representation" + } + epub.annotation-xml.mathml.content = + element annotation-xml { + epub.annotation-xml.model.mathml.content, epub.annotation-xml.attributes, + epub.att-encoding.mathml.content, epub.att-name.mathml.content + } + epub.annotation-xml.model.mathml.content = + ContExp* + epub.att-encoding.mathml.content = + attribute encoding { + string "MathML-Content" | string "application/mathml-content+xml" + } + epub.att-name.mathml.content = + attribute name { + string "contentequiv" + } + epub.annotation-xml.mathml.presentation = + element annotation-xml { + epub.annotation-xml.model.mathml.presentation, epub.annotation-xml.attributes, + epub.att-encoding.mathml.presentation, epub.att-name.mathml.presentation + } + epub.annotation-xml.model.mathml.presentation = + MathExpression* + epub.att-encoding.mathml.presentation = + attribute encoding { + string "MathML" | "MathML-Presentation" | string "application/mathml-presentation+xml" + } + epub.att-name.mathml.presentation = + attribute name { + string "contentequiv" + } + diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-prefix-attr.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-prefix-attr.rnc index 9941e9332..6323485c2 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-prefix-attr.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-prefix-attr.rnc @@ -2,7 +2,7 @@ namespace epub = "http://www.idpf.org/2007/ops" - html5.html.attlist &= epub.prefix.attr.ns? + html.attrs &= epub.prefix.attr.ns? epub.prefix.attr = attribute prefix { datatype.prefixdecl } epub.prefix.attr.ns = attribute epub:prefix { datatype.prefixdecl } \ No newline at end of file diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-ssml-attrs.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-ssml-attrs.rnc index 0e4603caa..b9929bf18 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-ssml-attrs.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-ssml-attrs.rnc @@ -3,7 +3,7 @@ namespace ssml = "http://www.w3.org/2001/10/synthesis" - html5.global.common.attrs &= epub.ssml.ph.attr? & epub.ssml.alphabet.attr? + common.attrs.other &= epub.ssml.ph.attr? & epub.ssml.alphabet.attr? #TODO determine injection in SVG diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11-30.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11-30.rnc deleted file mode 100644 index 0718ccb72..000000000 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11-30.rnc +++ /dev/null @@ -1,296 +0,0 @@ -# $Id: epub-svg11-30.rnc 3093 2011-08-22 18:33:36Z markus.gylling@gmail.com $ -# Contributors: MURATA Makoto and Markus Gylling - default namespace = "http://www.w3.org/2000/svg" - namespace epub = "http://www.idpf.org/2007/ops" - namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" - - SVG.aria.attr = parent aria.role.attr? & parent aria.global & parent aria.widget.excl & parent aria.relationship.excl - include "svg11/svg11-flat.rnc" { - start = svg - SVG.id.attrib = attribute id { parent datatype.ID }? - SVG.AnimationEvents.attrib = notAllowed - SVG.Animation.class = notAllowed - SVG.foreignObject.extra.content = parent html5.flow.class - SVG.title.extra.content = parent html5.phrasing.class - SVG.Core.extra.attrib &= attribute epub:type { parent datatype.properties }? - - a = - element a { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.XLinkReplace.attrib, - SVG.External.attrib, - attribute transform { TransformList.datatype }?, - attribute target { LinkTarget.datatype }?, - SVG.a.content - } - circle = - element circle { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute cx { Coordinate.datatype }?, - attribute cy { Coordinate.datatype }?, - attribute r { Length.datatype }, - attribute transform { TransformList.datatype }?, - SVG.circle.content - } - ellipse = - element ellipse { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute cx { Coordinate.datatype }?, - attribute cy { Coordinate.datatype }?, - attribute rx { Length.datatype }, - attribute ry { Length.datatype }, - attribute transform { TransformList.datatype }?, - SVG.ellipse.content - } - foreignObject = - element foreignObject { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute x { Coordinate.datatype }?, - attribute y { Coordinate.datatype }?, - attribute width { Length.datatype }, - attribute height { Length.datatype }, - attribute transform { TransformList.datatype }?, - SVG.foreignObject.content - } - g = - element g { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute transform { TransformList.datatype }?, - SVG.g.content - } - image = - element image { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.XLinkEmbed.attrib, - SVG.External.attrib, - attribute x { Coordinate.datatype }?, - attribute y { Coordinate.datatype }?, - attribute width { Length.datatype }, - attribute height { Length.datatype }, - [ a:defaultValue = "xMidYMid meet" ] - attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, - attribute transform { TransformList.datatype }?, - SVG.image.content - } - line = - element line { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute x1 { Coordinate.datatype }?, - attribute y1 { Coordinate.datatype }?, - attribute x2 { Coordinate.datatype }?, - attribute y2 { Coordinate.datatype }?, - attribute transform { TransformList.datatype }?, - SVG.line.content - } - path = - element path { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute d { PathData.datatype }, - attribute pathLength { Number.datatype }?, - attribute transform { TransformList.datatype }?, - SVG.path.content - } - polygon = - element polygon { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute points { Points.datatype }, - attribute transform { TransformList.datatype }?, - SVG.polygon.content - } - polyline = - element polyline { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute points { Points.datatype }, - attribute transform { TransformList.datatype }?, - SVG.polyline.content - } - rect = - element rect { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute x { Coordinate.datatype }?, - attribute y { Coordinate.datatype }?, - attribute width { Length.datatype }, - attribute height { Length.datatype }, - attribute rx { Length.datatype }?, - attribute ry { Length.datatype }?, - attribute transform { TransformList.datatype }?, - SVG.rect.content - } - svg = - element svg { - SVG.aria.attr, - SVG.xmlns.attrib, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.DocumentEvents.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute x { Coordinate.datatype }?, - attribute y { Coordinate.datatype }?, - attribute width { Length.datatype }?, - attribute height { Length.datatype }?, - attribute viewBox { ViewBoxSpec.datatype }?, - [ a:defaultValue = "xMidYMid meet" ] - attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, - [ a:defaultValue = "magnify" ] - attribute zoomAndPan { "disable" | "magnify" }?, - [ a:defaultValue = "1.1" ] attribute version { string "1.1" }?, - attribute baseProfile { Text.datatype }?, - [ a:defaultValue = "application/ecmascript" ] - attribute contentScriptType { ContentType.datatype }?, - [ a:defaultValue = "text/css" ] - attribute contentStyleType { ContentType.datatype }?, - SVG.svg.content - } - switch = - element switch { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute transform { TransformList.datatype }?, - SVG.switch.content - } - \text = - element text { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute x { Coordinates.datatype }?, - attribute y { Coordinates.datatype }?, - attribute dx { Lengths.datatype }?, - attribute dy { Lengths.datatype }?, - attribute rotate { Numbers.datatype }?, - attribute textLength { Length.datatype }?, - attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?, - attribute transform { TransformList.datatype }?, - SVG.text.content - } - textPath = - element textPath { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.XLinkRequired.attrib, - SVG.External.attrib, - attribute startOffset { Length.datatype }?, - attribute textLength { Length.datatype }?, - attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?, - attribute method { "align" | "stretch" }?, - attribute spacing { "auto" | "exact" }?, - SVG.textPath.content - } - tspan = - element tspan { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.External.attrib, - attribute x { Coordinates.datatype }?, - attribute y { Coordinates.datatype }?, - attribute dx { Lengths.datatype }?, - attribute dy { Lengths.datatype }?, - attribute rotate { Numbers.datatype }?, - attribute textLength { Length.datatype }?, - attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?, - SVG.tspan.content - } - use = - element use { - SVG.aria.attr, - SVG.Core.attrib, - SVG.Conditional.attrib, - SVG.Style.attrib, - SVG.Presentation.attrib, - SVG.GraphicalEvents.attrib, - SVG.XLinkEmbed.attrib, - SVG.External.attrib, - attribute x { Coordinate.datatype }?, - attribute y { Coordinate.datatype }?, - attribute width { Length.datatype }?, - attribute height { Length.datatype }?, - attribute transform { TransformList.datatype }?, - SVG.use.content - } - } - - \ No newline at end of file diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11.rnc new file mode 100644 index 000000000..6d890231c --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-svg11.rnc @@ -0,0 +1,39 @@ +# Credit: integration adapted from the Nu Html Checker drivers + +namespace svg = "http://www.w3.org/2000/svg" +namespace math = "http://www.w3.org/1998/Math/MathML" +namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" + +include "epub-xhtml.rnc" { + start = svg +} +include "svg11/svg11-inc.rnc" +include "svg11/inkscape.rnc" + +include "epub-mathml3.rnc" + +common.elem.phrasing |= svg + +common.elem.phrasing |= math + +SVG.foreignObject.content |= + ( math + | html.elem + | body.elem + | common.inner.flow + ) + +SVG.Core.extra.attrib &= epub.type.attr? + +# augment MathML annotation-xml content model +# annotation-xml.model.svg |= svg +# annotation-xml.model.xhtml |= +# ( html.elem +# | common.elem.flow +# ) + +# in our integration, is the only MathML "token element" that can +# contain HTML element content; the , , and elements +# cannot; see http://www.w3.org/Bugs/Public/show_bug.cgi?id=9859#c8 for a +# rationale +mtext.content |= common.elem.phrasing diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-switch.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-switch.rnc index 2649628b0..13b834df5 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-switch.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-switch.rnc @@ -1,8 +1,8 @@ namespace epub = "http://www.idpf.org/2007/ops" - html5.flow.class |= epub.switch.flow - html5.phrasing.class |= epub.switch.phrasing + common.elem.flow |= epub.switch.flow + common.elem.phrasing |= epub.switch.phrasing epub.switch.flow = element epub:switch { epub.switch.attlist, epub.switch.case.flow+, epub.switch.default.flow } epub.switch.phrasing = element epub:switch { epub.switch.attlist, epub.switch.case.phrasing+, epub.switch.default.phrasing } @@ -14,19 +14,19 @@ epub.case.flow.content = epub.switch.any epub.case.phrasing.content = epub.switch.any - epub.switch.any = (anyElement | text)* + epub.switch.any = (epub.switch.anyElement | text)* - epub.default.flow.content = html5.flow.model - epub.default.phrasing.content = html5.phrasing.model + epub.default.flow.content = common.inner.flow + epub.default.phrasing.content = common.inner.phrasing - epub.switch.attlist &= html5.id.attr? - epub.case.attlist &= html5.id.attr? & epub.case.rn.attr - epub.default.attlist &= html5.id.attr? + epub.switch.attlist &= common.attrs.id? + epub.case.attlist &= common.attrs.id? & epub.case.rn.attr + epub.default.attlist &= common.attrs.id? epub.case.rn.attr = attribute required-namespace { datatype.URI } - anyElement = element * { + epub.switch.anyElement = element * { (attribute * { text } | text - | anyElement)* + | epub.switch.anyElement)* } \ No newline at end of file diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-trigger.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-trigger.rnc index 64ea1736b..78098bb4c 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-trigger.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-trigger.rnc @@ -2,12 +2,12 @@ namespace epub = "http://www.idpf.org/2007/ops" namespace ev = "http://www.w3.org/2001/xml-events" - html5.metadata.class |= epub.trigger - html5.flow.class |= epub.trigger + common.elem.metadata |= epub.trigger + common.elem.flow |= epub.trigger epub.trigger = element epub:trigger { epub.trigger.attlist & epub.trigger.content } - epub.trigger.attlist = html5.id.attr? & epub.trigger.action.attr & epub.trigger.ref.attr + epub.trigger.attlist = common.attrs.id? & epub.trigger.action.attr & epub.trigger.ref.attr & xml.events.event.attr & xml.events.observer.attr & xml.events.defaultAction.attr? & xml.events.phase.attr? & xml.events.propagate.attr? diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc index 0de4ed0da..2faebe4d2 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-type-attr.rnc @@ -2,6 +2,14 @@ namespace epub = "http://www.idpf.org/2007/ops" - html5.global.xml.attrs &= epub.type.attr? + ## We can't use common.attrs.other since we have + ## to reset the definition of the class of attributes + ## where epub:type is added in the nav doc schema, and + ## common.attrs.other is augmented by other schemas. + ## We therefore augment common.attrs (and also attrobute + ## lists that are not based on common.attrs) + common.attrs &= epub.type.attr? + a.attrs &= epub.type.attr? + area.attrs &= epub.type.attr? epub.type.attr = attribute epub:type { datatype.properties } \ No newline at end of file diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3-30.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3-30.rnc deleted file mode 100644 index 6437b9f2f..000000000 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3-30.rnc +++ /dev/null @@ -1,5 +0,0 @@ - - - html5.phrasing.class |= math - html5.flow.class |= math - math = external "epub-mathml3-30.rnc" diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc new file mode 100644 index 000000000..ad272e6aa --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-mathml3.rnc @@ -0,0 +1,5 @@ +namespace math = "http://www.w3.org/1998/Math/MathML" + +include "epub-mathml3.rnc" + +common.elem.phrasing |= math \ No newline at end of file diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11-30.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11-30.rnc deleted file mode 100644 index c905112a1..000000000 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11-30.rnc +++ /dev/null @@ -1,6 +0,0 @@ -# $Id: epub-xhtml-svg11-30.rnc 3024 2011-07-10 08:29:17Z eb2mmrt $ -# Contributors: MURATA Makoto and Markus Gylling - - html5.phrasing.class |= svg - html5.flow.class |= svg - svg = external "epub-svg11-30.rnc" diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11.rnc new file mode 100644 index 000000000..2b1e51c4b --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml-svg11.rnc @@ -0,0 +1,39 @@ +# Credit: integration adapted from the Nu Html Checker drivers + +namespace svg = "http://www.w3.org/2000/svg" + +include "svg11/svg11-inc.rnc" { + SVG.id.attrib = attribute id { datatype.html5.token }? +} +include "svg11/inkscape.rnc" + +common.elem.phrasing |= svg + +SVG.Core.extra.attrib &= epub.type.attr? + +SVG.foreignObject.content |= common.inner.flow + +SVG.desc.content |= common.inner.flow +SVG.title.content |= common.inner.flow +SVG.metadata.content |= common.inner.flow + +SVG.vector-effect.attrib = + attribute vector-effect { + string "none" | string "non-scaling-stroke" + } + +attlist.circle &= SVG.vector-effect.attrib? +attlist.ellipse &= SVG.vector-effect.attrib? +attlist.foreignObject &= SVG.vector-effect.attrib? +attlist.image &= SVG.vector-effect.attrib? +attlist.line &= SVG.vector-effect.attrib? +attlist.path &= SVG.vector-effect.attrib? +attlist.polygon &= SVG.vector-effect.attrib? +attlist.polyline &= SVG.vector-effect.attrib? +attlist.rect &= SVG.vector-effect.attrib? +attlist.text &= SVG.vector-effect.attrib? +attlist.tspan &= SVG.vector-effect.attrib? +attlist.use &= SVG.vector-effect.attrib? + +# augment MathML annotation-xml content model +# annotation-xml.model.svg |= svg \ No newline at end of file diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml.rnc new file mode 100644 index 000000000..f1bc9dd61 --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/epub-xhtml.rnc @@ -0,0 +1,115 @@ +# Credit: integration adapted from the Nu Html Checker drivers + +default namespace = "http://www.w3.org/1999/xhtml" +# ##################################################################### +## RELAX NG Schema for XHTML 5 # +# ##################################################################### +# +# XHTML validation based on the schemas from the Nu Html Checker, +# with the following changes: +# - datatypes replaced to use the patterns in datatype.rnc +# - title element not required (a missing title element will be +# reported as a WARNING in Schematron +# - allows meta http-equiv in encoding declaration state +# - allows the border attribute on tables +# - allow EPUB extensions (epub:type, epub:switch, epub:trigger, +# ssml:* attributes, etc) +# +# ##################################################################### +## Schema Framework & Parameters + +include "./html5/common.rnc" { + # XHTML flavor # + XMLonly = empty + HTMLonly = notAllowed + # HTML 4 compat # + v5only = empty +} + +# ##################################################################### +## Language Definitions + +start = html.elem + +## Static datatypes + +# Note: these are too simplistic. The Nu HTML Checker performs +# a significant part of the checking in its Java-based datatype +# library. + +include "./datatypes.rnc" + +## Modules from the Nu HTML Checker + +include "./html5/meta.rnc" { + # make the title element optional, since one could see the publication title + # as defining a proper "higher-level protocol" + # the lack of `title` will however raise a WARNING in a Schematron rule + head.inner = + ( title.elem? + & base.elem? # REVISIT need a non-schema checker or Schematron + & common.inner.metadata # Limit encoding decl position in Schematron + ) + + # Allow http-equiv in encoding declaration state in XHTML too + # (W3C allows that, but not WHATWG) + meta.http-equiv.content-type.elem = + element meta { meta.inner & meta.http-equiv.content-type.attrs } + + # Make http-equiv case-insensitive + # This is an ugly hack. Case-insensitiveness would better be solved + # at parsing time. + meta.http-equiv.attrs.http-equiv.content-type = + attribute http-equiv { + xsd:string { pattern = "[cC][oO][nN][tT][eE][nN][tT]-[tT][yY][pP][eE]" } + } + meta.http-equiv.attrs.http-equiv.refresh = + attribute http-equiv { + xsd:string { pattern = "[rR][eE][fF][rR][eE][sS][hH]" } + } + meta.http-equiv.attrs.http-equiv.default-style = + attribute http-equiv { + xsd:string { pattern = "[dD][eE][fF][aA][uU][lL][tT]-[sS][tT][yY][lL][eE]" } + } + meta.http-equiv.attrs.http-equiv.content-security-policy = + attribute http-equiv { + xsd:string { pattern = "[cC][oO][nN][tT][eE][nN][tT]-[sS][eE][cC][uU][rR][iI][tT][yY]-[pP][oO][lL][iI][cC][yY]" } + } + meta.http-equiv.attrs.http-equiv.x-ua-compatible = + attribute http-equiv { + xsd:string { pattern = "[xX]-[uU][aA]-[cC][oO][mM][pP][aA][tT][iI][bB][lL][eE]" } + } +} +include "./html5/phrase.rnc" +include "./html5/block.rnc" +include "./html5/sectional.rnc" +include "./html5/structural.rnc" +include "./html5/revision.rnc" +include "./html5/embed.rnc" +include "./html5/ruby.rnc" +include "./html5/media.rnc" +include "./html5/core-scripting.rnc" +include "./html5/tables.rnc" +include "./html5/form-datatypes.rnc" +include "./html5/web-forms.rnc" +include "./html5/web-forms2.rnc" +include "./html5/applications.rnc" +include "./html5/data.rnc" +include "./html5/aria.rnc" +include "./html5/microdata.rnc" +include "./html5/web-components.rnc" +include "./html5/rdfa.rnc" + +# More tweaks for W3C-allowed features +table.attrs &= attribute border { "" | "1" }? + +## EPUB additions + +# Elements +include "./epub-trigger.rnc" +include "./epub-switch.rnc" + +# Attributes +include "./epub-type-attr.rnc" +include "./epub-prefix-attr.rnc" +include "./epub-ssml-attrs.rnc" diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/LICENSE b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/LICENSE index 794fa17eb..0a2a5e0dc 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/LICENSE +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/LICENSE @@ -1,8 +1,8 @@ -The license statement herein applies to all files in this directory. +The RELAX NG Schema for (X)HTML 5 is licensed under the MIT open source license. +The following legal notice applies to all files in this directory: Copyright (c) 2005-2007 Elika J. Etemad (fantasai) and Henri Sivonen (hsivonen) -Copyright (c) 2007-2008 Mozilla Foundation -Copyright (c) 2010-2011 International Digital Publishing Forum +Copyright (c) 2007-2012 Mozilla Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README index 30a9c4219..d32a0826c 100644 --- a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/README @@ -1,21 +1,10 @@ The modules in this directory are part of the schema that defines a vocabulary and grammar for EPUB3 XHTML Content Documents [1], -based on W3C XHTML5 [2], with IDPF/EPUB extensions. +based on W3C HTML [2], with EPUB extensions. -The modules are derived from the schemas used in the validator.nu -service [3]. +The modules are derived from the schemas used in the Nu Html Checker [3]. -The schema for for EPUB3 XHTML Content Documents is not continuously -updated to reflect the latest version of the W3C HTML5 specification; -it is a static representation of the EPUB3 XHTML Content Document -definition, and changes to it occur only in conjunction with new -releases of the EPUB3 specification. - -Note - as the W3C HTML5 specification becomes a Final Recommendation, -it is anticipated that IDPF will no longer maintain its own complete -schema. - -[1] http://idpf.org/epub/30/spec/epub30-contentdocs.html#sec-xhtml -[2] http://www.w3.org/TR/html5/ -[3] https://bitbucket.org/validator/syntax/ +[1] p://www.idpf.org/epub3/latest/contentdocs +[2] https://www.w3.org/TR/html/ +[3] https://validator.github.io/validator/ diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc new file mode 100644 index 000000000..b7491c972 --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/applications.rnc @@ -0,0 +1,236 @@ + + +# ##################################################################### +## RELAX NG Schema for HTML 5: Web Application Features # +# ##################################################################### + +## Additions to Common Attributes + + common.attrs.interact &= + ( common.attrs.contenteditable? + & common.attrs.draggable? + & common.attrs.hidden? + & common.attrs.spellcheck? + & common.attrs.autocapitalize? + ) + + common.attrs.other &= common.attrs.interact + +## Editable Content: contenteditable + + common.attrs.contenteditable = + attribute contenteditable { + "true" | "false" | "" + } + +## Draggable Element: draggable + + common.attrs.draggable = + attribute draggable { + "true" | "false" + } + +## Hidden Element: hidden + + common.attrs.hidden = + attribute hidden { + "hidden" | "" + } + +## Spellchecking and grammar checking: spellcheck + + common.attrs.spellcheck = + attribute spellcheck{ + "true" | "false" | "" + } + +## Autocapitalization + + common.attrs.autocapitalize = + attribute autocapitalize { + ( "off" + | "none" + | "on" + | "sentences" + | "words" + | "characters" + ) + } + +## Application Cache: manifest + + html.attrs.manifest = + attribute manifest { + common.data.uri.non-empty + } + + html.attrs &= html.attrs.manifest? + +## Progess Indicator: + + progress.elem = + element progress { progress.inner & progress.attrs } + progress.attrs = + ( common.attrs + & progress.attrs.value? + & progress.attrs.max? + & ( common.attrs.aria.implicit.progressbar + | common.attrs.aria.role.progressbar + )? + ) + progress.attrs.value = + attribute value { + common.data.float.non-negative + } + progress.attrs.max = + attribute max { + common.data.float.positive + } + progress.inner = + ( common.inner.phrasing ) #Cannot enforce textContent format here + + common.elem.phrasing |= progress.elem + +## Dialog box, inspector, or window: + dialog.elem = + element dialog { dialog.inner & dialog.attrs } + dialog.attrs = + ( common.attrs + & dialog.attrs.open? + & ( common.attrs.aria.implicit.dialog + | common.attrs.aria.role.alert + | common.attrs.aria.role.alertdialog + | common.attrs.aria.role.application + | common.attrs.aria.role.contentinfo + | common.attrs.aria.role.dialog + | common.attrs.aria.role.log + | common.attrs.aria.role.marquee + | common.attrs.aria.role.region + | common.attrs.aria.role.status + | common.attrs.aria.landmark.document + | common.attrs.aria.landmark.main + | common.attrs.aria.landmark.search + )? + ) + dialog.attrs.open = + attribute open { + "open" | "" + } + dialog.inner = + ( common.inner.flow ) + common.elem.flow |= dialog.elem + +## Toolbar: + + menu.elem = + element menu { menu.inner & menu.attrs } + menu.attrs = + ( common.attrs + & ( common.attrs.aria.implicit.toolbar + | common.attrs.aria.role.directory + | common.attrs.aria.role.list + | common.attrs.aria.role.listbox + | common.attrs.aria.role.menu + | common.attrs.aria.role.menubar + | common.attrs.aria.role.tablist + | common.attrs.aria.role.toolbar + | common.attrs.aria.role.tree + | common.attrs.aria.role.presentation + )? + ) + menu.inner = + ( mli.elem* + & common.elem.script-supporting* + ) + common.elem.flow |= menu.elem + +## Toolbar item:
  • + + mli.elem = + element li { mli.inner & mli.attrs } + mli.attrs = + ( common.attrs + & ( ( common.attrs.aria.role.listitem + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.option + | common.attrs.aria.role.tab + | common.attrs.aria.role.treeitem + | common.attrs.aria.role.presentation + ) + )? + ) + mli.inner = + ( common.inner.flow ) + +## Canvas for Dynamic Graphics: + + canvas.elem.flow = + element canvas { canvas.inner.flow & canvas.attrs } + canvas.elem.phrasing = + element canvas { canvas.inner.phrasing & canvas.attrs } + canvas.attrs = + ( common.attrs + & canvas.attrs.height? + & canvas.attrs.width? + & common.attrs.aria? + ) + canvas.attrs.height = + attribute height { + common.data.integer.non-negative + } + canvas.attrs.width = + attribute width { + common.data.integer.non-negative + } + canvas.inner.flow = + ( common.inner.transparent.flow ) + canvas.inner.phrasing = + ( common.inner.phrasing ) + + common.elem.flow |= canvas.elem.flow + common.elem.phrasing |= canvas.elem.phrasing + +## Additional On-Demand Information:
    + + details.elem = + element details { details.inner & details.attrs } + details.attrs = + ( common.attrs + & details.attrs.open? + & ( common.attrs.aria.implicit.group # aria-expanded must be true if open attr present; check by assertions + | common.attrs.aria.role.group + )? + ) + details.attrs.open = + attribute open { + "open" | "" + } + details.inner = + ( summary.elem + , common.inner.flow + ) + + common.elem.flow |= details.elem + +## Caption/summary for details element: + + summary.elem = + element summary { summary.inner & summary.attrs } + summary.attrs = + ( common.attrs + & ( common.attrs.aria.implicit.button + | common.attrs.aria.role.button + )? + ) + summary.inner = + ( common.inner.phrasing + | h1.elem + | h2.elem + | h3.elem + | h4.elem + | h5.elem + | h6.elem + | hgroup.elem + ) diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc new file mode 100644 index 000000000..a0b2474a1 --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/aria.rnc @@ -0,0 +1,1724 @@ +# ##################################################################### +## RELAX NG Schema for HTML 5: Accessible Rich Internet Applications # +# ##################################################################### +# +# history: http://hsivonen.iki.fi/aria-html5-bis/ + +# ##################################################################### +## ARIA + +## Global states and properties + +aria.global = + ( aria.prop.atomic? + & aria.state.busy? + & aria.prop.controls? + & aria.state.current? + & aria.prop.describedby? + & aria.prop.details? + & aria.state.disabled? + & aria.state.dropeffect? + & aria.prop.errormessage? + & aria.prop.flowto? + & aria.state.grabbed? + & aria.prop.haspopup? + & aria.state.hidden? + & aria.state.invalid? + & aria.prop.keyshortcuts? + & aria.prop.label? + & aria.prop.labelledby? + & aria.prop.live? + & aria.prop.owns? + & aria.prop.relevant? + & aria.prop.roledescription? + ) + +common.attrs.other &= aria.global? + +## States and Properties for Native Roles + +common.attrs.aria.implicit.button |= + ( aria.state.expanded? + & aria.state.pressed? + ) + +common.attrs.aria.implicit.cell |= + ( aria.prop.colspan? + & aria.prop.rowspan? + & aria.prop.rowindex? + ) + +common.attrs.aria.implicit.checkbox |= + ( aria.state.checked? ) + +common.attrs.aria.implicit.combobox |= + ( aria.state.expanded? + & aria.prop.autocomplete? + & aria.prop.required? + & aria.prop.activedescendant? + & aria.prop.readonly? + ) + +common.attrs.aria.implicit.definition |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.dialog |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.document |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.figure |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.form |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.group |= + ( aria.state.expanded? + & aria.prop.activedescendant? + ) + +common.attrs.aria.implicit.heading |= + ( aria.state.expanded? + & aria.prop.level? + ) + +common.attrs.aria.implicit.img |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.link |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.listbox |= + ( aria.prop.multiselectable? + & aria.prop.required? + & aria.prop.activedescendant? + & aria.state.expanded? + ) + +common.attrs.aria.implicit.listitem |= + ( aria.prop.level? + & aria.prop.posinset? + & aria.prop.setsize? + & aria.state.expanded? + ) + +common.attrs.aria.implicit.option |= + ( aria.prop.posinset? + & aria.prop.setsize? + & aria.state.checked? + & aria.state.selected? + ) + +common.attrs.aria.implicit.progressbar |= + ( aria.prop.valuemax? + & aria.prop.valuemin? + & aria.prop.valuenow? + & aria.prop.valuetext? + ) + +common.attrs.aria.implicit.radio |= + ( aria.prop.posinset? + & aria.prop.setsize? + & aria.state.checked? + & aria.state.selected? + ) + +common.attrs.aria.implicit.row |= + ( aria.prop.level? # not inherited + & aria.state.selected? # not inherited + & aria.prop.activedescendant? + & aria.state.expanded? + ) + +common.attrs.aria.implicit.rowgroup |= + ( aria.prop.activedescendant? + & aria.state.expanded? + ) + +common.attrs.aria.implicit.searchbox |= + ( aria.prop.activedescendant? + & aria.prop.autocomplete? + & aria.prop.multiline? + & aria.prop.placeholder? + & aria.prop.readonly? + & aria.prop.required? + ) + +common.attrs.aria.implicit.slider |= + ( aria.prop.valuemax? + & aria.prop.valuemin? + & aria.prop.valuenow? + & aria.prop.valuetext? + & aria.prop.orientation? + ) + +common.attrs.aria.implicit.spinbutton |= + ( aria.prop.valuemax? + & aria.prop.valuemin? + & aria.prop.valuenow? + & aria.prop.valuetext? + & aria.prop.required? + ) + +common.attrs.aria.implicit.table |= + ( aria.prop.colcount? + & aria.prop.rowcount? + ) + +common.attrs.aria.implicit.term |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.textbox |= + ( aria.prop.activedescendant? + & aria.prop.autocomplete? + & aria.prop.multiline? + & aria.prop.readonly? + & aria.prop.required? + ) + +common.attrs.aria.implicit.toolbar |= + ( aria.state.expanded? + & aria.prop.activedescendant? + ) + +common.attrs.aria.implicit.column-or-row-header |= + ( aria.prop.sort? + & aria.prop.readonly? + & aria.prop.required? + & aria.state.selected? + & aria.state.expanded? + ) + +#common.attrs.aria.implicit.select |= +# ( aria.state.invalid? +# & aria.prop.required? +# & aria.prop.atomic? +# & aria.state.busy? +# & aria.prop.channel? +# & aria.prop.controls? +# & aria.prop.live? +# & aria.prop.relevant? +# ) + +# section +# | +# |_ region +# | +# |_ article +# | +# |_ landmark +# | |_ banner +# | |_ complementary +# | |_ contentinfo +# | |_ main +# | |_ navigation +# | +# |_ list +# | +# |_ status + +common.attrs.aria.implicit.section |= + ( aria.state.expanded? ) + +common.attrs.aria.implicit.region |= common.attrs.aria.implicit.section + +common.attrs.aria.implicit.article |= common.attrs.aria.implicit.region +common.attrs.aria.implicit.landmark |= common.attrs.aria.implicit.region +common.attrs.aria.implicit.list |= common.attrs.aria.implicit.region +common.attrs.aria.implicit.status |= common.attrs.aria.implicit.region + +common.attrs.aria.implicit.banner |= common.attrs.aria.implicit.landmark +common.attrs.aria.implicit.complementary |= common.attrs.aria.implicit.landmark +common.attrs.aria.implicit.contentinfo |= common.attrs.aria.implicit.landmark +common.attrs.aria.implicit.main |= common.attrs.aria.implicit.landmark +common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark + +# ##################################################################### +## States + +## busy + aria.state.busy = + attribute aria-busy + { string "true" + | string "false" #default + } + +## current + aria.state.current = + attribute aria-current + { string "page" + | string "step" + | string "location" + | string "date" + | string "time" + | string "true" + | string "false" #default + } + +## checked + aria.state.checked = + attribute aria-checked + { string "true" + | string "false" + | string "mixed" + | string "undefined" #default + } + +## disabled + aria.state.disabled = + attribute aria-disabled + { string "true" + | string "false" #default + } + +## dropeffect + aria.state.dropeffect = + attribute aria-dropeffect + { token "none" #default + | token "popup" + | token "execute" + | list + { ( string "copy" ) + , ( string "execute" )? + } + | list + { ( string "move" ) + , ( string "execute" )? + } + | list + { ( string "link" ) + , ( string "execute" )? + } + | list + { ( string "execute" ) + , ( string "copy" ) + } + | list + { ( string "execute" ) + , ( string "move" ) + } + | list + { ( string "execute" ) + , ( string "link" ) + } + } + +## expanded + aria.state.expanded = + attribute aria-expanded + { string "true" + | string "false" + | string "undefined" #default + } + +## grabbed + aria.state.grabbed = + attribute aria-grabbed + { string "true" + | string "false" + | string "undefined" #default + } + +## hidden + aria.state.hidden = + attribute aria-hidden + { string "true" + | string "false" #default + } + +## invalid + aria.state.invalid = + attribute aria-invalid + { string "true" + | string "false" #default + | string "grammar" + | string "spelling" + } + +## pressed + aria.state.pressed = + attribute aria-pressed + { string "true" + | string "false" + | string "mixed" + | string "undefined" #default + } + +## selected + aria.state.selected = + attribute aria-selected + { string "true" + | string "false" + | string "undefined" #default + } + + + +# ##################################################################### +## Properties + +## activedescendant + aria.prop.activedescendant = + attribute aria-activedescendant { + common.data.idref #REVISIT add Schematron check + } + +## atomic + aria.prop.atomic = + attribute aria-atomic + { string "true" + | string "false" #default + } + +## autocomplete + aria.prop.autocomplete = + attribute aria-autocomplete + { string "inline" + | string "list" + | string "both" + | string "none" #default + } + +## colcount + aria.prop.colcount = + attribute aria-colcount { + common.data.integer.positive + } + +## colindex + aria.prop.colindex = + attribute aria-colindex { + common.data.integer.positive + } + +## colspan + aria.prop.colspan = + attribute aria-colspan { + common.data.integer.positive + } + +## controls + aria.prop.controls = + attribute aria-controls { + common.data.idrefs #REVISIT add Schematron check + } + +## describedby + aria.prop.describedby = + attribute aria-describedby { + common.data.idrefs #REVISIT add Schematron check + } + +## details + aria.prop.details = + attribute aria-details { + common.data.idref + } + +## errormessage + aria.prop.errormessage = + attribute aria-errormessage { + common.data.idref + } + +## flowto + aria.prop.flowto = + attribute aria-flowto { + common.data.idrefs #REVISIT add Schematron check + } + +## haspopup + aria.prop.haspopup = + attribute aria-haspopup + { string "true" #REVISIT check owns or descendant + | string "false" #default + | string "menu" + | string "listbox" + | string "tree" + | string "grid" + | string "dialog" + } + +## keyshortcuts + aria.prop.keyshortcuts = + attribute aria-keyshortcuts { + string + } + +## label + aria.prop.label = + attribute aria-label { + string + } + +## labelledby + aria.prop.labelledby = + attribute aria-labelledby { + common.data.idrefs #REVISIT add Schematron check + } + +## level + aria.prop.level = + attribute aria-level { + common.data.integer.positive + } + +## live + aria.prop.live = + attribute aria-live + { string "off" #default + | string "polite" + | string "assertive" + } + +## modal + aria.prop.modal = + attribute aria-modal + { string "true" + | string "false" #default + } + +## multiline + aria.prop.multiline = + attribute aria-multiline + { string "true" + | string "false" #default + } + +## multiselectable + aria.prop.multiselectable = + attribute aria-multiselectable + { string "true" + | string "false" #default + } + +## orientation + aria.prop.orientation = + attribute aria-orientation + { string "vertical" + | string "horizontal" #default + | string "undefined" + } + +## owns + aria.prop.owns = + attribute aria-owns { + common.data.idrefs #REVISIT add Schematron check + } + +## placeholder + aria.prop.placeholder = + attribute aria-placeholder { + string + } + +## posinset + aria.prop.posinset = + attribute aria-posinset { + common.data.integer.positive + } + +## readonly + aria.prop.readonly = + attribute aria-readonly + { string "true" + | string "false" #default + } + common.attrs.aria.prop.readonly |= aria.prop.readonly + +## relevant + aria.prop.relevant = + attribute aria-relevant + { token "all" + | list + { ( string "additions" ) + , ( string "removals" )? + , ( string "text" )? + } + | list + { ( string "additions" ) + , ( string "text" )? + , ( string "removals" )? + } + | list + { ( string "removals" ) + , ( string "additions" )? + , ( string "text" )? + } + | list + { ( string "removals" ) + , ( string "text" )? + , ( string "additions" )? + } + | list + { ( string "text" ) + , ( string "additions" )? + , ( string "removals" )? + } + | list + { ( string "text" ) + , ( string "removals" )? + , ( string "additions" )? + } + } + +## required + aria.prop.required = + attribute aria-required + { string "true" + | string "false" #default + } + +## roledescription + aria.prop.roledescription = + attribute aria-roledescription { + string + } + +## rowcount + aria.prop.rowcount = + attribute aria-rowcount { + common.data.integer.positive + } + +## rowindex + aria.prop.rowindex = + attribute aria-rowindex { + common.data.integer.positive + } + +## rowspan + aria.prop.rowspan = + attribute aria-rowspan { + common.data.integer.positive + } + +## setsize + aria.prop.setsize = + attribute aria-setsize { + common.data.integer.non-negative + } + +## sort + aria.prop.sort = + attribute aria-sort + { string "ascending" + | string "descending" + | string "none" #default + | string "other" + } + +## valuemax + aria.prop.valuemax = + attribute aria-valuemax { + common.data.float #REVISIT + } + +## valuemin + aria.prop.valuemin = + attribute aria-valuemin { + common.data.float #REVISIT + } + +## valuenow + aria.prop.valuenow = + attribute aria-valuenow { + common.data.float #REVISIT + } + +## valuetext + aria.prop.valuetext = + attribute aria-valuetext { + string + } + +# ##################################################################### +## Roles + +## alert + aria.alert = + ( aria.role.alert + & aria.state.expanded? + ) + aria.role.alert = + attribute role { string "alert" } + + common.attrs.aria |= aria.alert + common.attrs.aria.role.alert |= aria.alert + +## alertdialog + aria.alertdialog = + ( aria.role.alertdialog + & aria.state.expanded? + & aria.prop.modal? + ) + aria.role.alertdialog = + attribute role { string "alertdialog" } + + common.attrs.aria |= aria.alertdialog + common.attrs.aria.role.alertdialog |= aria.alertdialog + +## application + aria.application = + ( aria.role.application + & aria.state.expanded? + ) + aria.role.application = + attribute role { string "application" } + + common.attrs.aria |= aria.application + common.attrs.aria.role.application |= aria.application + +## article + aria.article = + ( aria.role.article + & aria.state.expanded? + ) + aria.role.article = + attribute role { string "article" } + + common.attrs.aria |= aria.article + common.attrs.aria.landmark.article |= aria.article + +## banner + aria.banner = + ( aria.role.banner + & aria.state.expanded? + ) + aria.role.banner = + attribute role { string "banner" } + + common.attrs.aria |= aria.banner + common.attrs.aria.landmark.banner |= aria.banner + +## button + aria.button = + ( aria.role.button + & aria.state.expanded? + & aria.state.pressed? # not inherited + ) + aria.role.button = + attribute role { string "button" } + + common.attrs.aria |= aria.button + common.attrs.aria.role.button |= aria.button + +## cell + aria.cell = + ( aria.role.cell + & aria.prop.colspan? + & aria.prop.rowspan? + & aria.prop.rowindex? + ) + aria.role.cell = + attribute role { string "cell" } + common.attrs.aria |= aria.cell + common.attrs.aria.role.cell |= aria.cell + +## checkbox + aria.checkbox = + ( aria.role.checkbox + & aria.state.checked #required! + ) + aria.role.checkbox = + attribute role { string "checkbox" } + + common.attrs.aria |= aria.checkbox + common.attrs.aria.role.checkbox |= aria.checkbox + +# columnheader + aria.columnheader = + ( aria.role.columnheader + & aria.prop.sort? # not inherited + & aria.prop.readonly? # not inherited + & aria.state.selected? # not inherited + & aria.state.expanded? + & aria.prop.required? + & aria.prop.colspan? + & aria.prop.rowspan? + & aria.prop.rowindex? + ) + aria.role.columnheader = + attribute role { string "columnheader" } + + common.attrs.aria |= aria.columnheader + +## combobox + aria.combobox = + # aria.prop.controls TODO: required! add check to Assertions + ( aria.role.combobox + & aria.prop.activedescendant? + & aria.state.expanded #required! + & aria.prop.autocomplete? + & aria.prop.required? + & aria.prop.readonly? + & aria.prop.orientation? + ) + aria.role.combobox = + attribute role { string "combobox" } + + common.attrs.aria |= aria.combobox + common.attrs.aria.role.combobox |= aria.combobox + +## complementary + aria.complementary = + ( aria.role.complementary + & aria.state.expanded? + ) + aria.role.complementary = + attribute role { string "complementary" } + + common.attrs.aria |= aria.complementary + common.attrs.aria.landmark.complementary |= aria.complementary + +## contentinfo + aria.contentinfo = + ( aria.role.contentinfo + & aria.state.expanded? + ) + aria.role.contentinfo = + attribute role { string "contentinfo" } + + common.attrs.aria |= aria.contentinfo + common.attrs.aria.landmark.contentinfo |= aria.contentinfo + +## definition + aria.definition = + ( aria.role.definition + & aria.state.expanded? + ) + aria.role.definition = + attribute role { string "definition" } + + common.attrs.aria |= aria.definition + common.attrs.aria.role.definition |= aria.definition + +## dialog + aria.dialog = + ( aria.role.dialog + & aria.state.expanded? + & aria.prop.modal? + ) + aria.role.dialog = + attribute role { string "dialog" } + + common.attrs.aria |= aria.dialog + common.attrs.aria.role.dialog |= aria.dialog + +## directory + aria.directory = + ( aria.role.directory + & aria.state.expanded? + ) + aria.role.directory = + attribute role { string "directory" } + + common.attrs.aria |= aria.directory + common.attrs.aria.role.directory |= aria.directory + +## document + aria.document = + ( aria.role.document + & aria.state.expanded? + ) + aria.role.document = + attribute role { string "document" } + + common.attrs.aria |= aria.document + common.attrs.aria.landmark.document |= aria.document + +## feed + aria.feed = + ( aria.role.feed + & aria.state.expanded? + ) + aria.role.feed = + attribute role { string "feed" } + + common.attrs.aria |= aria.feed + common.attrs.aria.role.feed |= aria.feed + +## figure + aria.figure = + ( aria.role.figure + & aria.state.expanded? + ) + aria.role.figure = + attribute role { string "figure" } + + common.attrs.aria |= aria.figure + common.attrs.aria.role.figure |= aria.figure + +## form + aria.form = + ( aria.role.form + & aria.state.expanded? + ) + aria.role.form = + attribute role { string "form" } + + common.attrs.aria |= aria.form + common.attrs.aria.landmark.form |= aria.form + +## grid + aria.grid = + ( aria.role.grid + & aria.prop.level? # not inherited + & aria.prop.multiselectable? # not inherited + & aria.prop.readonly? # not inherited + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.colcount? + & aria.prop.rowcount? + ) + aria.role.grid = + attribute role { string "grid" } + + common.attrs.aria |= aria.grid + +## gridcell + aria.gridcell = + ( aria.role.gridcell + & aria.prop.level? # net inherited + & aria.prop.readonly? # not inherited + & aria.state.selected? # not inherited + & aria.state.expanded? + & aria.prop.required? + & aria.prop.colspan? + & aria.prop.rowspan? + & aria.prop.rowindex? + ) + aria.role.gridcell = + attribute role { string "gridcell" } + + common.attrs.aria |= aria.gridcell + +## group + aria.group = + ( aria.role.group + & aria.prop.activedescendant? # not inherited + & aria.state.expanded? # not inherited + ) + aria.role.group = + attribute role { string "group" } + + common.attrs.aria |= aria.group + common.attrs.aria.role.group |= aria.group + +## graphics-document + aria.graphics-document = + ( aria.role.graphics-document ) + aria.role.graphics-document = + attribute role { string "graphics-document" } + common.attrs.aria |= aria.graphics-document + common.attrs.aria.role.graphics-document |= aria.graphics-document + +## graphics-object + aria.graphics-object = + ( aria.role.graphics-object ) + aria.role.graphics-object = + attribute role { string "graphics-object" } + common.attrs.aria |= aria.graphics-object + common.attrs.aria.role.graphics-object |= aria.graphics-object + +## graphics-symbol + aria.graphics-symbol = + ( aria.role.graphics-symbol ) + aria.role.graphics-symbol = + attribute role { string "graphics-symbol" } + common.attrs.aria |= aria.graphics-symbol + common.attrs.aria.role.graphics-symbol |= aria.graphics-symbol + +## heading + aria.heading = + ( aria.role.heading + & aria.prop.level ? # not inherited + & aria.state.expanded? + ) + aria.role.heading = + attribute role { string "heading" } + + common.attrs.aria |= aria.heading + common.attrs.aria.role.heading |= aria.heading + +## img + aria.img = + ( aria.role.img + & aria.state.expanded? + ) + aria.role.img = + attribute role { string "img" } + + common.attrs.aria |= aria.img + common.attrs.aria.role.img |= aria.img + +## link + aria.link = + ( aria.role.link + & aria.state.expanded? + ) + aria.role.link = + attribute role { string "link" } + + common.attrs.aria |= aria.link + common.attrs.aria.role.link |= aria.link + +## list + aria.list = + ( aria.role.list + & aria.state.expanded? + ) + aria.role.list = + attribute role { string "list" } + + common.attrs.aria |= aria.list + common.attrs.aria.role.list |= aria.list + +## listbox + aria.listbox = + ( aria.role.listbox + & aria.prop.multiselectable? # not inherited + & aria.prop.required? + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.orientation? + ) + aria.role.listbox = + attribute role { string "listbox" } + + common.attrs.aria |= aria.listbox + common.attrs.aria.role.listbox |= aria.listbox + +## listitem + aria.listitem = + ( aria.role.listitem + & aria.prop.posinset? # not inherited + & aria.prop.setsize? # not inherited + & aria.prop.level? # not inherited + & aria.state.expanded? + ) + aria.role.listitem = + attribute role { string "listitem" } + + common.attrs.aria |= aria.listitem + common.attrs.aria.role.listitem |= aria.listitem + +## log + aria.log = + ( aria.role.log + & aria.state.expanded? + ) + aria.role.log = + attribute role { string "log" } + + common.attrs.aria |= aria.log + common.attrs.aria.role.log |= aria.log + +## main + aria.main = + ( aria.role.main + & aria.state.expanded? + ) + aria.role.main = + attribute role { string "main" } + + common.attrs.aria |= aria.main + common.attrs.aria.landmark.main |= aria.main + +## marquee + aria.marquee = + ( aria.role.marquee + & aria.state.expanded? + ) + aria.role.marquee = + attribute role { string "marquee" } + + common.attrs.aria |= aria.marquee + common.attrs.aria.role.marquee |= aria.marquee + +## math + aria.math = + ( aria.role.math + & aria.state.expanded? + ) + aria.role.math = + attribute role { string "math" } + + common.attrs.aria |= aria.math + +## menu + aria.menu = + ( aria.role.menu + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.orientation? + ) + aria.role.menu = + attribute role { string "menu" } + + common.attrs.aria |= aria.menu + common.attrs.aria.role.menu |= aria.menu + +## menubar + aria.menubar = + ( aria.role.menubar + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.orientation? + ) + aria.role.menubar = + attribute role { string "menubar" } + + common.attrs.aria |= aria.menubar + common.attrs.aria.role.menubar |= aria.menubar + + +## menuitem + aria.menuitem = + ( aria.role.menuitem + & aria.state.expanded? + & aria.prop.posinset? + & aria.prop.setsize? + ) + aria.role.menuitem = + attribute role { string "menuitem" } + + common.attrs.aria |= aria.menuitem + common.attrs.aria.role.menuitem |= aria.menuitem + +## menuitemcheckbox + aria.menuitemcheckbox = + ( aria.role.menuitemcheckbox + & aria.state.checked #required + ) + aria.role.menuitemcheckbox = + attribute role { string "menuitemcheckbox" } + + common.attrs.aria |= aria.menuitemcheckbox + common.attrs.aria.role.menuitemcheckbox |= aria.menuitemcheckbox + +## menuitemradio + aria.menuitemradio = + ( aria.role.menuitemradio + & aria.state.checked #required + & aria.state.selected? + & aria.prop.posinset? + & aria.prop.setsize? + ) + aria.role.menuitemradio = + attribute role { string "menuitemradio" } + + common.attrs.aria |= aria.menuitemradio + common.attrs.aria.role.menuitemradio |= aria.menuitemradio + +## navigation + aria.navigation = + ( aria.role.navigation + & aria.state.expanded? + ) + aria.role.navigation = + attribute role { string "navigation" } + + common.attrs.aria |= aria.navigation + common.attrs.aria.landmark.navigation |= aria.navigation + +## none + aria.none = + ( aria.role.none ) + aria.role.none = + attribute role { string "none" } + common.attrs.aria |= aria.none + common.attrs.aria.role.none |= aria.none + +## note + aria.note = + ( aria.role.note + & aria.state.expanded? + ) + aria.role.note = + attribute role { string "note" } + + common.attrs.aria |= aria.note + common.attrs.aria.landmark.note |= aria.note + +## option + aria.option = + ( aria.role.option + & aria.state.checked? # not inherited + & aria.state.selected? # not inherited + & aria.prop.posinset? + & aria.prop.setsize? + ) + aria.role.option = + attribute role { string "option" } + + common.attrs.aria |= aria.option + common.attrs.aria.role.option |= aria.option + +## presentation + aria.presentation = + ( aria.role.presentation ) + aria.role.presentation = + attribute role { string "presentation" } + + common.attrs.aria |= aria.presentation + common.attrs.aria.role.presentation |= aria.presentation + common.attrs.aria.role.presentation |= aria.none + +## progressbar + aria.progressbar = + ( aria.role.progressbar + & aria.prop.valuemax? # not inherited + & aria.prop.valuemin? # not inherited + & aria.prop.valuenow? # not inherited + & aria.prop.valuetext? # not inherited + ) + aria.role.progressbar = + attribute role { string "progressbar" } + + common.attrs.aria |= aria.progressbar + common.attrs.aria.role.progressbar |= aria.progressbar + +## radio + aria.radio = + ( aria.role.radio + & aria.state.checked #required! + & aria.state.selected? + & aria.prop.posinset? + & aria.prop.setsize? + ) + aria.role.radio = + attribute role { string "radio" } + + common.attrs.aria |= aria.radio + common.attrs.aria.role.radio |= aria.radio + +## radiogroup + aria.radiogroup = + ( aria.role.radiogroup + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.required? + & aria.prop.orientation? + ) + aria.role.radiogroup = + attribute role { string "radiogroup" } + + common.attrs.aria |= aria.radiogroup + common.attrs.aria.role.radiogroup |= aria.radiogroup + +## region + aria.region = + ( aria.role.region + & aria.state.expanded? + ) + aria.role.region = + attribute role { string "region" } + + common.attrs.aria |= aria.region + common.attrs.aria.role.region |= aria.region + +## row + aria.row = + ( aria.role.row + & aria.prop.level? # not inherited + & aria.state.selected? # not inherited + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.colindex? + & aria.prop.rowindex? + ) + aria.role.row = + attribute role { string "row" } + + common.attrs.aria |= aria.row + +## rowgroup + aria.rowgroup = + ( aria.role.rowgroup + & aria.prop.activedescendant? + & aria.state.expanded? + ) + aria.role.rowgroup = + attribute role { string "rowgroup" } + + common.attrs.aria |= aria.rowgroup + common.attrs.aria.role.rowgroup |= aria.rowgroup + +# rowheader + aria.rowheader = + ( aria.role.rowheader + & aria.prop.sort? # not inherited + & aria.prop.readonly? # not inherited + & aria.state.selected? # not inherited + & aria.state.expanded? + & aria.prop.required? + & aria.prop.colspan? + & aria.prop.rowspan? + & aria.prop.rowindex? + ) + aria.role.rowheader = + attribute role { string "rowheader" } + + common.attrs.aria |= aria.rowheader + +## searchbox + aria.searchbox = + ( aria.role.searchbox + & aria.prop.activedescendant? + & aria.prop.autocomplete? + & aria.prop.multiline? + & aria.prop.placeholder? + & aria.prop.readonly? + & aria.prop.required? + ) + aria.role.searchbox = + attribute role { string "searchbox" } + common.attrs.aria |= aria.searchbox + common.attrs.aria.role.searchbox |= aria.searchbox + +## scrollbar + aria.scrollbar = + ( aria.role.scrollbar + & aria.prop.orientation + & aria.prop.valuemax + & aria.prop.valuemin + & aria.prop.valuenow + & aria.prop.valuetext? + ) + aria.role.scrollbar = + attribute role { string "scrollbar" } + + common.attrs.aria |= aria.scrollbar + +## search + aria.search = + ( aria.role.search + & aria.state.expanded? + & aria.prop.orientation? + ) + aria.role.search = + attribute role { string "search" } + + common.attrs.aria |= aria.search + common.attrs.aria.landmark.search |= aria.search + +## separator + aria.separator = + ( aria.role.separator + & aria.state.expanded? + & aria.prop.orientation? + ) + aria.role.separator = + attribute role { string "separator" } + + common.attrs.aria |= aria.separator + common.attrs.aria.role.separator |= aria.separator + +## slider + aria.slider = + ( aria.role.slider + & aria.prop.valuemax + & aria.prop.valuemin + & aria.prop.valuenow + & aria.prop.valuetext? + & aria.prop.orientation? + ) + aria.role.slider = + attribute role { string "slider" } + + common.attrs.aria |= aria.slider + common.attrs.aria.role.slider |= aria.slider + +## spinbutton + aria.spinbutton = + ( aria.role.spinbutton + & aria.prop.valuemax + & aria.prop.valuemin + & aria.prop.valuenow + & aria.prop.valuetext? + & aria.prop.required? + ) + aria.role.spinbutton = + attribute role { string "spinbutton" } + + common.attrs.aria |= aria.spinbutton + common.attrs.aria.role.spinbutton |= aria.spinbutton + +## status + aria.status = + ( aria.role.status + & aria.state.expanded? + ) + aria.role.status = + attribute role { string "status" } + + common.attrs.aria |= aria.status + common.attrs.aria.role.status |= aria.status + +## switch + aria.switch = + ( aria.role.switch + & aria.state.checked #required! + ) + aria.role.switch = + attribute role { string "switch" } + + common.attrs.aria |= aria.switch + common.attrs.aria.role.switch |= aria.switch + +## tab + aria.tab = + ( aria.role.tab + & aria.state.selected? + & aria.state.expanded? + ) + aria.role.tab = + attribute role { string "tab" } + + common.attrs.aria |= aria.tab + common.attrs.aria.role.tab |= aria.tab + +## table + aria.table = + ( aria.role.table + & aria.prop.colcount? + & aria.prop.rowcount? + ) + aria.role.table = + attribute role { string "table" } + common.attrs.aria |= aria.table + common.attrs.aria.role.table |= aria.table + +## tablist + aria.tablist = + ( aria.role.tablist + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.level? + & aria.prop.multiselectable? + & aria.prop.orientation? + ) + aria.role.tablist = + attribute role { string "tablist" } + common.attrs.aria |= aria.tablist + common.attrs.aria.role.tablist |= aria.tablist + +## tabpanel + aria.tabpanel = + ( aria.role.tabpanel + & aria.state.expanded? + ) + aria.role.tabpanel = + attribute role { string "tabpanel" } + + common.attrs.aria |= aria.tabpanel + common.attrs.aria.role.tabpanel |= aria.tabpanel + +## term + aria.term = + ( aria.role.term + & aria.state.expanded? + ) + aria.role.term = + attribute role { string "term" } + common.attrs.aria |= aria.term + common.attrs.aria.role.term |= aria.term + +## textbox + aria.textbox = + ( aria.role.textbox + & aria.prop.activedescendant? + & aria.prop.autocomplete? # not inherited + & aria.prop.multiline? # not inherited + & aria.prop.placeholder? + & aria.prop.readonly? # not inherited + & aria.prop.required? + ) + aria.role.textbox = + attribute role { string "textbox" } + + common.attrs.aria |= aria.textbox + common.attrs.aria.role.textbox |= aria.textbox + +## timer + aria.timer = + ( aria.role.timer + & aria.state.expanded? + ) + aria.role.timer = + attribute role { string "timer" } + + common.attrs.aria |= aria.timer + +## toolbar + aria.toolbar = + ( aria.role.toolbar + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.orientation? + ) + aria.role.toolbar = + attribute role { string "toolbar" } + + common.attrs.aria |= aria.toolbar + common.attrs.aria.role.toolbar |= aria.toolbar + +## tooltip + aria.tooltip = + ( aria.role.tooltip + & aria.state.expanded? + ) + aria.role.tooltip = + attribute role { string "tooltip" } + + common.attrs.aria |= aria.tooltip + +## tree + aria.tree = + ( aria.role.tree + & aria.prop.multiselectable? # not inherited + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.required? + & aria.prop.orientation? + ) + aria.role.tree = + attribute role { string "tree" } + + common.attrs.aria |= aria.tree + common.attrs.aria.role.tree |= aria.tree + +## treegrid + aria.treegrid = + ( aria.role.treegrid + & aria.prop.activedescendant? + & aria.state.expanded? + & aria.prop.level? + & aria.prop.multiselectable? + & aria.prop.readonly? + & aria.prop.required? + & aria.prop.orientation? + & aria.prop.colcount? + & aria.prop.rowcount? + ) + aria.role.treegrid = + attribute role { string "treegrid" } + + common.attrs.aria |= aria.treegrid + +## treeitem + aria.treeitem = + ( aria.role.treeitem + & aria.state.checked? + & aria.state.expanded? + & aria.prop.level? + & aria.prop.posinset? + & aria.state.selected? + & aria.prop.setsize? + ) + aria.role.treeitem = + attribute role { string "treeitem" } + + common.attrs.aria |= aria.treeitem + common.attrs.aria.role.treeitem |= aria.treeitem + +# ##################################################################### +## https://w3c.github.io/aria/aria/dpub.html + + aria.doc-abstract = aria.role.doc-abstract + aria.role.doc-abstract = attribute role { string "doc-abstract" } + common.attrs.aria |= aria.doc-abstract + common.attrs.aria.role.doc-abstract |= aria.doc-abstract + + aria.doc-acknowledgments = aria.role.doc-acknowledgments + aria.role.doc-acknowledgments = attribute role { string "doc-acknowledgments" } + common.attrs.aria |= aria.doc-acknowledgments + common.attrs.aria.role.doc-acknowledgments |= aria.doc-acknowledgments + + aria.doc-afterword = aria.role.doc-afterword + aria.role.doc-afterword = attribute role { string "doc-afterword" } + common.attrs.aria |= aria.doc-afterword + common.attrs.aria.role.doc-afterword |= aria.doc-afterword + + aria.doc-appendix = aria.role.doc-appendix + aria.role.doc-appendix = attribute role { string "doc-appendix" } + common.attrs.aria |= aria.doc-appendix + common.attrs.aria.role.doc-appendix |= aria.doc-appendix + + aria.doc-backlink = aria.role.doc-backlink + aria.role.doc-backlink = attribute role { string "doc-backlink" } + common.attrs.aria |= aria.doc-backlink + common.attrs.aria.role.doc-backlink |= aria.doc-backlink + + aria.doc-biblioentry = aria.role.doc-biblioentry + aria.role.doc-biblioentry = attribute role { string "doc-biblioentry" } + common.attrs.aria |= aria.doc-biblioentry + common.attrs.aria.role.doc-biblioentry |= aria.doc-biblioentry + + aria.doc-bibliography = aria.role.doc-bibliography + aria.role.doc-bibliography = attribute role { string "doc-bibliography" } + common.attrs.aria |= aria.doc-bibliography + common.attrs.aria.role.doc-bibliography |= aria.doc-bibliography + + aria.doc-biblioref = aria.role.doc-biblioref + aria.role.doc-biblioref = attribute role { string "doc-biblioref" } + common.attrs.aria |= aria.doc-biblioref + common.attrs.aria.role.doc-biblioref |= aria.doc-biblioref + + aria.doc-chapter = aria.role.doc-chapter + aria.role.doc-chapter = attribute role { string "doc-chapter" } + common.attrs.aria |= aria.doc-chapter + common.attrs.aria.role.doc-chapter |= aria.doc-chapter + + aria.doc-colophon = aria.role.doc-colophon + aria.role.doc-colophon = attribute role { string "doc-colophon" } + common.attrs.aria |= aria.doc-colophon + common.attrs.aria.role.doc-colophon |= aria.doc-colophon + + aria.doc-conclusion = aria.role.doc-conclusion + aria.role.doc-conclusion = attribute role { string "doc-conclusion" } + common.attrs.aria |= aria.doc-conclusion + common.attrs.aria.role.doc-conclusion |= aria.doc-conclusion + + aria.doc-cover = aria.role.doc-cover + aria.role.doc-cover = attribute role { string "doc-cover" } + common.attrs.aria |= aria.doc-cover + common.attrs.aria.role.doc-cover |= aria.doc-cover + + aria.doc-credit = aria.role.doc-credit + aria.role.doc-credit = attribute role { string "doc-credit" } + common.attrs.aria |= aria.doc-credit + common.attrs.aria.role.doc-credit |= aria.doc-credit + + aria.doc-credits = aria.role.doc-credits + aria.role.doc-credits = attribute role { string "doc-credits" } + common.attrs.aria |= aria.doc-credits + common.attrs.aria.role.doc-credits |= aria.doc-credits + + aria.doc-dedication = aria.role.doc-dedication + aria.role.doc-dedication = attribute role { string "doc-dedication" } + common.attrs.aria |= aria.doc-dedication + common.attrs.aria.role.doc-dedication |= aria.doc-dedication + + aria.doc-endnote = aria.role.doc-endnote + aria.role.doc-endnote = attribute role { string "doc-endnote" } + common.attrs.aria |= aria.doc-endnote + common.attrs.aria.role.doc-endnote |= aria.doc-endnote + + aria.doc-endnotes = aria.role.doc-endnotes + aria.role.doc-endnotes = attribute role { string "doc-endnotes" } + common.attrs.aria |= aria.doc-endnotes + common.attrs.aria.role.doc-endnotes |= aria.doc-endnotes + + aria.doc-epigraph = aria.role.doc-epigraph + aria.role.doc-epigraph = attribute role { string "doc-epigraph" } + common.attrs.aria |= aria.doc-epigraph + common.attrs.aria.role.doc-epigraph |= aria.doc-epigraph + + aria.doc-epilogue = aria.role.doc-epilogue + aria.role.doc-epilogue = attribute role { string "doc-epilogue" } + common.attrs.aria |= aria.doc-epilogue + common.attrs.aria.role.doc-epilogue |= aria.doc-epilogue + + aria.doc-errata = aria.role.doc-errata + aria.role.doc-errata = attribute role { string "doc-errata" } + common.attrs.aria |= aria.doc-errata + common.attrs.aria.role.doc-errata |= aria.doc-errata + + aria.doc-example = aria.role.doc-example + aria.role.doc-example = attribute role { string "doc-example" } + common.attrs.aria |= aria.doc-example + common.attrs.aria.role.doc-example |= aria.doc-example + + aria.doc-footnote = aria.role.doc-footnote + aria.role.doc-footnote = attribute role { string "doc-footnote" } + common.attrs.aria |= aria.doc-footnote + common.attrs.aria.role.doc-footnote |= aria.doc-footnote + + aria.doc-foreword = aria.role.doc-foreword + aria.role.doc-foreword = attribute role { string "doc-foreword" } + common.attrs.aria |= aria.doc-foreword + common.attrs.aria.role.doc-foreword |= aria.doc-foreword + + aria.doc-glossary = aria.role.doc-glossary + aria.role.doc-glossary = attribute role { string "doc-glossary" } + common.attrs.aria |= aria.doc-glossary + common.attrs.aria.role.doc-glossary |= aria.doc-glossary + + aria.doc-glossref = aria.role.doc-glossref + aria.role.doc-glossref = attribute role { string "doc-glossref" } + common.attrs.aria |= aria.doc-glossref + common.attrs.aria.role.doc-glossref |= aria.doc-glossref + + aria.doc-index = aria.role.doc-index + aria.role.doc-index = attribute role { string "doc-index" } + common.attrs.aria |= aria.doc-index + common.attrs.aria.role.doc-index |= aria.doc-index + + aria.doc-introduction = aria.role.doc-introduction + aria.role.doc-introduction = attribute role { string "doc-introduction" } + common.attrs.aria |= aria.doc-introduction + common.attrs.aria.role.doc-introduction |= aria.doc-introduction + + aria.doc-noteref = aria.role.doc-noteref + aria.role.doc-noteref = attribute role { string "doc-noteref" } + common.attrs.aria |= aria.doc-noteref + common.attrs.aria.role.doc-noteref |= aria.doc-noteref + + aria.doc-notice = aria.role.doc-notice + aria.role.doc-notice = attribute role { string "doc-notice" } + common.attrs.aria |= aria.doc-notice + common.attrs.aria.role.doc-notice |= aria.doc-notice + + aria.doc-pagebreak = aria.role.doc-pagebreak + aria.role.doc-pagebreak = attribute role { string "doc-pagebreak" } + common.attrs.aria |= aria.doc-pagebreak + common.attrs.aria.role.doc-pagebreak |= aria.doc-pagebreak + + aria.doc-pagelist = aria.role.doc-pagelist + aria.role.doc-pagelist = attribute role { string "doc-pagelist" } + common.attrs.aria |= aria.doc-pagelist + common.attrs.aria.role.doc-pagelist |= aria.doc-pagelist + + aria.doc-part = aria.role.doc-part + aria.role.doc-part = attribute role { string "doc-part" } + common.attrs.aria |= aria.doc-part + common.attrs.aria.role.doc-part |= aria.doc-part + + aria.doc-preface = aria.role.doc-preface + aria.role.doc-preface = attribute role { string "doc-preface" } + common.attrs.aria |= aria.doc-preface + common.attrs.aria.role.doc-preface |= aria.doc-preface + + aria.doc-prologue = aria.role.doc-prologue + aria.role.doc-prologue = attribute role { string "doc-prologue" } + common.attrs.aria |= aria.doc-prologue + common.attrs.aria.role.doc-prologue |= aria.doc-prologue + + aria.doc-pullquote = aria.role.doc-pullquote + aria.role.doc-pullquote = attribute role { string "doc-pullquote" } + common.attrs.aria |= aria.doc-pullquote + common.attrs.aria.role.doc-pullquote |= aria.doc-pullquote + + aria.doc-qna = aria.role.doc-qna + aria.role.doc-qna = attribute role { string "doc-qna" } + common.attrs.aria |= aria.doc-qna + common.attrs.aria.role.doc-qna |= aria.doc-qna + + aria.doc-subtitle = aria.role.doc-subtitle + aria.role.doc-subtitle = attribute role { string "doc-subtitle" } + common.attrs.aria |= aria.doc-subtitle + common.attrs.aria.role.doc-subtitle |= aria.doc-subtitle + + aria.doc-tip = aria.role.doc-tip + aria.role.doc-tip = attribute role { string "doc-tip" } + common.attrs.aria |= aria.doc-tip + common.attrs.aria.role.doc-tip |= aria.doc-tip + + aria.doc-toc = aria.role.doc-toc + aria.role.doc-toc = attribute role { string "doc-toc" } + common.attrs.aria |= aria.doc-toc + common.attrs.aria.role.doc-toc |= aria.doc-toc diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/assertions.sch b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/assertions.sch new file mode 100644 index 000000000..2b34fcc01 --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/assertions.sch @@ -0,0 +1,1235 @@ + + + + + + + + + + + + + + + + + + + A “bdo” element must have a + “dir” attribute. + + + + + An “img” element must have an + “alt” attribute, except under certain + conditions. For details, consult guidance on + providing text alternatives for images. + http://www.w3.org/wiki/HTML/Usage/TextAlternatives + + + + + + + + + + + The “” element must not contain any nested + “” elements. + + + + + + The “” element must not contain any nested + “” elements. + + + The “label” element may contain at most one descendant + “input” element, + “button” element, + “select” element, + or “textarea” element. + + + The “for” attribute of the “label” + element must refer to a form control. + + + + + + The sectioning element “” must not + appear as a descendant of the “address” element. + + + + + + The element “footer” must not + appear as a descendant of the “header” element. + + + The element “footer” must not + appear as a descendant of the “footer” element. + + + The element “footer” must not + appear as a descendant of the “address” element. + + + + + + The “” element must not appear as a + descendant of the “address” element. + + + + + + The “” element must not appear as a + descendant of the “footer” element. + + + The “” element must not appear as a + descendant of the “address” element. + + + The “header” element must not appear as a + descendant of the “header” element. + + + + + + The element “table” must not appear as a + descendant of the “caption” element. + + + The “summary” attribute on the + “table” element is obsolete. + Consider describing the structure of the table + in a “caption” element or + in a “figure” element containing + the “table” element; or, simplify + the structue of the table so that no + description is needed. + + + + + + + + + + + + The interactive element “” must not + appear as a descendant of the “a” element. + + + The interactive element “” must not + appear as a descendant of the “button” element. + + + + + + The interactive element “” must not + appear as a descendant of the “a” element. + + + The interactive element “” must not + appear as a descendant of the “button” element. + + + Any “” element descendant of a “label” element + with a “for” attribute must have an + ID value that matches that “for” attribute. + + + + + + The interactive element “” + with the attribute “controls” must not + appear as a descendant of the “a” element. + + + The interactive element “” + with the attribute “controls” must not + appear as a descendant of the “button” element. + + + + + + The element “menu” + with the attribute “type” whose value is “toolbar” must not + appear as a descendant of the “a” element. + + + The element “menu” + with the attribute “type” whose value is “toolbar” must not + appear as a descendant of the “button” element. + + + + + + The element “img” + with the attribute “usemap” must not + appear as a descendant of the “a” element. + + + The element “img” + with the attribute “usemap” must not + appear as a descendant of the “button” element. + + + + + + The element “object” + with the attribute “usemap” must not + appear as a descendant of the “a” element. + + + The element “object” + with the attribute “usemap” must not + appear as a descendant of the “button” element. + + + + + + + + + + + + The “area” element must have an ancestor + “map” element. + + + + + + The “img” element with the + “ismap” attribute set must have an ancestor + “a” element with the “href” attribute. + + + + + + The “list” attribute of the “input” + element must refer to a “datalist” element. + + + Element “input” with attribute “type” + whose value is “button” must have non-empty attribute + “value”. + + + + + + Attribute “label” for element “track” + must have non-empty value. + + + The “default” attribute must not occur on more than one + “track” element within the same “audio” + element or “video” element. + + + + + + The “id” attribute on a “map” element must have + the same value as the “name” attribute. + + + + + + The “select” element cannot have more than one + selected “option” element descendant unless the + “multiple” attribute is specified. + + + A “select” element with + a “required” attribute and without + a “multiple” attribute, and whose + size is “1”, must have a child + “option” element. + + + + + + The first child “option” element + of a “select” element with + a “required” attribute and without + a “multiple” attribute, and whose + size is “1”, must have either an + empty “value” attribute, or must + have no text content. + + + + + + Element “script” with attribute + “language” whose value is “JavaScript” + must not have attribute “type” whose value is not + “text/javascript”. + + + Element “script” must not have attribute + “charset” unless attribute “src” is + also specified. + + + Element “script” must not have attribute + “defer” unless attribute “src” is + also specified. + + + Element “script” must not have attribute + “async” unless attribute “src” is + also specified. + + + + + + The element “time” must not + appear as a descendant of the “time” element. + + + + + + The element “progress” must not + appear as a descendant of the “progress” element. + + + The value of the “value” attribute must be less than or equal to + the value of the “max” attribute. + + + The value of the “value” attribute must be less than or equal to + one when the “max” attribute is absent. + + + + + + + + The element “meter” must not + appear as a descendant of the “meter” element. + + + The value of the “min” attribute must be less than or equal to + the value of the “value” attribute. + + + The value of the “value” attribute must be greater than or equal to + zero when the “min” attribute is absent. + + + The value of the “value” attribute must be less than or equal to + the value of the “max” attribute. + + + The value of the “value” attribute must be less than or equal to + one when the “max” attribute is absent. + + + The value of the “min” attribute must be less than or equal to + the value of the “max” attribute. + + + The value of the “max” attribute must be greater than or equal to + zero when the “min” attribute is absent. + + + The value of the “min” attribute must be less than or equal to + one when the “max” attribute is absent. + + + The value of the “min” attribute must be less than or equal to + the value of the “low” attribute. + + + The value of the “low” attribute must be greater than or equal to + zero when the “min” attribute is absent. + + + The value of the “min” attribute must be less than or equal to + the value of the “high” attribute. + + + The value of the “high” attribute must be greater than or equal to + zero when the “min” attribute is absent. + + + The value of the “low” attribute must be less than or equal to + the value of the “high” attribute. + + + The value of the “high” attribute must be less than or equal to + the value of the “max” attribute. + + + The value of the “high” attribute must be less than or equal to + one when the “max” attribute is absent. + + + The value of the “low” attribute must be less than or equal to + the value of the “max” attribute. + + + The value of the “low” attribute must be less than or equal to + one when the “max” attribute is absent. + + + The value of the “min” attribute must be less than or equal to + the value of the “optimum” attribute. + + + The value of the “optimum” attribute must be greater than or equal to + zero when the “min” attribute is absent. + + + The value of the “optimum” attribute must be less than or equal to + the value of the “max” attribute. + + + The value of the “optimum” attribute must be less than or equal to + one when the “max” attribute is absent. + + + + + + + + + The “acronym” element is obsolete. Use the “abbr” element instead. + + + + + + The “applet” element is obsolete. Use the “object” element instead. + + + + + + The “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “dir” element is obsolete. Use the “ul” element instead. + + + + + + The “” element is obsolete. + Use the “iframe” element and CSS instead, or use server-side includes. + + + + + + + + + + The “coords” attribute on the “” element is obsolete. + For image maps, use the “area” element instead of the “a” element. + + + The “shape” attribute on the “” element is obsolete. + For image maps, use the “area” element instead of the “a” element. + + + The “urn” attribute on the “” element is obsolete. + Specify the preferred persistent identifier using the “href” attribute instead. + + + The “charset” attribute on the “” element is obsolete. + Use an HTTP Content-Type header on the linked resource instead. + + + The “methods” attribute on the “” element is obsolete. + Use the HTTP OPTIONS feature instead. + + + The “rev” attribute on the “” element is obsolete. + Use the “rel” attribute instead, with a term having the opposite meaning. + + + + + + The “target” attribute on the “” element is obsolete. + You can safely omit it. + + + The “urn” attribute on the “” element is obsolete. + Specify the preferred persistent identifier using the “href” attribute instead. + + + The “charset” attribute on the “” element is obsolete. + Use an HTTP Content-Type header on the linked resource instead. + + + The “methods” attribute on the “” element is obsolete. + Use the HTTP OPTIONS feature instead. + + + The “rev” attribute on the “” element is obsolete. + Use the “rel” attribute instead, with a term having the opposite meaning. + + + + + + The “nohref” attribute on the “” element is obsolete. + Omitting the “href” attribute is sufficient. + + + + + + The “name” attribute on the “” element is obsolete. + Use the “id” attribute instead. + + + + + + The “profile” attribute on the “” element is obsolete. + To declare which “meta” element terms are used in the document, instead register the + names as meta extensions. <http://wiki.whatwg.org/wiki/MetaExtensions> + To trigger specific UA behaviors, use a “link” element instead. + + + + + + The “version” attribute on the “” element is obsolete. + You can safely omit it. + + + + + + The “longdesc” attribute on the “” element is obsolete. + Use a regular “a” element to link to the description. + + + + + + The “longdesc” attribute on the “” element is obsolete. + Use a regular “a” element to link to the description. + + + The “name” attribute on the “” element is obsolete. + Use the “id” attribute instead. + + + + + + The “usemap” attribute on the “” element is obsolete. + Use the “img” element instead of the “input” element for image maps. + + + + + + The “type” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “scheme” attribute on the “” element is obsolete. + Use only one scheme per field, or make the scheme declaration part of the value. + + + Using the “meta” element to specify the document-wide default language is obsolete. + Consider specifying the language on the root element instead. + + + + + + The “archive” attribute on the “” element is obsolete. + Use the “data” attribute and “type” attribute to invoke plugins. + To set a parameter with the name “archive”, use the “param” element. + + + The “classid” attribute on the “” element is obsolete. + Use the “data” attribute and “type” attribute to invoke plugins. + To set a parameter with the name “classid”, use the “param” element. + + + The “code” attribute on the “” element is obsolete. + Use the “data” attribute and “type” attribute to invoke plugins. + To set a parameter with the name “code”, use the “param” element. + + + The “codebase” attribute on the “” element is obsolete. + Use the “data” attribute and “type” attribute to invoke plugins. + To set a parameter with the name “codebase”, use the “param” element. + + + The “codetype” attribute on the “” element is obsolete. + Use the “data” attribute and “type” attribute to invoke plugins. + To set a parameter with the name “codetype”, use the “param” element. + + + The “declare” attribute on the “” element is obsolete. + Repeat the “object” element completely each time the resource is to be reused. + + + The “standby” attribute on the “” element is obsolete. + Optimize the linked resource so that it loads quickly or, at least, incrementally. + + + + + + The “name” attribute on the “” element is obsolete. + Use the “id” attribute instead. + + + + + + The “type” attribute on the “” element is obsolete. + Use the “name” attribute and “value” attribute without declaring value types. + + + The “valuetype” attribute on the “” element is obsolete. + Use the “name” attribute and “value” attribute without declaring value types. + + + + + + The “language” attribute on the “script” element is obsolete. + Use the “type” attribute instead. + + + + + + The “scope” attribute on the “td” element is obsolete. + Use the “scope” attribute on a “th” element instead. + + + The “abbr” attribute on the “” element is obsolete. + Consider instead beginning the cell contents with concise text, followed by further elaboration if needed. + + + The “axis” attribute on the “” element is obsolete. + Use the “scope” attribute instead. + + + + + + + + The “align” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + + + The “width” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + + + The “char” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “charoff” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “valign” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + + + The “alink” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “background” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “bgcolor” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “link” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “marginbottom” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “marginheight” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “marginleft” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “marginright” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “margintop” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “marginwidth” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “text” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “vlink” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “clear” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “hspace” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “vspace” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “noshade” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “size” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “color” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “compact” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “allowtransparency” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “frameborder” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “marginheight” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “marginwidth” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “scrolling” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “hspace” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “vspace” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “border” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “bgcolor” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The value of the “border” attribute on the “” element + must be either “1” or the empty string. To regulate the thickness of table borders, + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “cellpadding” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “cellspacing” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “frame” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “rules” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “bgcolor” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “height” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + The “nowrap” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + The “bgcolor” attribute on the “” element is obsolete. + Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes + + + + + + + + + + When the attribute “lang” in no namespace and the attribute “lang” + in the XML namespace are both present, they must have the same value. + + + + + + + + + + + + The “contextmenu” attribute must refer to a + “menu” element. + + + + + + + + + + + + + + + + + + + + + An element with “role=option” requires + “role=listbox” on the parent. + + + + + + An element with “role=menuitem” requires + “role=menu” on the parent. + + + + + + An element with “role=menuitemcheckbox” requires + “role=menu” on the parent. + + + + + + An element with “role=menuitemradio” requires + “role=menu” on the parent. + + + + + + An element with “role=tab” requires + “role=tablist” on the parent. + + + + + + An element with “role=treeitem” requires + “role=tree” on the parent. + + + + + + An element with “role=listitem” requires + “role=list” on the parent. + + + + + + An element with “role=row” requires + “role=treegrid” or “role=grid” on the parent or grandparent. + + + + + + + An element with “role=gridcell” requires + “role=row” on the parent. + + + + + + + + + + An element must not be a child of + “role=listbox” unless it has “role=option”. + + + + + + + + An element must not be a child of + “role=menu” unless it has + “role=menuitem”, + “role=menuitemcheckbox” or + “role=menuitemradio”. + + + + + + + + An element must not be a child of + “role=tree” unless it has + “role=treeitem”. + + + + + + + + An element must not be a child of + “role=list” unless it has + “role=listitem”. + + + + + + + + + An element must not be a child of + “role=radiogroup” unless it has + “role=radio”. + + + + + + + + An element must not be a child of + “role=row” unless it has + “role=gridcell”. + + + + + + + + An element must not be a child of + “role=tablist” unless it has + “role=role”. + + + + + + + + + + The “aria-activedescendant” attribute must refer to a + descendant element. + + + + + + + + The “aria-controls” attribute must point to an element in the + same document. + + + + + + + + The “aria-describedby” attribute must point to an element in the + same document. + + + + + + + + The “aria-flowto” attribute must point to an element in the + same document. + + + + + + + + The “aria-labelledby” attribute must point to an element in the + same document. + + + + + + + + The “aria-owns” attribute must point to an element in the + same document. + + + + + + + + + + + The “border” attribute on the “img” element is obsolete. + Consider specifying “img { border: 0; }“ in CSS instead. + + + + + The “language” attribute on the “script” element is obsolete. You can safely omit it. + + + + + The “name” attribute on the “a” element is obsolete. Consider putting an + “id” attribute on the nearest container instead. + + + + + + + + “” element has more than one “track” + child element with a “default” attribute. + + + + + diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc new file mode 100644 index 000000000..e2fc74857 --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/block.rnc @@ -0,0 +1,279 @@ + +# ##################################################################### +## RELAX NG Schema for HTML 5: Basic Prose Markup # +# ##################################################################### + +# ##################################################################### +## Paragraph-Level + +## Paragraph:

    + + p.elem = + element p { p.inner & p.attrs } + p.attrs = + ( common.attrs + & common.attrs.aria? + ) + p.inner = + ( common.inner.phrasing ) # REVISIT lists in span? + + common.elem.flow |= p.elem + +## Hint Transition:


    + + hr.elem = + element hr { hr.inner & hr.attrs } + hr.attrs = + ( common.attrs + & ( common.attrs.aria.role.separator + | common.attrs.aria.role.presentation + | common.attrs.aria.role.doc-pagebreak + )? + ) + hr.inner = + ( empty ) + + common.elem.flow |= hr.elem + +# ##################################################################### +## Preformatting Blocks + +## Preformatted Text:
    +
    +	pre.elem =
    +		element pre { pre.inner & pre.attrs }
    +	pre.attrs =
    +		(	common.attrs
    +		&	common.attrs.aria?
    +		)
    +	pre.inner =
    +		( common.inner.phrasing )
    +
    +	common.elem.flow |= pre.elem
    +
    +# #####################################################################
    +## Simple Lists
    +
    +## Unordered List: 
      + + ul.elem = + element ul { ul.inner & ul.attrs } + ul.attrs = + ( common.attrs + & ( ( common.attrs.aria.role.directory + | common.attrs.aria.role.group + | common.attrs.aria.role.list + | common.attrs.aria.role.listbox + | common.attrs.aria.role.menu + | common.attrs.aria.role.menubar + | common.attrs.aria.role.radiogroup + | common.attrs.aria.role.tablist + | common.attrs.aria.role.toolbar + | common.attrs.aria.role.tree + | common.attrs.aria.role.presentation + ) + | common.attrs.aria.implicit.list + )? + ) + ul.inner = + ( li.elem* + & common.elem.script-supporting* + ) + + common.elem.flow |= ul.elem + +## Unordered List Item:
    • + + li.elem = + element li { li.inner & li.attrs } + li.attrs = + ( common.attrs + & ( common.attrs.aria.implicit.listitem + | common.attrs.aria.role.listitem + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.option + | common.attrs.aria.role.radio + | common.attrs.aria.role.tab + | common.attrs.aria.role.treeitem + | common.attrs.aria.role.separator + | common.attrs.aria.role.presentation + | common.attrs.aria.role.doc-biblioentry + | common.attrs.aria.role.doc-endnote + )? + ) + li.inner = + ( common.inner.flow ) + +## Ordered List:
        + + ol.elem = + element ol { ol.inner & ol.attrs } + ol.attrs = + ( common.attrs + & ol.attrs.start? + & ol.attrs.reversed? + & ol.attrs.type? + & ( ( common.attrs.aria.role.directory + | common.attrs.aria.role.group + | common.attrs.aria.role.list + | common.attrs.aria.role.listbox + | common.attrs.aria.role.menu + | common.attrs.aria.role.menubar + | common.attrs.aria.role.radiogroup + | common.attrs.aria.role.tablist + | common.attrs.aria.role.toolbar + | common.attrs.aria.role.tree + | common.attrs.aria.role.presentation + ) + | common.attrs.aria.implicit.list + )? + ) + ol.attrs.start = + attribute start { + common.data.integer + } + ol.attrs.reversed = + attribute reversed { + "reversed" | "" + } + ol.attrs.type = + attribute type { + "1" | "a" | "A" | "i" | "I" + } + ol.inner = + ( oli.elem* + & common.elem.script-supporting* + ) + + common.elem.flow |= ol.elem + +## Ordered List Item:
      1. + + oli.elem = + element li { oli.inner & oli.attrs } + oli.attrs = + ( common.attrs + & oli.attrs.value? + & ( common.attrs.aria.implicit.listitem + | common.attrs.aria.role.listitem + | common.attrs.aria.role.menuitem + | common.attrs.aria.role.menuitemcheckbox + | common.attrs.aria.role.menuitemradio + | common.attrs.aria.role.option + | common.attrs.aria.role.radio + | common.attrs.aria.role.tab + | common.attrs.aria.role.treeitem + | common.attrs.aria.role.separator + | common.attrs.aria.role.presentation + )? + ) + oli.attrs.value = + attribute value { + common.data.integer + } + oli.inner = + ( common.inner.flow ) + +# ##################################################################### +## Definition Lists + +## Definition List:
        + + dl.elem = + element dl { dl.inner & dl.attrs } + dl.attrs = + ( common.attrs + & ( common.attrs.aria.role.list + | common.attrs.aria.role.group + | common.attrs.aria.role.presentation + )? + ) + dl.inner = + ( ( ( dt.elem + & common.elem.script-supporting* + )+ + , + ( dd.elem + & common.elem.script-supporting* + )+ + )* + | + ( dldiv.elem + & common.elem.script-supporting* + )+ + | common.elem.script-supporting* + ) + + common.elem.flow |= dl.elem + +## Definition Term:
        + + dt.elem = + element dt { dt.inner & dt.attrs } + dt.attrs = + ( common.attrs + & ( common.attrs.aria.implicit.term + | common.attrs.aria.role.term + | common.attrs.aria.role.listitem + ) + ) + dt.inner = + ( common.inner.flow ) + +## Definition Description:
        + + dd.elem = + element dd { dd.inner & dd.attrs } + dd.elem.phrasing = + element dd { dd.inner.phrasing & dd.attrs } + dd.attrs = + ( common.attrs + & ( common.attrs.aria.implicit.definition + | common.attrs.aria.role.definition + ) + ) + dd.inner = + ( common.inner.flow ) + dd.inner.phrasing = + ( common.inner.phrasing ) + +# ##################################################################### +## Miscellaneous Elements + +## Generic Container:
        + + div.elem = + element div { div.inner & div.attrs } + div.attrs = + ( common.attrs + & common.attrs.aria? + ) + div.inner = + ( common.inner.flow ) + + common.elem.flow |= div.elem + + dldiv.elem = + element div { dldiv.inner & div.attrs } + dldiv.inner = + ( ( dt.elem + & common.elem.script-supporting* + )+ + , + ( dd.elem + & common.elem.script-supporting* + )+ + ) + +## Title or Explanatory Caption: + + legend.elem = + element legend { legend.inner & legend.attrs } + legend.attrs = + ( common.attrs + ) + legend.inner = + ( common.inner.phrasing + ) diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc new file mode 100644 index 000000000..d208352eb --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/common.rnc @@ -0,0 +1,596 @@ + +# ##################################################################### +## RELAX NG Schema for HTML 5: Common Definitions # +# ##################################################################### + + +# ##################################################################### +## Language Parameters - redefine in inclusion block as necessary # +# ##################################################################### + +## HTML vs. XHTML restrictions + + XMLonly = empty + HTMLonly = notAllowed + +## HTML 4 Compatibility - set to notAllowed to disallow markup introduced in HTML 5 +# (This only affects mixed-version modules; wholly HTML5 +# modules should simply be left out of the inclusion list.) + + v5only = empty + +## HTML Compatibility Switches - set to notAllowed to disallow + + ## XML features that can't be roundtripped HTML <-> XHTML + # (xml:base on elements other than ) + nonRoundtrippable = empty + + ## XML features that can't be serialized as HTML + nonHTMLizable = empty + +# ##################################################################### +## Wildcards # +# ##################################################################### + +## Any attribute from any namespace + + common.attr.anything = + attribute * { text }* + +## Any element from any namespace + + common.elem.anything = + element * { common.inner.anything & common.attr.anything } + +## Any content from any namespace + + common.inner.anything = + ( text + & common.elem.anything* + ) + +# ##################################################################### +## Common Element Classes # +# ##################################################################### + +## Metadata Elements + + common.elem.metadata = + ( notAllowed ) + +## Phrase Elements + + common.elem.phrasing = + ( notAllowed ) + +## Prose Elements + + common.elem.flow = + ( common.elem.phrasing ) + + +# ##################################################################### +## Common Content Models # +# ##################################################################### + +## Metadata Content + + common.inner.metadata = + ( common.elem.metadata* ) + +## Phrase Content + + common.inner.phrasing = + ( text & common.elem.phrasing* ) + +## Prose Content + + common.inner.transparent.flow = + ( text & common.elem.flow* ) + + common.inner.flow = + ( text + & common.elem.flow* + ) + +# ##################################################################### +## Common Attributes # +# ##################################################################### + +# When updating, check definition too + +common.attrs = + ( common.attrs.basic + & common.attrs.i18n + & common.attrs.present + & common.attrs.other + ) + +common.attrs.basic = + ( common.attrs.id? + & common.attrs.class? + & common.attrs.title? + & common.attrs.base? + & common.attrs.space? + ) + common.attrs.id = + attribute id { + common.data.id + } + common.attrs.class = + attribute class { + common.data.tokens + } + common.attrs.title = + attribute title { + text + } + common.attrs.base = + common.attrs.xmlbase + & nonRoundtrippable + common.attrs.xmlbase = + attribute xml:base { + common.data.uri + } & XMLonly + common.attrs.space = + common.attrs.xmlspace + common.attrs.xmlspace = + attribute xml:space { + string "preserve" | string "default" + } & XMLonly + +common.attrs.i18n = + ( common.attrs.dir? + & common.attrs.language? + & common.attrs.translate? + ) + common.attrs.dir = + attribute dir { + "ltr" | "rtl" | "auto" + } + # This lang definition is a hack for environments where + # the HTML5 parser maps lang to xml:lang. + # Sameness check left to Schematron + common.attrs.language = + ( common.attrs.xmllang? + & common.attrs.lang? + ) + common.attrs.lang = + attribute lang { + common.data.langcode + } & XMLonly + common.attrs.xmllang = + attribute xml:lang { + common.data.langcode + } +# common.attrs.language = +# ( common.attrs.lang +# | common.attrs.xmllang +# ) +# common.attrs.lang = +# attribute lang { +# common.data.langcode +# } & HTMLonly +# common.attrs.xmllang = +# attribute xml:lang { +# common.data.langcode +# } & XMLonly + common.attrs.translate = + attribute translate { + "" | "yes" | "no" + } + +common.attrs.present = + ( common.attrs.style? + & common.attrs.tabindex? + & common.attrs.accesskey? + ) + common.attrs.style = + attribute style { + string + } + common.attrs.tabindex = + attribute tabindex { + common.data.integer + } + # REVISIT move style to a module and bundle tabindex with ARIA + common.attrs.accesskey = + attribute accesskey { + common.data.keylabellist + } + +common.attrs.other = + empty + +# ##################################################################### +## Common Datatypes # +# ##################################################################### + +## Names and Tokens + + common.data.tokens = + list { token* } + + common.data.browsing-context = + datatype.html5.browsing.context.name + + common.data.browsing-context-or-keyword = + datatype.html5.browsing.context.name.or.keyword +# xsd:string { +# pattern = "()|([^_].*)|(_[bB][lL][aA][nN][kK])|(_[sS][eE][lL][fF])|(_[pP][aA][rR][eE][nN][tT])|(_[tT][oO][pP])" +# } + + +## IDs and IDREFs + + common.data.id = + datatype.html5.token +# xsd:string { +# pattern = "\S+" +# } + + common.data.idref = + datatype.IDREF + + common.data.idrefs = + datatype.IDREFS + + common.data.name = + datatype.ID #FIXME + + common.data.hash-name = + datatype.html5.name.reference +# xsd:string { +# pattern = "#.+" +# } + +## Numerical + + common.data.integer = + datatype.integer +# xsd:string { +# pattern = "-?[0-9]+" +# } + + common.data.integer.positive = + datatype.positive.integer +# xsd:string { +# pattern = "0*[1-9][0-9]*" +# } + + common.data.integer.non-negative = + datatype.non-negative.integer +# xsd:string { +# pattern = "[0-9]+" +# } + +# common.data.percent = +# xsd:string { +# pattern = "(100)|([1-9]?[0-9](\.[0-9]+)?)%" +# } + + common.data.float = + datatype.float +# xsd:string { +# pattern = "-?[0-9]+(\.[0-9]+)?([eE]-?[0-9]+)?" +# } + + common.data.float.positive = + datatype.float.positive +# xsd:string { +# pattern = "(0*[1-9][0-9]*(\.[0-9]+)?)|([0-9]+(\.0*[1-9][0-9]*)?)([eE]-?[0-9]+)?" +# } + + common.data.float.non-negative = + datatype.float.non-negative +# xsd:string { +# pattern = "[0-9]+(\.[0-9]+)?([eE]-?[0-9]+)?" +# } + +## Temporal + + common.data.datetime = + datatype.html5.datetime + + common.data.date = + datatype.html5.date + + common.data.time-datetime = + datatype.html5.date.or.time + +## IRIs + + common.data.uri = + # allow either a non-empty IRI ref or zero or more HTML + # space characters (which are: space, tab, LF, FF, CR) + ( datatype.IRI + | xsd:string { + pattern = "[ \x{0A}-\x{0D}]*" + # NOTE The range above incorrectly allows U+000B + # in addition to the HTML space characters; but + # that's not a problem in practice because HTML + # and XML parsers will both catch any U+000B + # and report an error for it before that pattern + # ever gets evaluated. + } + ) + + common.data.uri.non-empty = + datatype.IRI + + common.data.uris = + list { datatype.IRI* } + + common.data.uris.http.or.https = + list { datatype.URI.absolute* } + + common.data.uri.absolute = + datatype.URI.absolute + +## sizes + + common.data.sizes = +# list { w:sizes } + list { + xsd:string { + pattern = "[1-9][0-9]*x[1-9][0-9]*" + }+ + } + +## color for and + + common.data.color = + datatype.html5.color + +## MIME types + + common.data.mimetype = + datatype.mimetype + +## Script type + + common.data.scripttype = + datatype.string + +## Encodings + + common.data.charset = + datatype.character.encoding + + common.data.meta-charset = + datatype.string + +## Refresh + + common.data.refresh = + datatype.string + +## Default style + + common.data.default-style = + string +# w:default-style + +## X-UA-Compatible + + common.data.x-ua-compatible = + string + +## Media Queries + + common.data.mediaquery = + datatype.html5.media.query + +## Language Codes + + common.data.langcode = + "" | datatype.languagecode + +## List of Key Labels + common.data.keylabellist = + datatype.html5.accesskey + +## List of Source Sizes + common.data.source.size.list = + datatype.string + +## Subresource Integrity + common.data.integrity = + datatype.string + +## Content Security Policy + common.data.content-security-policy = + datatype.string + +## Feature Policy + common.data.feature-policy = + string + +## List of sandbox keywords + common.data.sandbox-allow-list = + "" | list { 'allow-top-navigation'?, 'allow-same-origin'?, 'allow-forms'?, 'allow-scripts'? } + | list { 'allow-top-navigation'?, 'allow-same-origin'?, 'allow-scripts'?, 'allow-forms'? } + +## Custom element name + common.data.custom.element.name = + datatype.string + +## Microdata Properties + common.data.microdata-properties = + list { datatype.string+ } + +## Zero + common.data.zero = + "0" + +## ECMAScript FunctionBody + common.data.functionbody = + string + +## autocomplete + + common.data.autocomplete.any = + datatype.string + +# ##################################################################### +## WF2 Module Hook # +# ##################################################################### + +common-form.attrs.form = ( notAllowed ) + +# ##################################################################### +## Script-supporting elements +# ##################################################################### + +common.elem.script-supporting = ( notAllowed ) + +# ##################################################################### +## ARIA Module Hooks # +# ##################################################################### + +common.attrs.aria = ( notAllowed ) +common.attrs.aria.role.alert = ( notAllowed ) +common.attrs.aria.role.alertdialog = ( notAllowed ) +common.attrs.aria.role.application = ( notAllowed ) +common.attrs.aria.role.article = ( notAllowed ) +common.attrs.aria.role.banner = ( notAllowed ) +common.attrs.aria.role.button = ( notAllowed ) +common.attrs.aria.role.cell |= ( notAllowed ) +common.attrs.aria.role.checkbox = ( notAllowed ) +common.attrs.aria.role.combobox = ( notAllowed ) +common.attrs.aria.role.complementary = ( notAllowed ) +common.attrs.aria.role.contentinfo = ( notAllowed ) +common.attrs.aria.role.dialog = ( notAllowed ) +common.attrs.aria.role.directory = ( notAllowed ) +common.attrs.aria.role.document = ( notAllowed ) +common.attrs.aria.role.feed |= ( notAllowed ) +common.attrs.aria.role.figure |= ( notAllowed ) +common.attrs.aria.role.group = ( notAllowed ) +common.attrs.aria.role.heading = ( notAllowed ) +common.attrs.aria.role.img = ( notAllowed ) +common.attrs.aria.role.link = ( notAllowed ) +common.attrs.aria.role.list = ( notAllowed ) +common.attrs.aria.role.listitem = ( notAllowed ) +common.attrs.aria.role.log = ( notAllowed ) +common.attrs.aria.role.listbox = ( notAllowed ) +common.attrs.aria.role.main = ( notAllowed ) +common.attrs.aria.role.marquee = ( notAllowed ) +common.attrs.aria.role.menu = ( notAllowed ) +common.attrs.aria.role.menubar = ( notAllowed ) +common.attrs.aria.role.menuitem = ( notAllowed ) +common.attrs.aria.role.menuitemcheckbox = ( notAllowed ) +common.attrs.aria.role.menuitemradio = ( notAllowed ) +common.attrs.aria.role.note = ( notAllowed ) +common.attrs.aria.role.option = ( notAllowed ) +common.attrs.aria.role.presentation = ( notAllowed ) +common.attrs.aria.role.progressbar = ( notAllowed ) +common.attrs.aria.role.radio = ( notAllowed ) +common.attrs.aria.role.radiogroup |= ( notAllowed ) +common.attrs.aria.role.region = ( notAllowed ) +common.attrs.aria.role.rowgroup |= ( notAllowed ) +common.attrs.aria.role.search = ( notAllowed ) +common.attrs.aria.role.searchbox |= ( notAllowed ) +common.attrs.aria.role.separator = ( notAllowed ) +common.attrs.aria.role.slider = ( notAllowed ) +common.attrs.aria.role.spinbutton = ( notAllowed ) +common.attrs.aria.role.status = ( notAllowed ) +common.attrs.aria.role.switch = ( notAllowed ) +common.attrs.aria.role.tab = ( notAllowed ) +common.attrs.aria.role.table |= ( notAllowed ) +common.attrs.aria.role.tablist = ( notAllowed ) +common.attrs.aria.role.tabpanel = ( notAllowed ) +common.attrs.aria.role.textbox = ( notAllowed ) +common.attrs.aria.role.toolbar = ( notAllowed ) +common.attrs.aria.role.tree = ( notAllowed ) +common.attrs.aria.role.treeitem = ( notAllowed ) +common.attrs.aria.implicit.article = ( notAllowed ) +common.attrs.aria.implicit.banner = ( notAllowed ) +common.attrs.aria.implicit.button = ( notAllowed ) +common.attrs.aria.implicit.cell |= ( notAllowed ) +common.attrs.aria.implicit.checkbox = ( notAllowed ) +common.attrs.aria.implicit.column-or-row-header = ( notAllowed ) +common.attrs.aria.implicit.combobox = ( notAllowed ) +common.attrs.aria.implicit.complementary = ( notAllowed ) +common.attrs.aria.implicit.contentinfo = ( notAllowed ) +common.attrs.aria.implicit.dialog = ( notAllowed ) +common.attrs.aria.implicit.figure |= ( notAllowed ) +common.attrs.aria.implicit.document = ( notAllowed ) +common.attrs.aria.implicit.form = ( notAllowed ) +common.attrs.aria.implicit.group = ( notAllowed ) +common.attrs.aria.implicit.heading = ( notAllowed ) +common.attrs.aria.implicit.img = ( notAllowed ) +common.attrs.aria.implicit.landmark = ( notAllowed ) +common.attrs.aria.implicit.link = ( notAllowed ) +common.attrs.aria.implicit.list = ( notAllowed ) +common.attrs.aria.implicit.listbox = ( notAllowed ) +common.attrs.aria.implicit.listitem = ( notAllowed ) +common.attrs.aria.implicit.main = ( notAllowed ) +common.attrs.aria.implicit.navigation = ( notAllowed ) +common.attrs.aria.implicit.option = ( notAllowed ) +common.attrs.aria.implicit.progressbar = ( notAllowed ) +common.attrs.aria.implicit.radio = ( notAllowed ) +common.attrs.aria.implicit.region = ( notAllowed ) +common.attrs.aria.implicit.row |= ( notAllowed ) +common.attrs.aria.implicit.rowgroup |= ( notAllowed ) +common.attrs.aria.implicit.searchbox |= ( notAllowed ) +common.attrs.aria.implicit.section = ( notAllowed ) +common.attrs.aria.implicit.select = ( notAllowed ) +common.attrs.aria.implicit.slider = ( notAllowed ) +common.attrs.aria.implicit.spinbutton = ( notAllowed ) +common.attrs.aria.implicit.status = ( notAllowed ) +common.attrs.aria.implicit.structure = ( notAllowed ) +common.attrs.aria.implicit.table |= ( notAllowed ) +common.attrs.aria.implicit.textbox = ( notAllowed ) +common.attrs.aria.implicit.toolbar = ( notAllowed ) +common.attrs.aria.prop.readonly = ( notAllowed ) +common.attrs.aria.landmark.banner = ( notAllowed ) +common.attrs.aria.landmark.complementary = ( notAllowed ) +common.attrs.aria.landmark.contentinfo = ( notAllowed ) +common.attrs.aria.landmark.form = ( notAllowed ) +common.attrs.aria.landmark.main = ( notAllowed ) +common.attrs.aria.landmark.navigation = ( notAllowed ) +common.attrs.aria.landmark.search = ( notAllowed ) +# per ARIA spec: article, document, and note are not actually landmarks +common.attrs.aria.landmark.article = ( notAllowed ) +common.attrs.aria.landmark.document = ( notAllowed ) +common.attrs.aria.landmark.note = ( notAllowed ) + +common.attrs.aria.role.doc-abstract = ( notAllowed ) +common.attrs.aria.role.doc-acknowledgments = ( notAllowed ) +common.attrs.aria.role.doc-afterword = ( notAllowed ) +common.attrs.aria.role.doc-appendix = ( notAllowed ) +common.attrs.aria.role.doc-backlink = ( notAllowed ) +common.attrs.aria.role.doc-biblioentry = ( notAllowed ) +common.attrs.aria.role.doc-bibliography = ( notAllowed ) +common.attrs.aria.role.doc-biblioref = ( notAllowed ) +common.attrs.aria.role.doc-chapter = ( notAllowed ) +common.attrs.aria.role.doc-colophon = ( notAllowed ) +common.attrs.aria.role.doc-conclusion = ( notAllowed ) +common.attrs.aria.role.doc-cover = ( notAllowed ) +common.attrs.aria.role.doc-credit = ( notAllowed ) +common.attrs.aria.role.doc-credits = ( notAllowed ) +common.attrs.aria.role.doc-dedication = ( notAllowed ) +common.attrs.aria.role.doc-endnote = ( notAllowed ) +common.attrs.aria.role.doc-endnotes = ( notAllowed ) +common.attrs.aria.role.doc-epigraph = ( notAllowed ) +common.attrs.aria.role.doc-epilogue = ( notAllowed ) +common.attrs.aria.role.doc-errata = ( notAllowed ) +common.attrs.aria.role.doc-example = ( notAllowed ) +common.attrs.aria.role.doc-footnote = ( notAllowed ) +common.attrs.aria.role.doc-foreword = ( notAllowed ) +common.attrs.aria.role.doc-glossary = ( notAllowed ) +common.attrs.aria.role.doc-glossref = ( notAllowed ) +common.attrs.aria.role.doc-index = ( notAllowed ) +common.attrs.aria.role.doc-introduction = ( notAllowed ) +common.attrs.aria.role.doc-noteref = ( notAllowed ) +common.attrs.aria.role.doc-notice = ( notAllowed ) +common.attrs.aria.role.doc-pagebreak = ( notAllowed ) +common.attrs.aria.role.doc-pagelist = ( notAllowed ) +common.attrs.aria.role.doc-part = ( notAllowed ) +common.attrs.aria.role.doc-preface = ( notAllowed ) +common.attrs.aria.role.doc-prologue = ( notAllowed ) +common.attrs.aria.role.doc-pullquote = ( notAllowed ) +common.attrs.aria.role.doc-qna = ( notAllowed ) +common.attrs.aria.role.doc-subtitle = ( notAllowed ) +common.attrs.aria.role.doc-tip = ( notAllowed ) +common.attrs.aria.role.doc-toc = ( notAllowed ) diff --git a/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc new file mode 100644 index 000000000..cac25cbd0 --- /dev/null +++ b/src/main/resources/com/adobe/epubcheck/schema/30/mod/html5/core-scripting.rnc @@ -0,0 +1,388 @@ + +# ##################################################################### +## RELAX NG Schema for HTML 5: Core Scripting # +# ##################################################################### + +# ##################################################################### +## Scripting Elements + +## Inline Scripts: