Added all HTML5 elements (https://html.spec.whatwg.org/multipage/) to the
".tssl" schema used by TagSoup. Also updated the declarations of all
attributes.

The TagSoup 1.2.1 source code comes from:
https://github.com/jukka/tagsoup
and not from the *not* up-to-date one found TagSoup Home page:
http://vrici.lojban.org/~cowan/XML/tagsoup/

Changes:

etc/build/build.properties (new version number)
------------------------------------------------------------------------------
--- etc/build/build.properties.ORI      2011-08-22 19:10:18.000000000 +0200
+++ etc/build/build.properties  2019-12-11 10:40:04.880924377 +0100
@@ -1 +1 @@
-tagsoup.version = 1.2.1
+tagsoup.version = 1.2.2
------------------------------------------------------------------------------

src/java/org/ccil/cowan/tagsoup/XMLWriter.java (javadoc typos)
------------------------------------------------------------------------------
--- src/java/org/ccil/cowan/tagsoup/XMLWriter.java.ORI  2011-08-22 19:10:18.000000000 +0200
+++ src/java/org/ccil/cowan/tagsoup/XMLWriter.java      2019-12-12 15:25:09.301238110 +0100
@@ -117,7 +117,7 @@
  *
  * <p>You need to invoke one of the <var>characters</var> methods
  * explicitly to add newlines or indentation.  Alternatively, you
- * can use {@link com.megginson.sax.DataWriter DataWriter}, which
+ * can use <code>com.megginson.sax.DataWriter</code>, which
  * is derived from this class -- it is optimized for writing
  * purely data-oriented (or field-oriented) XML, and does automatic 
  * linebreaks and indentation (but does not support mixed content 
@@ -394,7 +394,6 @@
      *
      * @param writer The output destination, or null to use
      *        standard output.
-     * @return The current output writer.
      * @see #flush
      */
     public void setOutput (Writer writer)
@@ -643,7 +642,7 @@
      *
      * @param ch The array of characters to write.
      * @param start The starting position in the array.
-     * @param length The number of characters to write.
+     * @param len The number of characters to write.
      * @exception org.xml.sax.SAXException If there is an error
      *            writing the characters, or if a handler further down
      *            the filter chain raises an exception.
------------------------------------------------------------------------------

tssl/tssl.rnc
------------------------------------------------------------------------------
--- tssl/tssl.rnc.ORI   2011-08-22 19:10:18.000000000 +0200
+++ tssl/tssl.rnc       2019-12-12 17:25:05.594276976 +0100
@@ -64,12 +64,13 @@
 
 type = "element" | "any" | "empty" | "mixed" | "string" | "cdata"
 
-## An attribute has a name and a namespace (currently not supported).
+## An attribute has a name and a namespace (currently not supported 
+## except for xml:* attributes).
 ## It also has an optional type and an optional default value.
 \attribute = element attribute {
        attribute ns {xsd:anyURI}?,
-       attribute name {xsd:NCName},
-       attribute type {"ID" | "IDREF" | "IDREFS" | "NMTOKEN" | "BOOLEAN"}?,
+       attribute name {xsd:Name},
+       attribute type { "ID" | "IDREF" | "IDREFS" | "TOKEN" | "LIST" | "BOOLEAN" }?,
        attribute default {xsd:string}?
        }
 ------------------------------------------------------------------------------

tssl/tssl.xslt
------------------------------------------------------------------------------
--- tssl/tssl.xslt.ORI	2011-08-22 19:10:18.000000000 +0200
+++ tssl/tssl.xslt	2019-12-13 12:08:03.766968561 +0100
@@ -164,31 +164,40 @@
     <xsl:param name="attr" select="@name"/>
     <xsl:param name="type" select="@type"/>
     <xsl:param name="default" select="@default"/>
-    <xsl:text>&#x9;&#x9;attribute("</xsl:text>
-    <xsl:value-of select="$elem"/>
-    <xsl:text>", "</xsl:text>
-    <xsl:value-of select="$attr"/>
-    <xsl:text>", "</xsl:text>
-    <xsl:choose>
-      <xsl:when test="$type">
-        <xsl:value-of select="$type"/>
-      </xsl:when>
-      <xsl:when test="not($type)">
-        <xsl:text>CDATA</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:text>", </xsl:text>
-    <xsl:choose>
-      <xsl:when test="$default">
-        <xsl:text>"</xsl:text>
-        <xsl:value-of select="$default"/>
-        <xsl:text>"</xsl:text>
-      </xsl:when>
-      <xsl:when test="not($default)">
-        <xsl:text>null</xsl:text>
-      </xsl:when>
-    </xsl:choose>
-    <xsl:text>);&#xA;</xsl:text>
+
+    <!-- Force the SAX parser to always report "CDATA" whatever 
+         the specified attribute type. -->
+    <xsl:variable name="type2" select="''"/>
+
+    <!-- Workaround the "code too large" javac error which otherwise 
+         occurs when compiling HTMLSchema.java. -->
+    <xsl:if test="$default">
+      <xsl:text>&#x9;&#x9;attribute("</xsl:text>
+      <xsl:value-of select="$elem"/>
+      <xsl:text>", "</xsl:text>
+      <xsl:value-of select="$attr"/>
+      <xsl:text>", "</xsl:text>
+      <xsl:choose>
+        <xsl:when test="$type2">
+          <xsl:value-of select="$type2"/>
+        </xsl:when>
+        <xsl:when test="not($type2)">
+          <xsl:text>CDATA</xsl:text>
+        </xsl:when>
+      </xsl:choose>
+      <xsl:text>", </xsl:text>
+      <xsl:choose>
+        <xsl:when test="$default">
+          <xsl:text>"</xsl:text>
+          <xsl:value-of select="$default"/>
+          <xsl:text>"</xsl:text>
+        </xsl:when>
+        <xsl:when test="not($default)">
+          <xsl:text>null</xsl:text>
+        </xsl:when>
+      </xsl:choose>
+      <xsl:text>);&#xA;</xsl:text>
+    </xsl:if>
   </xsl:template>
 
   <!-- Generates calls to attribute() (using the above template)
------------------------------------------------------------------------------

src/definitions/html.tssl
------------------------------------------------------------------------------
--- src/definitions/html.tssl.ORI	2011-08-22 19:10:18.000000000 +0200
+++ src/definitions/html.tssl	2019-12-16 09:36:06.087930991 +0100
@@ -2158,28 +2158,57 @@
   <entity name='zwj' codepoint='200D'/>
   <entity name='zwnj' codepoint='200C'/>
 
