--- /dev/null
+<?xml version="1.0"?>
+<!-- * ********************************************************************* -->
+<!-- * WARNING: This file is no longer maintained and hasn't been updated in -->
+<!-- * years. There are numerous requirements in the HTML spec which should -->
+<!-- * rightly be captured by assertions in this schema but that aren't. So -->
+<!-- * don't consider the set of assertions here to be thorough or complete. -->
+<!-- * ********************************************************************* -->
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<!-- Schematron assertions for HTML5 -->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+Copyright (c) 2005-2007 Elika J. Etemad (fantasai) and Henri Sivonen (hsivonen)
+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
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+<schema xmlns='http://www.ascc.net/xml/schematron'>
+ <ns prefix='h' uri='http://www.w3.org/1999/xhtml'/>
+
+ <pattern name="required attributes">
+ <rule context='h:bdo'>
+ <assert test='@dir'>
+ A “bdo” element must have a
+ “dir” attribute.
+ </assert>
+ </rule>
+ <rule context='h:img[not(@alt)]'>
+ <assert test='(@title and not(@title = ""))
+ or //h:meta[(translate(@name,
+ "GENERATOR", "generator") = "generator")]
+ or (ancestor::h:figure
+ and (ancestor::h:figure[1]/h:figcaption
+ and not(ancestor::h:figure[1]/h:figcaption = ""))
+ and normalize-space(ancestor::h:figure[1])
+ = normalize-space(ancestor::h:figure[1]/h:figcaption)
+ and not(ancestor::h:figure[1]//*[
+ local-name() = "audio"
+ or local-name() = "canvas"
+ or local-name() = "embed"
+ or local-name() = "iframe"
+ or local-name() = "math"
+ or local-name() = "object"
+ or local-name() = "svg"
+ or local-name() = "video"])
+ and not(count(ancestor::h:figure[1]//h:img) > 1))'>
+ 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
+ </assert>
+ </rule>
+ </pattern>
+
+ <pattern name='Triggered on mutually exclusive elements and prohibited-descendant cases'>
+
+ <!-- Exclusions and prohibited-descendant contraints - - - - - - - - - - - -->
+
+ <rule context='h:form|h:dfn|h:noscript|h:address'>
+ <report test='ancestor::*[name() = name(current())]'>
+ The “<name/>” element must not contain any nested
+ “<name/>” elements.
+ </report>
+ </rule>
+
+ <rule context='h:label'>
+ <report test='ancestor::*[name() = name(current())]'>
+ The “<name/>” element must not contain any nested
+ “<name/>” elements.
+ </report>
+ <report test='count(descendant::h:input
+ | descendant::h:button
+ | descendant::h:select
+ | descendant::h:keygen
+ | descendant::h:textarea) > 1'>
+ The “label” element may contain at most one descendant
+ “input” element,
+ “button” element,
+ “select” element,
+ or “textarea” element.
+ </report>
+ <report test='@for and
+ not(//h:input[not(translate(@type, "HIDEN", "hiden")="hidden")][@id = current()/@for] or
+ //h:textarea[@id = current()/@for] or
+ //h:select[@id = current()/@for] or
+ //h:button[@id = current()/@for] or
+ //h:keygen[@id = current()/@for] or
+ //h:output[@id = current()/@for])'>
+ The “for” attribute of the “label”
+ element must refer to a form control.
+ </report>
+ </rule>
+
+ <rule context='h:section|h:nav|h:article|h:aside'>
+ <report test='ancestor::h:address'>
+ The sectioning element “<name/>” must not
+ appear as a descendant of the “address” element.
+ </report>
+ </rule>
+
+ <rule context='h:footer'>
+ <report test='ancestor::h:header'>
+ The element “footer” must not
+ appear as a descendant of the “header” element.
+ </report>
+ <report test='ancestor::h:footer'>
+ The element “footer” must not
+ appear as a descendant of the “footer” element.
+ </report>
+ <report test='ancestor::h:address'>
+ The element “footer” must not
+ appear as a descendant of the “address” element.
+ </report>
+ </rule>
+
+ <rule context='h:h1|h:h2|h:h3|h:h4|h:h5|h:h6'>
+ <report test='ancestor::h:address'>
+ The “<name/>” element must not appear as a
+ descendant of the “address” element.
+ </report>
+ </rule>
+
+ <rule context='h:header'>
+ <report test='ancestor::h:footer'>
+ The “<name/>” element must not appear as a
+ descendant of the “footer” element.
+ </report>
+ <report test='ancestor::h:address'>
+ The “<name/>” element must not appear as a
+ descendant of the “address” element.
+ </report>
+ <report test='ancestor::h:header'>
+ The “header” element must not appear as a
+ descendant of the “header” element.
+ </report>
+ </rule>
+
+ <rule context='h:table'>
+ <report test='ancestor::h:caption'>
+ The element “table” must not appear as a
+ descendant of the “caption” element.
+ </report>
+ <report test='@summary' role='warning'>
+ 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.
+ </report>
+ </rule>
+ </pattern>
+
+ <!-- Interactive element exclusions -->
+ <pattern name='interactive element exclusions'>
+
+ <!--
+ - Interactive descendants:
+ - a
+ - video[controls]
+ - audio[controls]
+ - details
+ - menu[type=toolbar]
+ - button
+ - input[type!=hidden]
+ - textarea
+ - select
+ - img[usemap]
+ - embed
+ - iframe
+ - keygen
+ - label
+ - object[usemap]
+
+ - Interactive ancestors
+ - a
+ - button
+ -->
+
+ <rule context='h:a|h:details|h:embed|h:iframe|h:label'>
+ <report test='ancestor::h:a'>
+ The interactive element “<name/>” must not
+ appear as a descendant of the “a” element.
+ </report>
+ <report test='ancestor::h:button'>
+ The interactive element “<name/>” must not
+ appear as a descendant of the “button” element.
+ </report>
+ </rule>
+
+ <rule context='h:button|h:textarea|h:select|h:keygen|h:input[not(translate(@type, "HIDEN", "hiden")="hidden")]'>
+ <report test='ancestor::h:a'>
+ The interactive element “<name/>” must not
+ appear as a descendant of the “a” element.
+ </report>
+ <report test='ancestor::h:button'>
+ The interactive element “<name/>” must not
+ appear as a descendant of the “button” element.
+ </report>
+ <report test='ancestor::h:label[@for] and not(ancestor::h:label[@for = current()/@id])'>
+ Any “<name/>” element descendant of a “label” element
+ with a “for” attribute must have an
+ ID value that matches that “for” attribute.
+ </report>
+ </rule>
+
+ <rule context='h:video[@controls]|h:audio[@controls]'>
+ <report test='ancestor::h:a'>
+ The interactive element “<name/>”
+ with the attribute “controls” must not
+ appear as a descendant of the “a” element.
+ </report>
+ <report test='ancestor::h:button'>
+ The interactive element “<name/>”
+ with the attribute “controls” must not
+ appear as a descendant of the “button” element.
+ </report>
+ </rule>
+
+ <rule context='h:menu[translate(@type, "TOLBAR", "tolbar")="toolbar"]'>
+ <report test='ancestor::h:a'>
+ The element “menu”
+ with the attribute “type” whose value is “toolbar” must not
+ appear as a descendant of the “a” element.
+ </report>
+ <report test='ancestor::h:button'>
+ The element “menu”
+ with the attribute “type” whose value is “toolbar” must not
+ appear as a descendant of the “button” element.
+ </report>
+ </rule>
+
+ <rule context='h:img[@usemap]'>
+ <report test='ancestor::h:a'>
+ The element “img”
+ with the attribute “usemap” must not
+ appear as a descendant of the “a” element.
+ </report>
+ <report test='ancestor::h:button'>
+ The element “img”
+ with the attribute “usemap” must not
+ appear as a descendant of the “button” element.
+ </report>
+ </rule>
+
+ <rule context='h:object[@usemap]'>
+ <report test='ancestor::h:a'>
+ The element “object”
+ with the attribute “usemap” must not
+ appear as a descendant of the “a” element.
+ </report>
+ <report test='ancestor::h:button'>
+ The element “object”
+ with the attribute “usemap” must not
+ appear as a descendant of the “button” element.
+ </report>
+ </rule>
+ </pattern>
+
+ <!-- REVISIT fieldset http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-April/006181.html -->
+
+ <!-- Misc requirements -->
+
+ <pattern name="miscellaneous requirements">
+ <rule context='h:area'>
+ <assert test='ancestor::h:map'>
+ The “area” element must have an ancestor
+ “map” element.
+ </assert>
+ </rule>
+
+ <rule context='h:img[@ismap]'>
+ <assert test='ancestor::h:a[@href]'>
+ The “img” element with the
+ “ismap” attribute set must have an ancestor
+ “a” element with the “href” attribute.
+ </assert>
+ </rule>
+
+ <rule context='h:input'>
+ <report test='@list and not(//h:datalist[@id = current()/@list])'>
+ The “list” attribute of the “input”
+ element must refer to a “datalist” element.
+ </report>
+ <report test='@type = "button" and (not(@value) or @value = "")'>
+ Element “input” with attribute “type”
+ whose value is “button” must have non-empty attribute
+ “value”.
+ </report>
+ </rule>
+
+ <rule context='h:track'>
+ <report test='@label = ""'>
+ Attribute “label” for element “track”
+ must have non-empty value.
+ </report>
+ <report test='@default and preceding-sibling::h:track[@default]'>
+ The “default” attribute must not occur on more than one
+ “track” element within the same “audio”
+ element or “video” element.
+ </report>
+ </rule>
+
+ <rule context='h:map[@id and @name]'>
+ <assert test='@id = @name'>
+ The “id” attribute on a “map” element must have
+ the same value as the “name” attribute.
+ </assert>
+ </rule>
+
+ <rule context='h:select'>
+ <report test='not(@multiple) and count(descendant::h:option[@selected]) > 1'>
+ The “select” element cannot have more than one
+ selected “option” element descendant unless the
+ “multiple” attribute is specified.
+ </report>
+ <report test='@required and not(@multiple)
+ and (not(@size)
+ or (starts-with(normalize-space(@size), "+")
+ and substring-after(@size,"+") = 1)
+ or @size = 1)
+ and not(h:option)'>
+ A “select” element with
+ a “required” attribute and without
+ a “multiple” attribute, and whose
+ size is “1”, must have a child
+ “option” element.
+ </report>
+ </rule>
+
+ <rule context='h:select[@required and not(@multiple)
+ and (not(@size)
+ or (starts-with(normalize-space(@size), "+")
+ and substring-after(@size,"+") = 1)
+ or @size = 1)]/h:option[1]'>
+ <assert test='(@value and @value = "")
+ or ((not(@value) or @value = "") and . = "")'>
+ 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.
+ </assert>
+ </rule>
+
+ <rule context='h:script'>
+ <report test='@language and translate(@language, "JAVSCRIPT", "javscript")="javascript"
+ and @type and not(translate(@type, "EXJAVSCRIPT", "exjavscript")="text/javascript")'>
+ Element “script” with attribute
+ “language” whose value is “JavaScript”
+ must not have attribute “type” whose value is not
+ “text/javascript”.
+ </report>
+ <report test='not(@src) and @charset'>
+ Element “script” must not have attribute
+ “charset” unless attribute “src” is
+ also specified.
+ </report>
+ <report test='not(@src) and @defer'>
+ Element “script” must not have attribute
+ “defer” unless attribute “src” is
+ also specified.
+ </report>
+ <report test='not(@src) and @async'>
+ Element “script” must not have attribute
+ “async” unless attribute “src” is
+ also specified.
+ </report>
+ </rule>
+
+ <rule context='h:time'>
+ <report test='ancestor::h:time'>
+ The element “time” must not
+ appear as a descendant of the “time” element.
+ </report>
+ </rule>
+
+ <rule context='h:progress'>
+ <report test='ancestor::h:progress'>
+ The element “progress” must not
+ appear as a descendant of the “progress” element.
+ </report>
+ <assert test='@max and @value and number(@value) <= number(@max)'>
+ The value of the “value” attribute must be less than or equal to
+ the value of the “max” attribute.
+ </assert>
+ <assert test='not(@max) and @value and number(@value) <= 1'>
+ The value of the “value” attribute must be less than or equal to
+ one when the “max” attribute is absent.
+ </assert>
+ </rule>
+
+ <!--
+ min <= value <= max
+ min <= low <= high <= max
+ min <= optimum <= max
+ -->
+
+ <rule context='h:meter'>
+ <report test='ancestor::h:meter'>
+ The element “meter” must not
+ appear as a descendant of the “meter” element.
+ </report>
+ <report test='@min and @value and not(number(@min) <= number(@value))'>
+ The value of the “min” attribute must be less than or equal to
+ the value of the “value” attribute.
+ </report>
+ <report test='not(@min) and @value and not(0 <= number(@value))'>
+ The value of the “value” attribute must be greater than or equal to
+ zero when the “min” attribute is absent.
+ </report>
+ <report test='@value and @max and not(number(@value) <= number(@max))'>
+ The value of the “value” attribute must be less than or equal to
+ the value of the “max” attribute.
+ </report>
+ <report test='@value and not(@max) and not(number(@value) <= 1)'>
+ The value of the “value” attribute must be less than or equal to
+ one when the “max” attribute is absent.
+ </report>
+ <report test='@min and @max and not(number(@min) <= number(@max))'>
+ The value of the “min” attribute must be less than or equal to
+ the value of the “max” attribute.
+ </report>
+ <report test='not(@min) and @max and not(0 <= number(@max))'>
+ The value of the “max” attribute must be greater than or equal to
+ zero when the “min” attribute is absent.
+ </report>
+ <report test='@min and not(@max) and not(number(@min) <= 1)'>
+ The value of the “min” attribute must be less than or equal to
+ one when the “max” attribute is absent.
+ </report>
+ <report test='@min and @low and not(number(@min) <= number(@low))'>
+ The value of the “min” attribute must be less than or equal to
+ the value of the “low” attribute.
+ </report>
+ <report test='not(@min) and @low and not(0 <= number(@low))'>
+ The value of the “low” attribute must be greater than or equal to
+ zero when the “min” attribute is absent.
+ </report>
+ <report test='@min and @high and not(number(@min) <= number(@high))'>
+ The value of the “min” attribute must be less than or equal to
+ the value of the “high” attribute.
+ </report>
+ <report test='not(@min) and @high and not(0 <= number(@high))'>
+ The value of the “high” attribute must be greater than or equal to
+ zero when the “min” attribute is absent.
+ </report>
+ <report test='@low and @high and not(number(@low) <= number(@high))'>
+ The value of the “low” attribute must be less than or equal to
+ the value of the “high” attribute.
+ </report>
+ <report test='@high and @max and not(number(@high) <= number(@max))'>
+ The value of the “high” attribute must be less than or equal to
+ the value of the “max” attribute.
+ </report>
+ <report test='@high and not(@max) and not(number(@high) <= 1)'>
+ The value of the “high” attribute must be less than or equal to
+ one when the “max” attribute is absent.
+ </report>
+ <report test='@low and @max and not(number(@low) <= number(@max))'>
+ The value of the “low” attribute must be less than or equal to
+ the value of the “max” attribute.
+ </report>
+ <report test='@low and not(@max) and not(number(@low) <= 1)'>
+ The value of the “low” attribute must be less than or equal to
+ one when the “max” attribute is absent.
+ </report>
+ <report test='@min and @optimum and not(number(@min) <= number(@optimum))'>
+ The value of the “min” attribute must be less than or equal to
+ the value of the “optimum” attribute.
+ </report>
+ <report test='not(@min) and @optimum and not(0 <= number(@optimum))'>
+ The value of the “optimum” attribute must be greater than or equal to
+ zero when the “min” attribute is absent.
+ </report>
+ <report test='@optimum and @max and not(number(@optimum) <= number(@max))'>
+ The value of the “optimum” attribute must be less than or equal to
+ the value of the “max” attribute.
+ </report>
+ <report test='@optimum and not(@max) and not(number(@optimum) <= 1)'>
+ The value of the “optimum” attribute must be less than or equal to
+ one when the “max” attribute is absent.
+ </report>
+ </rule>
+ </pattern>
+
+ <!-- Obsolete Elements - - - - - - - - - - - - - - - - - - - - - - -->
+ <pattern name="obsolete elements">
+ <rule context='h:acronym'>
+ <report test='true()'>
+ The “acronym” element is obsolete. Use the “abbr” element instead.
+ </report>
+ </rule>
+
+ <rule context='h:applet'>
+ <report test='true()'>
+ The “applet” element is obsolete. Use the “object” element instead.
+ </report>
+ </rule>
+
+ <rule context='h:center|h:font|h:big|h:strike|h:tt|h:basefont'>
+ <report test='true()'>
+ The “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:dir'>
+ <report test='true()'>
+ The “dir” element is obsolete. Use the “ul” element instead.
+ </report>
+ </rule>
+
+ <rule context='h:frameset|h:noframes'>
+ <report test='true()'>
+ The “<name/>” element is obsolete.
+ Use the “iframe” element and CSS instead, or use server-side includes.
+ </report>
+ </rule>
+ </pattern>
+
+ <!-- Obsolete Attributes- - - - - - - - - - - - - - - - - - - - - - -->
+
+ <pattern name="obsolete attributes">
+ <rule context='h:a'>
+ <report test='@coords'>
+ The “coords” attribute on the “<name/>” element is obsolete.
+ For image maps, use the “area” element instead of the “a” element.
+ </report>
+ <report test='@shape'>
+ The “shape” attribute on the “<name/>” element is obsolete.
+ For image maps, use the “area” element instead of the “a” element.
+ </report>
+ <report test='@urn'>
+ The “urn” attribute on the “<name/>” element is obsolete.
+ Specify the preferred persistent identifier using the “href” attribute instead.
+ </report>
+ <report test='@charset'>
+ The “charset” attribute on the “<name/>” element is obsolete.
+ Use an HTTP Content-Type header on the linked resource instead.
+ </report>
+ <report test='@methods'>
+ The “methods” attribute on the “<name/>” element is obsolete.
+ Use the HTTP OPTIONS feature instead.
+ </report>
+ <report test='@rev'>
+ The “rev” attribute on the “<name/>” element is obsolete.
+ Use the “rel” attribute instead, with a term having the opposite meaning.
+ </report>
+ </rule>
+
+ <rule context='h:link'>
+ <report test='@target'>
+ The “target” attribute on the “<name/>” element is obsolete.
+ You can safely omit it.
+ </report>
+ <report test='@urn'>
+ The “urn” attribute on the “<name/>” element is obsolete.
+ Specify the preferred persistent identifier using the “href” attribute instead.
+ </report>
+ <report test='@charset'>
+ The “charset” attribute on the “<name/>” element is obsolete.
+ Use an HTTP Content-Type header on the linked resource instead.
+ </report>
+ <report test='@methods'>
+ The “methods” attribute on the “<name/>” element is obsolete.
+ Use the HTTP OPTIONS feature instead.
+ </report>
+ <report test='@rev'>
+ The “rev” attribute on the “<name/>” element is obsolete.
+ Use the “rel” attribute instead, with a term having the opposite meaning.
+ </report>
+ </rule>
+
+ <rule context="h:area">
+ <report test='@nohref'>
+ The “nohref” attribute on the “<name/>” element is obsolete.
+ Omitting the “href” attribute is sufficient.
+ </report>
+ </rule>
+
+ <rule context='h:embed'>
+ <report test='@name'>
+ The “name” attribute on the “<name/>” element is obsolete.
+ Use the “id” attribute instead.
+ </report>
+ </rule>
+
+ <rule context='h:head'>
+ <report test='@profile'>
+ The “profile” attribute on the “<name/>” 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.
+ </report>
+ </rule>
+
+ <rule context='h:html'>
+ <report test='@version'>
+ The “version” attribute on the “<name/>” element is obsolete.
+ You can safely omit it.
+ </report>
+ </rule>
+
+ <rule context='h:iframe'>
+ <report test='@longdesc'>
+ The “longdesc” attribute on the “<name/>” element is obsolete.
+ Use a regular “a” element to link to the description.
+ </report>
+ </rule>
+
+ <rule context='h:img'>
+ <report test='@longdesc'>
+ The “longdesc” attribute on the “<name/>” element is obsolete.
+ Use a regular “a” element to link to the description.
+ </report>
+ <report test='@name'>
+ The “name” attribute on the “<name/>” element is obsolete.
+ Use the “id” attribute instead.
+ </report>
+ </rule>
+
+ <rule context='h:input'>
+ <report test='@usemap'>
+ The “usemap” attribute on the “<name/>” element is obsolete.
+ Use the “img” element instead of the “input” element for image maps.
+ </report>
+ </rule>
+
+ <rule context='h:li|h:ul'>
+ <report test='@type'>
+ The “type” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:meta'>
+ <report test='@scheme'>
+ The “scheme” attribute on the “<name/>” element is obsolete.
+ Use only one scheme per field, or make the scheme declaration part of the value.
+ </report>
+ <report test='translate(@http-equiv,"CONTELAGUA", "contelagua")="content-language"' role='warning'>
+ Using the “meta” element to specify the document-wide default language is obsolete.
+ Consider specifying the language on the root element instead.
+ </report>
+ </rule>
+
+ <rule context='h:object'>
+ <report test='@archive'>
+ The “archive” attribute on the “<name/>” 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.
+ </report>
+ <report test='@classid'>
+ The “classid” attribute on the “<name/>” 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.
+ </report>
+ <report test='@code'>
+ The “code” attribute on the “<name/>” 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.
+ </report>
+ <report test='@codebase'>
+ The “codebase” attribute on the “<name/>” 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.
+ </report>
+ <report test='@codetype'>
+ The “codetype” attribute on the “<name/>” 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.
+ </report>
+ <report test='@declare'>
+ The “declare” attribute on the “<name/>” element is obsolete.
+ Repeat the “object” element completely each time the resource is to be reused.
+ </report>
+ <report test='@standby'>
+ The “standby” attribute on the “<name/>” element is obsolete.
+ Optimize the linked resource so that it loads quickly or, at least, incrementally.
+ </report>
+ </rule>
+
+ <rule context='h:option'>
+ <report test='@name'>
+ The “name” attribute on the “<name/>” element is obsolete.
+ Use the “id” attribute instead.
+ </report>
+ </rule>
+
+ <rule context='h:param'>
+ <report test='@type'>
+ The “type” attribute on the “<name/>” element is obsolete.
+ Use the “name” attribute and “value” attribute without declaring value types.
+ </report>
+ <report test='@valuetype'>
+ The “valuetype” attribute on the “<name/>” element is obsolete.
+ Use the “name” attribute and “value” attribute without declaring value types.
+ </report>
+ </rule>
+
+ <rule context='h:script[@language and not(translate(@language, "JAVSCRIPT", "javscript")="javascript")]'>
+ <report test='true()'>
+ The “language” attribute on the “script” element is obsolete.
+ Use the “type” attribute instead.
+ </report>
+ </rule>
+
+ <rule context='h:td|h:th'>
+ <report test='@scope and self::h:td'>
+ The “scope” attribute on the “td” element is obsolete.
+ Use the “scope” attribute on a “th” element instead.
+ </report>
+ <report test='@abbr'>
+ The “abbr” attribute on the “<name/>” element is obsolete.
+ Consider instead beginning the cell contents with concise text, followed by further elaboration if needed.
+ </report>
+ <report test='@axis'>
+ The “axis” attribute on the “<name/>” element is obsolete.
+ Use the “scope” attribute instead.
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name="obsolete presentational align attribute">
+ <rule context='h:caption|h:iframe|h:img|h:input|h:object|h:embed|h:legend
+ |h:table|h:hr|h:div|h:h1|h:h2|h:h3|h:h4|h:h5|h:h6|h:p|h:col|h:colgroup
+ |h:tbody|h:td|h:tfoot|h:th|h:thead|h:tr'>
+ <report test='@align'>
+ The “align” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name="obsolete presentational width attribute">
+ <rule context='h:col|h:colgroup|h:hr|h:pre|h:table|h:td|h:th'>
+ <report test='@width'>
+ The “width” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name="obsolete presentational table attributes">
+ <rule context='h:col|h:colgroup|h:tbody|h:td|h:tfoot|h:th|h:thead|h:tr'>
+ <report test='@char'>
+ The “char” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@charoff'>
+ The “charoff” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@valign'>
+ The “valign” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name="obsolete presentational attributes">
+ <rule context='h:body'>
+ <report test='@alink'>
+ The “alink” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@background'>
+ The “background” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@bgcolor'>
+ The “bgcolor” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@link'>
+ The “link” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@marginbottom'>
+ The “marginbottom” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@marginheight'>
+ The “marginheight” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@marginleft'>
+ The “marginleft” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@marginright'>
+ The “marginright” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@margintop'>
+ The “margintop” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@marginwidth'>
+ The “marginwidth” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@text'>
+ The “text” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@vlink'>
+ The “vlink” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:br'>
+ <report test='@clear'>
+ The “clear” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:embed'>
+ <report test='@hspace'>
+ The “hspace” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@vspace'>
+ The “vspace” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:hr'>
+ <report test='@noshade'>
+ The “noshade” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@size'>
+ The “size” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@color'>
+ The “color” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:dl|h:menu|h:ol|h:ul'>
+ <report test='@compact'>
+ The “compact” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:iframe'>
+ <report test='@allowtransparency'>
+ The “allowtransparency” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@frameborder'>
+ The “frameborder” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@marginheight'>
+ The “marginheight” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@marginwidth'>
+ The “marginwidth” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@scrolling'>
+ The “scrolling” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:img|h:object'>
+ <report test='@hspace'>
+ The “hspace” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@vspace'>
+ The “vspace” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@border and self::h:object'>
+ The “border” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:table'>
+ <report test='@bgcolor'>
+ The “bgcolor” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@border and not(@border = "" or @border = "1")'>
+ The value of the “border” attribute on the “<name/>” 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
+ </report>
+ <report test='@cellpadding'>
+ The “cellpadding” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@cellspacing'>
+ The “cellspacing” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@frame'>
+ The “frame” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@rules'>
+ The “rules” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:td|h:th'>
+ <report test='@bgcolor'>
+ The “bgcolor” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@height'>
+ The “height” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ <report test='@nowrap'>
+ The “nowrap” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+
+ <rule context='h:tr'>
+ <report test='@bgcolor'>
+ The “bgcolor” attribute on the “<name/>” element is obsolete.
+ Use CSS instead. http://wiki.whatwg.org/wiki/Presentational_elements_and_attributes
+ </report>
+ </rule>
+ </pattern>
+
+<!-- lang and xml:lang in XHTML - - - - - - - - - - - - - - - - - -->
+
+ <pattern name='lang and xml:lang in XHTML'>
+ <rule context='h:*[@lang and @xml:lang]'>
+ <assert test='translate(@lang, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz") = translate(@xml:lang, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")'>
+ When the attribute “lang” in no namespace and the attribute “lang”
+ in the XML namespace are both present, they must have the same value.
+ </assert>
+ </rule>
+ </pattern>
+
+<!-- IDREFs - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- Assuming that ID uniqueness is already enforced. -->
+
+ <pattern name='contextmenu must refer to a menu'>
+ <rule context='h:*[@contextmenu]'>
+ <assert test='//h:menu[@id = current()/@contextmenu]'>
+ The “contextmenu” attribute must refer to a
+ “menu” element.
+ </assert>
+ </rule>
+ </pattern>
+
+ <!-- FIXME form attribute -->
+
+ <!-- FIXME output for -->
+
+<!-- Unique Definitions - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- Only one definition per term per document' -->
+
+<!-- ARIA containment - - - - - - - - - - - - - - - - - - - - - -->
+
+ <pattern name='Mutually Exclusive Role triggers'>
+
+ <!-- XXX columnheader and rowheader require row parent -->
+
+ <rule context='*[@role="option"]'>
+ <assert test='../@role="listbox"'>
+ An element with “role=option” requires
+ “role=listbox” on the parent.
+ </assert>
+ </rule>
+
+ <rule context='*[@role="menuitem"]'>
+ <assert test='../@role="menu"'>
+ An element with “role=menuitem” requires
+ “role=menu” on the parent.
+ </assert>
+ </rule>
+
+ <rule context='*[@role="menuitemcheckbox"]'>
+ <assert test='../@role="menu"'>
+ An element with “role=menuitemcheckbox” requires
+ “role=menu” on the parent.
+ </assert>
+ </rule>
+
+ <rule context='*[@role="menuitemradio"]'>
+ <assert test='../@role="menu"'>
+ An element with “role=menuitemradio” requires
+ “role=menu” on the parent.
+ </assert>
+ </rule>
+
+ <rule context='*[@role="tab"]'>
+ <assert test='../@role="tablist"'>
+ An element with “role=tab” requires
+ “role=tablist” on the parent.
+ </assert>
+ </rule>
+
+ <rule context='*[@role="treeitem"]'>
+ <assert test='../@role="tree"'>
+ An element with “role=treeitem” requires
+ “role=tree” on the parent.
+ </assert>
+ </rule>
+
+ <rule context='*[@role="listitem"]'>
+ <assert test='../@role="list"'>
+ An element with “role=listitem” requires
+ “role=list” on the parent.
+ </assert>
+ </rule>
+
+ <rule context='*[@role="row"]'>
+ <assert test='../@role="grid" or
+ ../../@role="grid" or
+ ../@role="treegrid" or
+ ../../@role="treegrid"'>
+ An element with “role=row” requires
+ “role=treegrid” or “role=grid” on the parent or grandparent.
+ </assert>
+ </rule>
+ <!-- XXX hoping for a spec change so not bothering with the reciprocal case -->
+
+ <rule context='*[@role="gridcell"]'>
+ <assert test='../@role="row"'>
+ An element with “role=gridcell” requires
+ “role=row” on the parent.
+ </assert>
+ </rule>
+ <!-- XXX hoping for a spec change so not bothering with the reciprocal case -->
+
+ </pattern>
+
+ <pattern name='Not Option'>
+ <rule context='*[not(@role="option")]'>
+ <report test='../@role="listbox"'>
+ An element must not be a child of
+ “role=listbox” unless it has “role=option”.
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name='Not menuitem*'>
+ <rule context='*[not(@role="menuitem" or
+ @role="menuitemcheckbox" or
+ @role="menuitemradio")]'>
+ <report test='../@role="menu"'>
+ An element must not be a child of
+ “role=menu” unless it has
+ “role=menuitem”,
+ “role=menuitemcheckbox” or
+ “role=menuitemradio”.
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name='Not treeitem'>
+ <rule context='*[not(@role="treeitem")]'>
+ <report test='../@role="tree"'>
+ An element must not be a child of
+ “role=tree” unless it has
+ “role=treeitem”.
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name='Not listitem'>
+ <rule context='*[not(@role="listitem")]'>
+ <report test='../@role="list"'>
+ An element must not be a child of
+ “role=list” unless it has
+ “role=listitem”.
+ </report>
+ </rule>
+ <!-- XXX role=group omitted due to lack of detail in spec -->
+ </pattern>
+
+ <pattern name='Not radio'>
+ <rule context='*[not(@role="radio")]'>
+ <report test='../@role="radiogroup"'>
+ An element must not be a child of
+ “role=radiogroup” unless it has
+ “role=radio”.
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name='Not gridcell'>
+ <rule context='*[not(@role="gridcell")]'>
+ <report test='../@role="row"'>
+ An element must not be a child of
+ “role=row” unless it has
+ “role=gridcell”.
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name='Not tab'>
+ <rule context='*[not(@role="tab")]'>
+ <report test='../@role="tablist"'>
+ An element must not be a child of
+ “role=tablist” unless it has
+ “role=role”.
+ </report>
+ </rule>
+ </pattern>
+
+ <!-- XXX combobox requires a listbox child -->
+
+ <pattern name='aria-activedescendant must refer to a descendant'>
+ <rule context='*[@aria-activedescendant]'>
+ <assert test='descendant::*[@id = current()/@aria-activedescendant]'>
+ The “aria-activedescendant” attribute must refer to a
+ descendant element.
+ </assert>
+ </rule>
+ </pattern>
+
+ <pattern name='controls must not dangle'>
+ <rule context='*[@aria-controls]'>
+ <assert test='//*[@id = current()/@aria-controls]'>
+ The “aria-controls” attribute must point to an element in the
+ same document.
+ </assert>
+ </rule>
+ </pattern>
+
+ <pattern name='describedby must not dangle'>
+ <rule context='*[@aria-describedby]'>
+ <assert test='//*[@id = current()/@aria-describedby]'>
+ The “aria-describedby” attribute must point to an element in the
+ same document.
+ </assert>
+ </rule>
+ </pattern>
+
+ <pattern name='flowto must not dangle'>
+ <rule context='*[@aria-flowto]'>
+ <assert test='//*[@id = current()/@aria-flowto]'>
+ The “aria-flowto” attribute must point to an element in the
+ same document.
+ </assert>
+ </rule>
+ </pattern>
+
+ <pattern name='labelledby must not dangle'>
+ <rule context='*[@aria-labelledby]'>
+ <assert test='//*[@id = current()/@aria-labelledby]'>
+ The “aria-labelledby” attribute must point to an element in the
+ same document.
+ </assert>
+ </rule>
+ </pattern>
+
+ <pattern name='owns must not dangle'>
+ <rule context='*[@aria-owns]'>
+ <assert test='//*[@id = current()/@aria-owns]'>
+ The “aria-owns” attribute must point to an element in the
+ same document.
+ </assert>
+ </rule>
+ </pattern>
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<!-- Warnings -->
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <pattern name="Warnings for HTML5 attributes that are obsolete but conforming">
+ <rule context='h:img'>
+ <report test='@border' role='warning'>
+ The “border” attribute on the “img” element is obsolete.
+ Consider specifying “img { border: 0; }“ in CSS instead.
+ </report>
+ </rule>
+ <rule context='h:script[translate(@language, "JAVSCRIPT", "javscript")="javascript"]'>
+ <report test='not(@type) or translate(@type, "EXJAVSCRIPT", "exjavscript")="text/javascript"' role='warning'>
+ The “language” attribute on the “script” element is obsolete. You can safely omit it.
+ </report>
+ </rule>
+ <rule context='h:a'>
+ <report test='@name' role='warning'>
+ The “name” attribute on the “a” element is obsolete. Consider putting an
+ “id” attribute on the nearest container instead.
+ </report>
+ </rule>
+ </pattern>
+
+ <pattern name="Other warnings">
+ <rule context='h:video|h:audio'>
+ <report test='count(h:track[@default]) > 1' role='warning'>
+ “<name/>” element has more than one “track”
+ child element with a “default” attribute.
+ </report>
+ </rule>
+ </pattern>
+
+</schema>