+  <!-- =======================================================================
+       About attributes:
+       =================
+       * Are declared here only those which are not "CDATA" and/or 
+         those which have default values. 
+
+       * When the type of an attribute is not "CDATA", it is set to "ID",
+         "IDREF", "IDREFS", "TOKEN" (a string where whitespace can be
+         normalized), "LIST" (space-separated list of items; same
+         as "TOKEN" but denoting several items) or "BOOLEAN" (e.g. defer,
+         defer="" or defer="defer").
+
+         Any attribute type below other than "CDATA" is just a *hint* and 
+         does *not* correspond to the attribute types documented 
+         in the XML specification.
+
+         In practice,these attribute types are not used at all. The type of an
+         attribute is always reported as being "CDATA".
+  ======================================================================== -->
+
+  <!-- All groups contain script and template. -->
   <group id='M_AREA'/>
   <group id='M_BLOCK'/>
-  <group id='M_BLOCKINLINE'/>
   <group id='M_BODY'/>
   <group id='M_CELL'/>
   <group id='M_COL'/>
   <group id='M_DEF'/>
-  <group id='M_FORM'/>
+  <group id='M_DIV'/>
+  <group id='M_FIGCAPTION'/>
   <group id='M_FRAME'/>
   <group id='M_HEAD'/>
+  <group id='M_HEAD_ONLY'/>
+  <group id='M_HEADING'/>
   <group id='M_HTML'/>
+  <group id='M_IMG'/>
   <group id='M_INLINE'/>
   <group id='M_LEGEND'/>
   <group id='M_LI'/>
-  <group id='M_NOLINK'/>
+  <group id='M_MENUITEM'/>
   <group id='M_OPTION'/>
-  <group id='M_OPTIONS'/>
-  <group id='M_P'/>
+  <group id='M_OPTGROUP'/>
   <group id='M_PARAM'/>
+  <group id='M_RUBY'/>
+  <group id='M_RUBY_LEAF'/>
+  <group id='M_SOURCE'/>
+  <group id='M_SUMMARY'/>
   <group id='M_TABLE'/>
   <group id='M_TABULAR'/>
   <group id='M_TR'/>
+  <group id='M_TRACK'/>
+
   <element name='html' type='element'>
     <isRoot/>
     <contains group='M_HTML'/>
@@ -2188,74 +2217,143 @@
       <memberOf group='M_BODY'/>
       <contains group='M_INLINE'/>
       <contains group='M_BLOCK'/>
+      <attribute name='bgcolor' type='TOKEN' />
+      <attribute name='text' type='TOKEN' />
+      <attribute name='link' type='TOKEN' />
+      <attribute name='vlink' type='TOKEN' />
+      <attribute name='alink' type='TOKEN' />
+      <attribute name='background' type='TOKEN' />
       <element name='a' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <contains group='M_NOLINK'/>
-        <attribute name='hreflang' type='NMTOKEN' />
-        <attribute name='shape' default='rect'/>
-        <attribute name='tabindex' type='NMTOKEN' />
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/> <!--HTML5-->
+        <!-- CDATA attributes: download -->
+        <attribute name='href' type='TOKEN' />
+        <attribute name='target' type='TOKEN' />
+        <attribute name='ping' type='LIST' />
+        <attribute name='rel' type='LIST' />
+        <attribute name='hreflang' type='TOKEN' />
+        <attribute name='type' type='TOKEN' />
+        <attribute name='referrerpolicy' type='TOKEN' />
       </element>
       <element name='abbr' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='acronym' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='address' type='mixed'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <contains group='M_P'/>
+        <contains group='M_BLOCK'/> <!--HTML5; was M_P-->
       </element>
       <element name='applet' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_PARAM'/>
         <contains group='M_INLINE'/>
         <contains group='M_BLOCK'/>
-        <attribute name='align' type='NMTOKEN' />
+        <!-- CDATA attributes: code alt name -->
+        <attribute name='codebase' type='TOKEN' />
+        <attribute name='width' type='TOKEN' />
+        <attribute name='height' type='TOKEN' />
+        <attribute name='align' type='TOKEN' />
+        <attribute name='hspace' type='TOKEN' />
+        <attribute name='vspace' type='TOKEN' />
+        <element name='param' type='empty'>
+          <memberOf group='M_PARAM'/>
+          <!-- CDATA attributes: name, value -->
+          <attribute name='valuetype' type='TOKEN' default='data' />
+        </element>
+      </element>
+      <element name='article' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+      </element>
+      <element name='aside' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+      </element>
+      <element name='audio' type='mixed'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <contains group='M_SOURCE'/>
+        <contains group='M_TRACK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <attribute name='src' type='TOKEN' />
+        <attribute name='crossorigin' type='TOKEN' />
+        <attribute name='preload' type='TOKEN' />
+        <attribute name='autoplay' type='BOOLEAN' />
+        <attribute name='loop' type='BOOLEAN' />
+        <attribute name='muted' type='BOOLEAN' />
+        <attribute name='controls' type='BOOLEAN' />
+        <element name='source' type='empty'>
+          <memberOf group='M_SOURCE'/>
+          <!-- CDATA attributes: srcset sizes -->
+          <attribute name='src' type='TOKEN' />
+          <attribute name='type' type='TOKEN' />
+          <attribute name='media' type='TOKEN' />
+        </element>
+        <element name='track' type='empty'>
+          <memberOf group='M_TRACK'/>
+          <!-- CDATA attributes: label -->
+          <attribute name='kind' type='TOKEN' />
+          <attribute name='src' type='TOKEN' />
+          <attribute name='srclang' type='TOKEN' />
+          <attribute name='default' type='BOOLEAN' />
+        </element>
       </element>
       <element name='b' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='basefont' type='empty'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
+        <attribute name='size' type='TOKEN' />
+      </element>
+      <element name='bdi' closeMode='restartable' type='mixed'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <contains group='M_INLINE'/>
       </element>
       <element name='bdo' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='big' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='blink' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='blockquote' type='mixed'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
         <contains group='M_BLOCK'/>
+        <attribute name='cite' type='TOKEN' />
       </element>
       <element name='br' type='empty'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
-        <attribute name='clear' default='none'/>
+        <attribute name='clear' type='TOKEN' default='none' />
+      </element>
+      <element name='spacer' type='empty'> <!--Obsolete-->
+        <memberOf group='M_INLINE'/>
+        <attribute name='type' type='TOKEN' />
+        <attribute name='size' type='TOKEN' />
+        <attribute name='width' type='TOKEN' />
+        <attribute name='height' type='TOKEN' />
+        <attribute name='align' type='TOKEN' />
       </element>
-      <element name='canvas' type='mixed'>
+      <element name='canvas' type='mixed'> <!--HTML5-->
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <attribute name='width' type='TOKEN' default='300' />
+        <attribute name='height' type='TOKEN' default='150' />
       </element>
       <element name='center' type='mixed'>
         <memberOf group='M_BLOCK'/>
@@ -2264,31 +2362,51 @@
       </element>
       <element name='cite' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='code' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='comment' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
+      <element name='data' closeMode='restartable' type='mixed'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <contains group='M_INLINE'/>
+        <attribute name='value' type='TOKEN' />
+      </element>
       <element name='del' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_BLOCKINLINE'/>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
         <contains group='M_BLOCK'/>
+        <attribute name='cite' type='TOKEN' />
+        <attribute name='datetime' type='TOKEN' />
+      </element>
+      <element name='details' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_SUMMARY'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <attribute name='open' type='BOOLEAN' />
+        <element name='summary' type='mixed'>
+          <memberOf group='M_SUMMARY'/>
+          <contains group='M_INLINE'/>
+          <contains group='M_HEADING'/>
+        </element>
       </element>
       <element name='dfn' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
+      <element name='dialog' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <attribute name='open' type='BOOLEAN' />
+      </element>
       <element name='dir' type='element'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_LI'/>
@@ -2296,13 +2414,15 @@
       </element>
       <element name='div' type='mixed'>
         <memberOf group='M_BLOCK'/>
+        <memberOf group='M_DIV'/>
         <contains group='M_INLINE'/>
         <contains group='M_BLOCK'/>
-        <attribute name='align' type='NMTOKEN' />
+        <attribute name='align' type='TOKEN' />
       </element>
       <element name='dl' type='element'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_DEF'/>
+        <contains group='M_DIV'/> <!--HTML5-->
         <attribute name='compact' type='BOOLEAN' />
         <element name='dd' type='mixed'>
           <memberOf group='M_DEF'/>
@@ -2312,424 +2432,675 @@
         <element name='dt' type='mixed'>
           <memberOf group='M_DEF'/>
           <contains group='M_INLINE'/>
+          <contains group='M_BLOCK'/> <!--HTML5-->
         </element>
       </element>
       <element name='em' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
+      <element name='figure' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <contains group='M_FIGCAPTION'/>
+        <element name='figcaption' type='mixed'>
+          <memberOf group='M_FIGCAPTION'/>
+          <contains group='M_INLINE'/>
+          <contains group='M_BLOCK'/>
+        </element>
+      </element>
       <element name='font' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
+        <attribute name='size' type='TOKEN' />
+        <attribute name='color' type='TOKEN' />
+      </element>
+      <element name='footer' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
       </element>
       <element name='form' closeMode='unclosable' type='mixed'>
         <memberOf group='M_BLOCK'/>
-        <memberOf group='M_FORM'/>
         <contains group='M_INLINE'/>
-        <contains group='M_NOLINK'/>
         <contains group='M_BLOCK'/>
-        <contains group='M_TR'/>
-        <contains group='M_CELL'/>
-        <attribute name='enctype' default='application/x-www-form-urlencoded'/>
-        <attribute name='method' default='get'/>
-        <element name='button' type='mixed'>
+        <!-- CDATA attributes: name -->
+        <attribute name='accept-charset' type='LIST' />
+        <attribute name='action' type='TOKEN' />
+        <attribute name='autocomplete' type='TOKEN' default='on' />
+        <attribute name='enctype' type='TOKEN'
+                   default='application/x-www-form-urlencoded' />
+        <attribute name='method' type='TOKEN' default='get' />
+        <attribute name='novalidate' type='BOOLEAN' />
+        <attribute name='target' type='TOKEN' />
+        <attribute name='rel' type='LIST' />
+        <attribute name='accept' type='LIST' />
+        <element name='label' type='mixed'>
           <memberOf group='M_INLINE'/>
-          <memberOf group='M_NOLINK'/>
-          <contains group='M_INLINE'/>
-          <contains group='M_BLOCK'/>
-          <attribute name='disabled' type='BOOLEAN' />
-          <attribute name='tabindex' type='NMTOKEN' />
-          <attribute name='type' default='submit'/>
-        </element>
-        <element name='fieldset' type='mixed'>
-          <memberOf group='M_BLOCK'/>
-          <contains group='M_LEGEND'/>
           <contains group='M_INLINE'/>
-          <contains group='M_BLOCK'/>
-          <element name='legend' type='mixed'>
-            <memberOf group='M_LEGEND'/>
-            <contains group='M_INLINE'/>
-            <attribute name='align' type='NMTOKEN' />
-          </element>
+          <attribute name='for' type='IDREF' />
         </element>
         <element name='input' type='empty'>
           <memberOf group='M_INLINE'/>
-          <memberOf group='M_NOLINK'/>
-          <attribute name='align' type='NMTOKEN' />
+          <!-- CDATA attributes: 
+               value alt dirname max min name pattern placeholder -->
+          <attribute name='accept' type='LIST' />
+          <attribute name='autocomplete' type='TOKEN' />
           <attribute name='checked' type='BOOLEAN' />
           <attribute name='disabled' type='BOOLEAN' />
-          <attribute name='ismap' type='BOOLEAN' />
-          <attribute name='maxlength' type='NMTOKEN' />
+          <attribute name='form' type='IDREF' />
+          <attribute name='formaction' type='TOKEN' />
+          <attribute name='formenctype' type='TOKEN' />
+          <attribute name='formmethod' type='TOKEN' />
+          <attribute name='formnovalidate' type='BOOLEAN' />
+          <attribute name='formtarget' type='TOKEN' />
+          <attribute name='height' type='TOKEN' />
+          <attribute name='list' type='IDREF' />
+          <attribute name='maxlength' type='TOKEN' />
+          <attribute name='minlength' type='TOKEN' />
+          <attribute name='multiple' type='BOOLEAN' />
           <attribute name='readonly' type='BOOLEAN' />
-          <attribute name='tabindex' type='NMTOKEN' />
-          <attribute name='type' default='text'/>
+          <attribute name='required' type='BOOLEAN' />
+          <attribute name='size' type='TOKEN' />
+          <attribute name='src' type='TOKEN' />
+          <attribute name='step' type='TOKEN' />
+          <attribute name='type' type='TOKEN' default='text'/>
+          <attribute name='width' type='TOKEN' />
+          <attribute name='align' type='TOKEN' />
+          <attribute name='usemap' type='TOKEN' />
+          <attribute name='ismap' type='BOOLEAN' />
         </element>
-        <element name='label' type='mixed'>
+        <element name='button' type='mixed'>
           <memberOf group='M_INLINE'/>
-          <memberOf group='M_NOLINK'/>
           <contains group='M_INLINE'/>
-          <attribute name='for' type='IDREF' />
+          <!-- CDATA attributes: name value -->
+          <attribute name='disabled' type='BOOLEAN' />
+          <attribute name='form' type='IDREF' />
+          <attribute name='formaction' type='TOKEN' />
+          <attribute name='formenctype' type='TOKEN' />
+          <attribute name='formmethod' type='TOKEN' />
+          <attribute name='formnovalidate' type='BOOLEAN' />
+          <attribute name='formtarget' type='TOKEN' />
+          <attribute name='type' type='TOKEN' default='submit' />
         </element>
         <element name='select' type='element'>
           <memberOf group='M_INLINE'/>
-          <contains group='M_OPTIONS'/>
+          <contains group='M_OPTGROUP'/>
+          <contains group='M_OPTION'/>
+          <!-- CDATA attributes: name -->
+          <attribute name='autocomplete' type='TOKEN' />
           <attribute name='disabled' type='BOOLEAN' />
+          <attribute name='form' type='IDREF' />
           <attribute name='multiple' type='BOOLEAN' />
-          <attribute name='size' type='NMTOKEN' />
-          <attribute name='tabindex' type='NMTOKEN' />
+          <attribute name='required' type='BOOLEAN' />
+          <attribute name='size' type='TOKEN' />
           <element name='optgroup' type='element'>
-            <memberOf group='M_OPTIONS'/>
-            <contains group='M_OPTIONS'/>
+            <memberOf group='M_OPTGROUP'/>
+            <contains group='M_OPTION'/>
+            <!-- CDATA attributes: label -->
             <attribute name='disabled' type='BOOLEAN' />
           </element>
           <element name='option' type='string'>
             <memberOf group='M_OPTION'/>
-            <memberOf group='M_OPTIONS'/>
+            <!-- CDATA attributes: label value -->
             <attribute name='disabled' type='BOOLEAN' />
             <attribute name='selected' type='BOOLEAN' />
           </element>
         </element>
+        <element name='datalist' type='mixed'> <!--HTML5-->
+          <memberOf group='M_INLINE'/>
+          <contains group='M_INLINE'/>
+          <contains group='M_OPTION'/>
+        </element>
         <element name='textarea' type='string'>
           <memberOf group='M_INLINE'/>
-          <attribute name='cols' type='NMTOKEN' />
+          <!-- CDATA attributes: dirname name placeholder -->
+          <attribute name='autocomplete' type='TOKEN' />
+          <attribute name='cols' type='TOKEN' default='20' />
           <attribute name='disabled' type='BOOLEAN' />
+          <attribute name='form' type='IDREF' />
+          <attribute name='maxlength' type='TOKEN' />
+          <attribute name='minlength' type='TOKEN' />
           <attribute name='readonly' type='BOOLEAN' />
-          <attribute name='rows' type='NMTOKEN' />
-          <attribute name='tabindex' type='NMTOKEN' />
+          <attribute name='required' type='BOOLEAN' />
+          <attribute name='rows' type='TOKEN' default='2' />
+          <attribute name='wrap' type='TOKEN' default='soft' />
+        </element>
+        <element name='output' type='mixed'> <!--HTML5-->
+          <memberOf group='M_INLINE'/>
+          <contains group='M_INLINE'/>
+          <!-- CDATA attributes: name -->
+          <attribute name='for' type='IDREF' />
+          <attribute name='form' type='IDREF' />
+        </element>
+        <element name='progress' type='mixed'> <!--HTML5-->
+          <memberOf group='M_INLINE'/>
+          <contains group='M_INLINE'/>
+          <attribute name='value' type='TOKEN' />
+          <attribute name='max' type='TOKEN' default='1' />
+        </element>
+        <element name='meter' type='mixed'> <!--HTML5-->
+          <memberOf group='M_INLINE'/>
+          <contains group='M_INLINE'/>
+          <attribute name='value' type='TOKEN' />
+          <attribute name='min' type='TOKEN' default='0' />
+          <attribute name='max' type='TOKEN' default='1' />
+          <attribute name='low' type='TOKEN' />
+          <attribute name='high' type='TOKEN' />
+          <attribute name='optimum' type='TOKEN' />
+        </element>
+        <element name='fieldset' type='mixed'>
+          <memberOf group='M_BLOCK'/>
+          <contains group='M_LEGEND'/>
+          <contains group='M_INLINE'/>
+          <contains group='M_BLOCK'/>
+          <!-- CDATA attributes: name -->
+          <attribute name='disabled' type='BOOLEAN' />
+          <attribute name='form' type='IDREF' />
+          <element name='legend' type='mixed'>
+            <memberOf group='M_LEGEND'/>
+            <contains group='M_INLINE'/>
+            <attribute name='align' type='TOKEN' />
+          </element>
+        </element>
+        <element name='keygen' type='empty'> <!--HTML5 obsolete-->
+          <memberOf group='M_INLINE'/>
+          <!-- CDATA attributes: name challenge -->
+          <attribute name='disabled' type='BOOLEAN' />
+          <attribute name='form' type='IDREF' />
+          <attribute name='keytype' type='TOKEN' />
+        </element>
+        <element name='command' type='empty'> <!--HTML5 obsolete-->
+          <memberOf group='M_INLINE'/>
+          <!-- CDATA attributes: label radiogroup -->
+          <attribute name='type' type='TOKEN' />
+          <attribute name='icon' type='TOKEN' />
+          <attribute name='disabled' type='BOOLEAN' />
+          <attribute name='checked' type='BOOLEAN' />
+          <attribute name='default' type='BOOLEAN' />
         </element>
       </element>
+      <element name='embed' type='empty'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <attribute name='src' type='TOKEN' />
+        <attribute name='type' type='TOKEN' />
+        <attribute name='width' type='TOKEN' />
+        <attribute name='height' type='TOKEN' />
+        <!-- Cannot declare obsolete noembed here -->
+      </element>
+      <element name='noembed' type='mixed'> <!--Obsolete-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+      </element>
+      <element name='multicol' type='mixed'> <!--Obsolete-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <attribute name='cols' type='TOKEN' />
+        <attribute name='gutter' type='TOKEN' />
+        <attribute name='width' type='TOKEN' />
+      </element>
       <element name='h1' type='mixed'>
+        <memberOf group='M_HEADING'/>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <attribute name='align' type='NMTOKEN' />
+        <attribute name='align' type='TOKEN' />
       </element>
       <element name='h2' type='mixed'>
+        <memberOf group='M_HEADING'/>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <attribute name='align' type='NMTOKEN' />
+        <attribute name='align' type='TOKEN' />
       </element>
       <element name='h3' type='mixed'>
+        <memberOf group='M_HEADING'/>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <attribute name='align' type='NMTOKEN' />
+        <attribute name='align' type='TOKEN' />
       </element>
       <element name='h4' type='mixed'>
+        <memberOf group='M_HEADING'/>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <attribute name='align' type='NMTOKEN' />
+        <attribute name='align' type='TOKEN' />
       </element>
       <element name='h5' type='mixed'>
+        <memberOf group='M_HEADING'/>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <attribute name='align' type='NMTOKEN' />
+        <attribute name='align' type='TOKEN' />
       </element>
       <element name='h6' type='mixed'>
+        <memberOf group='M_HEADING'/>
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <attribute name='align' type='TOKEN' />
+      </element>
+      <element name='header' type='mixed'> <!--HTML5-->
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <attribute name='align' type='NMTOKEN' />
+        <contains group='M_BLOCK'/>
+      </element>
+      <element name='hgroup' type='element'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_HEADING'/>
       </element>
       <element name='hr' type='empty'>
         <memberOf group='M_BLOCK'/>
-        <attribute name='align' type='NMTOKEN' />
+        <attribute name='align' type='TOKEN' />
         <attribute name='noshade' type='BOOLEAN' />
+        <attribute name='size' type='TOKEN' />
+        <attribute name='width' type='TOKEN' />
       </element>
       <element name='i' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='iframe' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
-        <contains group='M_INLINE'/>
+        <contains group='M_INLINE'/> <!--As of HTML5, iframe is empty. -->
         <contains group='M_BLOCK'/>
-        <attribute name='align' type='NMTOKEN' />
-        <attribute name='frameborder' default='1'/>
-        <attribute name='scrolling' default='auto'/>
+        <!-- CDATA attributes: srcdoc  -->
+        <attribute name='src' type='TOKEN' />
+        <attribute name='name' type='TOKEN' />
+        <attribute name='sandbox' type='LIST' />
+        <attribute name='allow' type='TOKEN' />
+        <attribute name='allowfullscreen' type='BOOLEAN' />
+        <attribute name='allowpaymentrequest' type='BOOLEAN' />
+        <attribute name='width' type='TOKEN' />
+        <attribute name='height' type='TOKEN' />
+        <attribute name='referrerpolicy' type='TOKEN' />
+        <attribute name='longdesc' type='TOKEN' />
+        <attribute name='frameborder' type='TOKEN' default='1'/>
+        <attribute name='marginwidth' type='TOKEN' />
+        <attribute name='marginheight' type='TOKEN' />
+        <attribute name='scrolling' type='TOKEN' default='auto' />
+        <attribute name='align' type='TOKEN' />
       </element>
       <element name='img' type='empty'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
-        <attribute name='align' type='NMTOKEN' />
+        <memberOf group='M_IMG'/>
+        <!-- CDATA attributes: alt srcset sizes -->
+        <attribute name='src' type='TOKEN' />
+        <attribute name='crossorigin' type='TOKEN' />
+        <attribute name='usemap' type='TOKEN' />
+        <attribute name='ismap' type='BOOLEAN' />
+        <attribute name='width' type='TOKEN' />
+        <attribute name='height' type='TOKEN' />
+        <attribute name='referrerpolicy' type='TOKEN' />
+        <attribute name='decoding' type='TOKEN' />
         <attribute name='ismap' type='BOOLEAN' />
+        <attribute name='align' type='TOKEN' />
+        <attribute name='border' type='TOKEN' />
+        <attribute name='hspace' type='TOKEN' />
+        <attribute name='vspace' type='TOKEN' />
       </element>
       <element name='ins' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
         <contains group='M_BLOCK'/>
+        <attribute name='cite' type='TOKEN' />
+        <attribute name='datetime' type='TOKEN' />
       </element>
       <element name='kbd' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
+      <element name='main' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+      </element>
       <element name='map' type='element'>
         <memberOf group='M_INLINE'/>
+        <contains group='M_INLINE'/>
         <contains group='M_BLOCK'/>
         <contains group='M_AREA'/>
+        <attribute name='name' type='TOKEN' />
         <element name='area' type='empty'>
           <memberOf group='M_AREA'/>
+          <!-- CDATA attributes: alt download -->
+          <attribute name='coords' type='TOKEN' />
+          <attribute name='shape' type='TOKEN' default='rect'/>
+          <attribute name='href' type='TOKEN' />
+          <attribute name='target' type='TOKEN' />
+          <attribute name='ping' type='LIST' />
+          <attribute name='rel' type='LIST' />
+          <attribute name='referrerpolicy' type='TOKEN' />
           <attribute name='nohref' type='BOOLEAN' />
-          <attribute name='shape' default='rect'/>
-          <attribute name='tabindex' type='NMTOKEN' />
         </element>
       </element>
       <element name='menu' type='element'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_LI'/>
+        <contains group='M_MENUITEM'/>
         <attribute name='compact' type='BOOLEAN' />
+        <element name='menuitem' type='empty'> <!--HTML5 obsolete-->
+          <memberOf group='M_MENUITEM'/>
+          <!-- CDATA attributes: label radiogroup -->
+          <attribute name='type' type='TOKEN' />
+          <attribute name='icon' type='TOKEN' />
+          <attribute name='disabled' type='BOOLEAN' />
+          <attribute name='checked' type='BOOLEAN' />
+          <attribute name='default' type='BOOLEAN' />
+          <attribute name='command' type='IDREF' />
+        </element>
+      </element>
+      <element name='mark' closeMode='restartable' type='mixed'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <contains group='M_INLINE'/>
       </element>
       <element name='marquee' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
-        <attribute name='width' type='NMTOKEN' />
+        <attribute name='width' type='TOKEN' />
+      </element>
+      <element name='nav' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
       </element>
       <element name='nobr' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='wbr' type='empty'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
-      </element>
-      <element name='noscript' type='mixed'>
-	<memberOfAny/>
-        <contains group='M_INLINE'/>
-        <contains group='M_BLOCK'/>
       </element>
       <element name='object' type='mixed'>
-        <memberOf group='M_HEAD'/>
+        <memberOf group='M_HEAD'/> <!-- Not in HTML5 -->
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_PARAM'/>
         <contains group='M_INLINE'/>
         <contains group='M_BLOCK'/>
-        <attribute name='align' type='NMTOKEN' />
+        <!-- CDATA attributes: standby -->
+        <attribute name='data' type='TOKEN' />
+        <attribute name='type' type='TOKEN' />
+        <attribute name='name' type='TOKEN' />
+        <attribute name='usemap' type='TOKEN' />
+        <attribute name='form' type='IDREF' />
+        <attribute name='width' type='TOKEN' />
+        <attribute name='height' type='TOKEN' />
         <attribute name='declare' type='BOOLEAN' />
-        <attribute name='tabindex' type='NMTOKEN' />
-        <element name='param' type='empty'>
-          <memberOf group='M_PARAM'/>
-          <attribute name='valuetype' default='data'/>
-        </element>
+        <attribute name='classid' type='TOKEN' />
+        <attribute name='codebase' type='TOKEN' />
+        <attribute name='codetype' type='TOKEN' />
+        <attribute name='archive' type='LIST' />
+        <attribute name='align' type='TOKEN' />
+        <attribute name='border' type='TOKEN' />
+        <attribute name='hspace' type='TOKEN' />
+        <attribute name='vspace' type='TOKEN' />
       </element>
       <element name='ol' type='element'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_LI'/>
         <attribute name='compact' type='BOOLEAN' />
-        <attribute name='start' type='NMTOKEN' />
+        <attribute name='start' type='TOKEN' />
+        <attribute name='type' type='TOKEN' default='1' />
+        <attribute name='reversed' type='BOOLEAN' />
       </element>
       <element name='p' type='mixed'>
         <memberOf group='M_BLOCK'/>
-        <memberOf group='M_P'/>
-        <contains group='M_INLINE'/>
-        <contains group='M_TABLE'/>
-        <attribute name='align' type='NMTOKEN' />
+        <contains group='M_INLINE'/> <!--HTML5; not M_TABLE too-->
+        <attribute name='align' type='TOKEN' />
+      </element>
+      <element name='picture' type='element'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <contains group='M_SOURCE'/>
+        <contains group='M_IMG'/>
       </element>
       <element name='pre' type='mixed'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
-        <attribute name='width' type='NMTOKEN' />
+        <attribute name='width' type='TOKEN' />
       </element>
-      <element name='listing' type='mixed'>
+      <element name='listing' type='cdata'>
         <memberOf group='M_BLOCK'/>
-        <contains group='M_INLINE'/>
       </element>
-      <element name='xmp' type='mixed'>
+      <element name='xmp' type='cdata'>
         <memberOf group='M_BLOCK'/>
-        <contains group='M_INLINE'/>
-        <attribute name='width' type='NMTOKEN' />
       </element>
       <element name='q' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
-        <contains group='M_INLINE'/>
-      </element>
-      <element name='ruby' closeMode='restartable' type='mixed'>
-        <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
-        <contains group='M_INLINE'/>
-      </element>
-      <element name='rbc' closeMode='restartable' type='mixed'>
-        <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
-        <contains group='M_INLINE'/>
-      </element>
-      <element name='rtc' closeMode='restartable' type='mixed'>
-        <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
+        <attribute name='cite' type='TOKEN' />
       </element>
-      <element name='rb' closeMode='restartable' type='mixed'>
+      <!-- Initial ruby specification: https://www.w3.org/TR/ruby/ -->
+      <element name='ruby' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
+        <contains group='M_RUBY'/>
+        <contains group='M_RUBY_LEAF'/>
         <contains group='M_INLINE'/>
+        <element name='rbc' closeMode='restartable' type='mixed'>
+          <memberOf group='M_RUBY'/>
+          <contains group='M_RUBY_LEAF'/>
+          <contains group='M_INLINE'/>
+        </element>
+        <element name='rtc' closeMode='restartable' type='mixed'>
+          <memberOf group='M_RUBY'/>
+          <contains group='M_RUBY_LEAF'/>
+          <contains group='M_INLINE'/>
+        </element>
+        <element name='rb' closeMode='restartable' type='mixed'>
+          <memberOf group='M_RUBY_LEAF'/>
+          <contains group='M_INLINE'/>
+        </element>
+        <element name='rt' closeMode='restartable' type='mixed'>
+          <memberOf group='M_RUBY_LEAF'/>
+          <contains group='M_INLINE'/>
+          <!-- CDATA attributes: rbspan. -->
+        </element>
+        <element name='rp' closeMode='restartable' type='mixed'>
+          <memberOf group='M_RUBY_LEAF'/>
+          <contains group='M_INLINE'/>
+        </element>
       </element>
-      <element name='rt' closeMode='restartable' type='mixed'>
+      <element name='s' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
-	<attribute name='rbspan' default='1'/>
       </element>
-      <element name='rp' closeMode='restartable' type='mixed'>
+      <element name='samp' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
-      <element name='s' closeMode='restartable' type='mixed'>
-        <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
+      <element name='section' type='mixed'> <!--HTML5-->
+        <memberOf group='M_BLOCK'/>
         <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
       </element>
-      <element name='samp' closeMode='restartable' type='mixed'>
+      <element name='slot' type='mixed'> <!--HTML5-->
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <!-- CDATA attributes: name -->
       </element>
       <element name='small' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='span' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='strike' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='strong' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='sub' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='sup' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='table' closeMode='unclosable' type='element'>
         <memberOf group='M_BLOCK'/>
-        <memberOf group='M_TABLE'/>
-        <contains group='M_FORM'/>
         <contains group='M_TABULAR'/>
-        <attribute name='align' type='NMTOKEN' />
-        <attribute name='frame' type='NMTOKEN' />
-        <attribute name='rules' type='NMTOKEN' />
+        <!-- CDATA attributes: summary -->
+        <attribute name='width' type='TOKEN' />
+        <attribute name='border' type='TOKEN' />
+        <attribute name='frame' type='TOKEN' />
+        <attribute name='rules' type='TOKEN' />
+        <attribute name='cellspacing' type='TOKEN' />
+        <attribute name='cellpadding' type='TOKEN' />
+        <attribute name='bgcolor' type='TOKEN' />
+        <attribute name='align' type='TOKEN' />
         <element name='caption' type='mixed'>
           <memberOf group='M_TABULAR'/>
           <contains group='M_INLINE'/>
-          <attribute name='align' type='NMTOKEN' />
-        </element>
-        <element name='col' type='empty'>
-          <memberOf group='M_COL'/>
-          <memberOf group='M_TABULAR'/>
-          <attribute name='align' type='NMTOKEN' />
-          <attribute name='span' default='1'/>
-          <attribute name='valign' type='NMTOKEN' />
+          <contains group='M_BLOCK'/> <!--HTML5-->
+          <attribute name='align' type='TOKEN' />
         </element>
         <element name='colgroup' type='element'>
           <memberOf group='M_TABULAR'/>
           <contains group='M_COL'/>
-          <attribute name='align' type='NMTOKEN' />
-          <attribute name='span' default='1'/>
-          <attribute name='valign' type='NMTOKEN' />
+          <attribute name='span' type='TOKEN' default='1' />
+          <attribute name='width' type='TOKEN' />
+          <attribute name='align' type='TOKEN' />
+          <attribute name='char' type='TOKEN' />
+          <attribute name='charoff' type='TOKEN' />
+          <attribute name='valign' type='TOKEN' />
+        </element>
+        <element name='col' type='empty'>
+          <memberOf group='M_TABULAR'/>
+          <memberOf group='M_COL'/>
+          <attribute name='span' type='TOKEN' default='1' />
+          <attribute name='width' type='TOKEN' />
+          <attribute name='align' type='TOKEN' />
+          <attribute name='char' type='TOKEN' />
+          <attribute name='charoff' type='TOKEN' />
+          <attribute name='valign' type='TOKEN' />
         </element>
         <element name='tbody' type='element'>
           <memberOf group='M_TABULAR'/>
           <contains group='M_TR'/>
-          <attribute name='align' type='NMTOKEN' />
-          <attribute name='valign' type='NMTOKEN' />
+          <attribute name='align' type='TOKEN' />
+          <attribute name='char' type='TOKEN' />
+          <attribute name='charoff' type='TOKEN' />
+          <attribute name='valign' type='TOKEN' />
           <element name='tr' type='element'>
-            <memberOf group='M_TR'/>
             <memberOf group='M_TABULAR'/>
-            <contains group='M_FORM'/>
+            <memberOf group='M_TR'/>
             <contains group='M_CELL'/>
-            <attribute name='align' type='NMTOKEN' />
-            <attribute name='valign' type='NMTOKEN' />
+            <attribute name='bgcolor' type='TOKEN' />
+            <attribute name='align' type='TOKEN' />
+            <attribute name='char' type='TOKEN' />
+            <attribute name='charoff' type='TOKEN' />
+            <attribute name='valign' type='TOKEN' />
             <element name='td' type='mixed'>
               <memberOf group='M_CELL'/>
               <contains group='M_INLINE'/>
               <contains group='M_BLOCK'/>
-              <attribute name='align' type='NMTOKEN' />
-              <attribute name='colspan' default='1'/>
+              <!-- CDATA attributes: abbr, axis -->
+              <attribute name='colspan' type='TOKEN' default='1'/>
+              <attribute name='rowspan' type='TOKEN' default='1'/>
               <attribute name='headers' type='IDREFS' />
+              <attribute name='scope' type='TOKEN' />
               <attribute name='nowrap' type='BOOLEAN' />
-              <attribute name='rowspan' default='1'/>
-              <attribute name='scope' type='NMTOKEN' />
-              <attribute name='valign' type='NMTOKEN' />
+              <attribute name='width' type='TOKEN' />
+              <attribute name='height' type='TOKEN' />
+              <attribute name='bgcolor' type='TOKEN' />
+              <attribute name='align' type='TOKEN' />
+              <attribute name='char' type='TOKEN' />
+              <attribute name='charoff' type='TOKEN' />
+              <attribute name='valign' type='TOKEN' />
             </element>
             <element name='th' type='mixed'>
               <memberOf group='M_CELL'/>
               <contains group='M_INLINE'/>
               <contains group='M_BLOCK'/>
-              <attribute name='align' type='NMTOKEN' />
-              <attribute name='colspan' default='1'/>
+              <!-- CDATA attributes: abbr, axis -->
+              <attribute name='colspan' type='TOKEN' default='1'/>
+              <attribute name='rowspan' type='TOKEN' default='1'/>
               <attribute name='headers' type='IDREFS' />
+              <attribute name='scope' type='TOKEN' />
               <attribute name='nowrap' type='BOOLEAN' />
-              <attribute name='rowspan' default='1'/>
-              <attribute name='scope' type='NMTOKEN' />
-              <attribute name='valign' type='NMTOKEN' />
+              <attribute name='width' type='TOKEN' />
+              <attribute name='height' type='TOKEN' />
+              <attribute name='bgcolor' type='TOKEN' />
+              <attribute name='align' type='TOKEN' />
+              <attribute name='char' type='TOKEN' />
+              <attribute name='charoff' type='TOKEN' />
+              <attribute name='valign' type='TOKEN' />
             </element>
           </element>
         </element>
         <element name='tfoot' type='element'>
           <memberOf group='M_TABULAR'/>
           <contains group='M_TR'/>
-          <contains group='M_FORM'/>
-          <contains group='M_CELL'/>
-          <attribute name='align' type='NMTOKEN' />
-          <attribute name='valign' type='NMTOKEN' />
+          <attribute name='align' type='TOKEN' />
+          <attribute name='char' type='TOKEN' />
+          <attribute name='charoff' type='TOKEN' />
+          <attribute name='valign' type='TOKEN' />
         </element>
         <element name='thead' type='element'>
           <memberOf group='M_TABULAR'/>
           <contains group='M_TR'/>
-          <contains group='M_FORM'/>
-          <contains group='M_CELL'/>
-          <attribute name='align' type='NMTOKEN' />
-          <attribute name='valign' type='NMTOKEN' />
+          <attribute name='align' type='TOKEN' />
+          <attribute name='char' type='TOKEN' />
+          <attribute name='charoff' type='TOKEN' />
+          <attribute name='valign' type='TOKEN' />
         </element>
       </element>
+      <element name='time' closeMode='restartable' type='mixed'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <contains group='M_INLINE'/>
+        <attribute name='datetime' type='TOKEN' />
+      </element>
       <element name='tt' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='u' closeMode='restartable' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
       <element name='ul' type='element'>
         <memberOf group='M_BLOCK'/>
         <contains group='M_LI'/>
         <attribute name='compact' type='BOOLEAN' />
-        <attribute name='type' type='NMTOKEN' />
+        <attribute name='type' type='TOKEN' />
         <element name='li' type='mixed'>
           <memberOf group='M_LI'/>
           <contains group='M_INLINE'/>
           <contains group='M_BLOCK'/>
-          <attribute name='value' type='NMTOKEN' />
+          <attribute name='value' type='TOKEN' />
         </element>
       </element>
       <element name='var' type='mixed'>
         <memberOf group='M_INLINE'/>
-        <memberOf group='M_NOLINK'/>
         <contains group='M_INLINE'/>
       </element>
+      <element name='video' type='mixed'> <!--HTML5-->
+        <memberOf group='M_INLINE'/>
+        <contains group='M_SOURCE'/>
+        <contains group='M_TRACK'/>
+        <contains group='M_INLINE'/>
+        <contains group='M_BLOCK'/>
+        <attribute name='src' type='TOKEN' />
+        <attribute name='crossorigin' type='TOKEN' />
+        <attribute name='preload' type='TOKEN' />
+        <attribute name='autoplay' type='BOOLEAN' />
+        <attribute name='playsinline' type='BOOLEAN' />
+        <attribute name='loop' type='BOOLEAN' />
+        <attribute name='muted' type='BOOLEAN' />
+        <attribute name='controls' type='BOOLEAN' />
+        <attribute name='width' type='TOKEN' />
+        <attribute name='height' type='TOKEN' />
+      </element>
+      <element name='wbr' type='empty'>
+        <memberOf group='M_INLINE'/>
+      </element>
     </element>
+
     <element name='frameset' type='element'>
       <memberOf group='M_FRAME'/>
       <memberOf group='M_HTML'/>
@@ -2741,36 +3112,66 @@
         <attribute name='scrolling' default='auto'/>
       </element>
     </element>
+
     <element name='head' type='element'>
       <memberOf group='M_HTML'/>
       <contains group='M_HEAD'/>
+      <contains group='M_HEAD_ONLY'/>
       <element name='base' type='empty'>
+        <memberOf group='M_HEAD_ONLY'/>
+        <attribute name='href' type='TOKEN' />
+        <attribute name='target' type='TOKEN' />
+      </element>
+      <element name='bgsound' type='empty'>
         <memberOf group='M_HEAD'/>
+        <memberOf group='M_INLINE'/> <!-- Like input -->
       </element>
       <element name='isindex' type='empty'>
         <memberOf group='M_HEAD'/>
+        <memberOf group='M_INLINE'/> <!-- Like audio -->
+        <!-- CDATA attributes: prompt -->
       </element>
       <element name='link' type='empty'>
         <memberOf group='M_HEAD'/>
         <memberOf group='M_INLINE'/>
-        <attribute name='hreflang' type='NMTOKEN' />
+        <!-- CDATA attributes: integrity, imagesrcset, imagesizes -->
+        <attribute name='href' type='TOKEN' />
+        <attribute name='crossorigin' type='TOKEN' />
+        <attribute name='rel' type='LIST' />
+        <attribute name='media' type='TOKEN' />
+        <attribute name='hreflang' type='TOKEN' />
+        <attribute name='type' type='TOKEN' />
+        <attribute name='referrerpolicy' type='TOKEN' />
+        <attribute name='sizes' type='LIST' />
+        <attribute name='as' type='TOKEN' />
+        <attribute name='color' type='TOKEN' />
       </element>
       <element name='meta' type='empty'>
         <memberOf group='M_HEAD'/>
-        <attribute name='http-equiv' type='NMTOKEN' />
-        <attribute name='name' type='NMTOKEN' />
+        <!-- CDATA attributes: content -->
+        <attribute name='name' type='TOKEN' />
+        <attribute name='http-equiv' type='TOKEN' />
+        <attribute name='charset' type='TOKEN' />
       </element>
       <element name='style' type='cdata'>
         <memberOf group='M_HEAD'/>
-        <memberOf group='M_INLINE'/>
+        <memberOf group='M_INLINE'/> <!-- Not in HTML5 -->
+        <attribute name='media' type='TOKEN' default='all'/>
+        <attribute name='type' type='TOKEN' />
       </element>
       <element name='title' type='string'>
-        <memberOf group='M_HEAD'/>
-      </element>
-      <element name='bgsound' type='empty'>
-        <memberOf group='M_HEAD'/>
+        <memberOf group='M_HEAD_ONLY'/>
       </element>
     </element>
+
+    <element name='noscript' type='mixed'>
+      <memberOf group='M_HEAD'/>
+      <memberOf group='M_INLINE'/>
+      <contains group='M_INLINE'/>
+      <contains group='M_BLOCK'/>
+      <contains group='M_HEAD'/>
+    </element>
+
     <element name='noframes' type='element'>
       <memberOf group='M_BLOCK'/>
       <memberOf group='M_HTML'/>
@@ -2779,13 +3180,55 @@
       <contains group='M_BLOCK'/>
       <contains group='M_INLINE'/>
     </element>
+
     <element name='script' type='cdata'>
+      <!-- CDATA attributes: integrity -->
       <memberOfAny/>
+      <attribute name='src' type='TOKEN' />
+      <attribute name='type' type='TOKEN' />
+      <attribute name='charset' type='TOKEN' />
+      <attribute name='nomodule' type='BOOLEAN' />
+      <attribute name='async' type='BOOLEAN' />
       <attribute name='defer' type='BOOLEAN' />
+      <attribute name='crossorigin' type='TOKEN' />
+      <attribute name='referrerpolicy' type='TOKEN' />
+    </element>
+
+    <element name='template' type='mixed'> <!--HTML5-->
+      <memberOfAny/>
+      <contains group='M_INLINE'/>
+      <contains group='M_BLOCK'/>
+      <contains group='M_HEAD'/>
     </element>
   </element>
-  <attribute name='class' type='NMTOKEN' />
-  <attribute name='dir' type='NMTOKEN' />
+
+  <!-- Global attributes ================================================= 
+       Omitted because "CDATA": nonce, slot, style, title, 
+       on* event handlers, data-*, ARIA attributes.
+  -->
+  <attribute name='accesskey' type='LIST' />
+  <attribute name='autocapitalize' type='TOKEN' />
+  <attribute name='autofocus' type='BOOLEAN' />
+  <attribute name='class' type='LIST' />
+  <attribute name='contenteditable' type='TOKEN' />
+  <attribute name='dir' type='TOKEN' />
+  <attribute name='draggable' type='TOKEN' />
+  <attribute name='enterkeyhint' type='TOKEN' />
+  <attribute name='hidden' type='BOOLEAN' />
   <attribute name='id' type='ID' />
-  <attribute name='lang' type='NMTOKEN' />
+  <attribute name='inputmode' type='TOKEN' />
+  <attribute name='is' type='TOKEN' />
+  <attribute name='itemid' type='TOKEN' />
+  <attribute name='itemprop' type='LIST' />
+  <attribute name='itemref' type='IDREFS' />
+  <attribute name='itemscope' type='BOOLEAN' />
+  <attribute name='itemtype' type='LIST' />
+  <attribute name='lang' type='TOKEN' />
+  <attribute name='spellcheck' type='TOKEN' />
+  <attribute name='tabindex' type='TOKEN' />
+  <attribute name='translate' type='TOKEN' />
+
+  <attribute name='xml:lang' type='TOKEN' />
+  <attribute name='xml:space' type='TOKEN' />
+  <attribute name='xml:base' type='TOKEN' />
 </schema>
------------------------------------------------------------------------------
