W3C home > Mailing lists > Public > public-html-commits@w3.org > August 2009

html5/markup/tools generate-spec-source.xsl,1.200,1.201 specgen.xsl,1.39,1.40

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 20 Aug 2009 07:43:20 +0000
To: public-html-commits@w3.org
Message-Id: <E1Me2Iq-0001PY-2I@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv5083/tools

Modified Files:
	generate-spec-source.xsl specgen.xsl 
Log Message:
added ARIA-integration version at http://dev.w3.org/html5/markup/aria/ - based on validator.nu HTML5+ARIA schema


Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- generate-spec-source.xsl	16 Aug 2009 10:53:46 -0000	1.200
+++ generate-spec-source.xsl	20 Aug 2009 07:43:17 -0000	1.201
@@ -8,6 +8,8 @@
   exclude-result-prefixes="h s str exsl"
   >
   <xsl:output method="xml"/>
+  <xsl:param name="aria" select="0"/>
+  <xsl:param name="rnc-html">../html.rnc.spec.html</xsl:param>
   <xsl:variable name="assertions">
     <!-- * FIXME: really should be doing this with keys... -->
     <xsl:for-each
@@ -75,7 +77,7 @@
               <a href="#elements">HTML elements</a>
               section.</p>
             <xsl:for-each
-              select="document('../html.rnc.spec.html')//*[@class='pattern']
+              select="document($rnc-html)//*[@class='pattern']
               [starts-with(@id,'common.elem.')]">
               <xsl:sort select="@id"/>
               <xsl:variable name="type">
@@ -159,7 +161,7 @@
                 </dt>
                 <dd>
                   <xsl:for-each
-                    select="document('../html.rnc.spec.html')//h:*[@id='common.attrs']/node()">
+                    select="document($rnc-html)//h:*[@id='common.attrs']/node()">
                     <xsl:choose>
                       <xsl:when test=".='common.attrs.other'">
                         <xsl:for-each
@@ -186,7 +188,7 @@
               <xsl:text>&#10;        </xsl:text>
             </div>
             <xsl:text>&#10;      </xsl:text>
-            <xsl:for-each select="document('../html.rnc.spec.html')//h:*
+            <xsl:for-each select="document($rnc-html)//h:*
               [@id='common.attrs']/h:a[not(.='common.attrs.other')][not(@class='rnc-symbol')]">
               <xsl:variable name="ref" select="substring-after(@href,'#')"/>
               <xsl:variable name="type">
@@ -227,7 +229,7 @@
                           <xsl:value-of select="."/>
                       </a></span>
                       <xsl:text> = </xsl:text>
-                      <xsl:for-each select="document('../html.rnc.spec.html')//*[@id=$ref]/node()">
+                      <xsl:for-each select="document($rnc-html)//*[@id=$ref]/node()">
                         <xsl:choose>
                           <xsl:when test="@href='#common.attrs.xmlbase'">
                             <xsl:copy>
@@ -261,7 +263,7 @@
                 <div class="no-number no-toc">
                   <xsl:text>&#10;        </xsl:text>
                   <dl class="attr-defs">
-                    <xsl:for-each select="document('../html.rnc.spec.html')//h:*[@id=$ref]/h:a[not(@class='rnc-symbol')]">
+                    <xsl:for-each select="document($rnc-html)//h:*[@id=$ref]/h:a[not(@class='rnc-symbol')]">
                       <xsl:call-template name="make.attribute.definition"/>
                     </xsl:for-each>
                     <xsl:text>&#10;        </xsl:text>
@@ -269,7 +271,7 @@
                 </div>
               </section>
             </xsl:for-each>
-            <xsl:for-each select="document('../html.rnc.spec.html')//h:*
+            <xsl:for-each select="document($rnc-html)//h:*
               [@id='common.attrs.other']/h:a">
               <xsl:variable name="ref" select="substring-after(@href,'#')"/>
               <xsl:variable name="type">
@@ -294,9 +296,9 @@
                     <xsl:when test="$ref='common.attrs.interact'">
                       <xsl:text>Interaction</xsl:text>
                     </xsl:when>
-                    <!-- * <xsl:when test="$ref='aria.global'"> -->
-                      <!-- * <xsl:text>Global ARIA</xsl:text> -->
-                    <!-- * </xsl:when> -->
+                    <xsl:when test="$ref='aria.global'">
+                      <xsl:text>Global ARIA</xsl:text>
+                    </xsl:when>
                     <xsl:otherwise>
                       <xsl:value-of select="$type-tc"/>
                     </xsl:otherwise>
@@ -314,7 +316,7 @@
                           <xsl:value-of select="."/>
                       </a></span>
                       <xsl:text> = </xsl:text>
-                      <xsl:for-each select="document('../html.rnc.spec.html')//*[@id=$ref]/node()">
+                      <xsl:for-each select="document($rnc-html)//*[@id=$ref]/node()">
                         <xsl:copy-of select="."/>
                       </xsl:for-each>
                       <xsl:text>&#10;            </xsl:text>
@@ -328,7 +330,7 @@
                   <div class="no-number no-toc">
                     <xsl:text>&#10;        </xsl:text>
                     <dl class="attr-defs">
-                      <xsl:for-each select="document('../html.rnc.spec.html')//h:*[@id=$ref]/h:a">
+                      <xsl:for-each select="document($rnc-html)//h:*[@id=$ref]/h:a">
                         <xsl:call-template name="make.attribute.definition"/>
                       </xsl:for-each>
                       <xsl:text>&#10;        </xsl:text>
@@ -351,10 +353,10 @@
             <dl class="attr-defs">
               <xsl:text>&#10;        </xsl:text>
               <xsl:for-each select="
-                (document('../html.rnc.spec.html')//h:span[@class='pattern']
+                (document($rnc-html)//h:span[@class='pattern']
                 [starts-with(@id,'common-form.attrs.')])
                 |
-                (document('../html.rnc.spec.html')//h:span[@class='pattern']
+                (document($rnc-html)//h:span[@class='pattern']
                 [starts-with(@id,'shared-form.attrs') or starts-with(@id,'input.attrs')]
                 [not(@id='shared-form.attrs.formmethod.data')]
                 [not(@id='shared-form.attrs.formenctype.data')])
@@ -388,7 +390,7 @@
                           or @href='#shared-form.attrs.formenctype.data'
                           ">
                           <xsl:variable name="ref" select="substring-after(@href,'#')"/>
-                          <xsl:for-each select="document('../html.rnc.spec.html')//*[@id=$ref]/node()">
+                          <xsl:for-each select="document($rnc-html)//*[@id=$ref]/node()">
                             <xsl:call-template name="process.datatype.reference"/>
                           </xsl:for-each>
                         </xsl:when>
@@ -433,7 +435,7 @@
             <xsl:copy-of
               select="document('../src/datatypes.html')//h:section[ancestor::h:section]"/>
             <xsl:for-each
-              select="document('../html.rnc.spec.html')//*[@class='pattern']
+              select="document($rnc-html)//*[@class='pattern']
               [starts-with(@id,'common.data.')
               or starts-with(@id,'form.data.')]">
               <xsl:variable name="pattern">
@@ -520,151 +522,192 @@
               <xsl:text>&#10;    </xsl:text>
             </section>
           <xsl:text>&#10;    </xsl:text>
-          <!-- * <section id="aria"> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * <h2>ARIA</h2> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-          <!-- * <section id="common-aria"> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * <h2>Common ARIA attribute sets</h2> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * <div id="common.attrs.aria-mdl"> -->
-              <!-- * <xsl:text>&#10;        </xsl:text> -->
-              <!-- * <dl class="content-models"> -->
-                <!-- * <xsl:text>&#10;            </xsl:text> -->
-                <!-- * <dt class="content-model"> -->
-                  <!-- * <span class="common-pattern-name"> -->
-                    <!-- * <dfn -->
-                      <!-- * id="common.attrs.aria">common.attrs.aria</dfn> -->
-                  <!-- * </span> -->
-                  <!-- * <xsl:text> = </xsl:text> -->
-                  <!-- * <a class="hash" href="#common.attrs.aria">#</a> -->
-                <!-- * </dt> -->
-                <!-- * <dd> -->
-                  <!-- * <xsl:for-each -->
-                    <!-- * select="document('../html.rnc.spec.html')//h:*[@id='common.attrs.aria']/node()"> -->
-                    <!-- * <xsl:copy-of select="."/> -->
-                  <!-- * </xsl:for-each> -->
-                  <!-- * <xsl:text>&#10;            </xsl:text> -->
-                <!-- * </dd> -->
-                <!-- * <xsl:text>&#10;          </xsl:text> -->
-              <!-- * </dl> -->
-              <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * </div> -->
-            <!-- * <xsl:for-each select="document('../html.rnc.spec.html')//h:* -->
-              <!-- * [@id='common.attrs.aria']/h:a"> -->
-              <!-- * <xsl:variable name="ref" select="substring-after(@href,'#')"/> -->
-              <!-- * <xsl:variable name="type"> -->
-                <!-- * <xsl:call-template name="substring-after-last"> -->
-                  <!-- * <xsl:with-param name="input" select="$ref"/> -->
-                  <!-- * <xsl:with-param name="substr">.</xsl:with-param> -->
-                <!-- * </xsl:call-template> -->
-              <!-- * </xsl:variable> -->
-              <!-- * <xsl:variable name="type-tc"> -->
-                <!-- * <xsl:value-of select="translate( -->
-                  <!-- * substring($type,1,1), -->
-                  <!-- * 'abcdefghijklmnopqrstuvwxyz', -->
-                  <!-- * 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' -->
-                  <!-- * )"/><xsl:value-of -->
-                  <!-- * select="substring($type,2)"/> -->
-              <!-- * </xsl:variable> -->
-              <!-- * <section id="{$type}-attrs" class="no-toc"> -->
-                <!-- * <xsl:text>&#10;        </xsl:text> -->
-                <!-- * <h2 class="common-subhead"> -->
-                  <!-- * <xsl:value-of select="$type-tc"/> -->
-                <!-- * </h2> -->
-                <!-- * <xsl:text>&#10;        </xsl:text> -->
-                <!-- * <div id="{$ref}-mdl"> -->
-                  <!-- * <xsl:text>&#10;          </xsl:text> -->
-                  <!-- * <dl class="content-models"> -->
-                    <!-- * <xsl:text>&#10;            </xsl:text> -->
-                    <!-- * <dt class="content-model"> -->
-                      <!-- * <span class="common-pattern-name"><a -->
-                          <!-- * href="#{$ref}" -->
-                          <!-- * id="{$ref}"> -->
-                          <!-- * <xsl:value-of select="."/> -->
-                      <!-- * </a></span> -->
-                      <!-- * <xsl:text> = </xsl:text> -->
-                    <!-- * </dt> -->
-                    <!-- * <dd> -->
-                      <!-- * <xsl:for-each select="document('../html.rnc.spec.html')//*[@id=$ref]/node()"> -->
-                        <!-- * <xsl:copy-of select="."/> -->
-                      <!-- * </xsl:for-each> -->
-                      <!-- * <xsl:text>&#10;            </xsl:text> -->
-                    <!-- * </dd> -->
-                    <!-- * <xsl:text>&#10;          </xsl:text> -->
-                  <!-- * </dl> -->
-                  <!-- * <xsl:text>&#10;        </xsl:text> -->
-                <!-- * </div> -->
-                <!-- * <xsl:text>&#10;        </xsl:text> -->
-              <!-- * </section> -->
-            <!-- * </xsl:for-each> -->
-            <!-- * <xsl:text>&#10;      </xsl:text> -->
-          <!-- * </section> -->
-          <!-- * <xsl:text>&#10;    </xsl:text> -->
-          <!-- * <section id="implicit-aria"> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * <h2>ARIA attribute sets for implicit semantics</h2> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * <div id="common.attrs.aria.implicit-mdl"> -->
-              <!-- * <xsl:text>&#10;        </xsl:text> -->
-              <!-- * <xsl:for-each -->
-                <!-- * select="document('../html.rnc.spec.html')//h:*[@class='pattern'][starts-with(@id,'common.attrs.aria.implicit')]"> -->
-                <!-- * <dl class="content-models"> -->
-                  <!-- * <xsl:text>&#10;            </xsl:text> -->
-                  <!-- * <dt class="content-model"> -->
-                    <!-- * <span class="common-pattern-name"> -->
-                      <!-- * <dfn -->
-                        <!-- * id="{@id}"> -->
-                        <!-- * <xsl:value-of select="@id"/> -->
-                      <!-- * </dfn> -->
-                    <!-- * </span> -->
-                    <!-- * <xsl:text> = </xsl:text> -->
-                    <!-- * <a class="hash" href="#{@id}">#</a> -->
-                  <!-- * </dt> -->
-                  <!-- * <dd> -->
-                    <!-- * <xsl:for-each -->
-                      <!-- * select="node()"> -->
-                      <!-- * <xsl:copy-of select="."/> -->
-                    <!-- * </xsl:for-each> -->
-                    <!-- * <xsl:text>&#10;            </xsl:text> -->
-                  <!-- * </dd> -->
-                  <!-- * <xsl:text>&#10;          </xsl:text> -->
-                <!-- * </dl> -->
-                <!-- * <xsl:text>&#10;        </xsl:text> -->
-              <!-- * </xsl:for-each> -->
-            <!-- * </div> -->
-            <!-- * <xsl:text>&#10;      </xsl:text> -->
-          <!-- * </section> -->
-          <!-- * <section id="aria-attrs-all"> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * <h2>ARIA attribute models</h2> -->
-            <!-- * <p>The semantics of the following attributes are -->
-              <!-- * normatively defined in <a -->
-                <!-- * href="#refsARIA">[ARIA]</a>.</p> -->
-            <!-- * <xsl:text>&#10;        </xsl:text> -->
-            <!-- * <div class="no-number no-toc"> -->
-              <!-- * <xsl:text>&#10;        </xsl:text> -->
-              <!-- * <div class="attr-defs"> -->
-                <!-- * <xsl:for-each select="document('../html.rnc.spec.html')//h:*[@class='define'] -->
-                  <!-- * [starts-with(@id,'aria-')]/*[@class='patternname']/h:a -->
-                  <!-- * "> -->
-                  <!-- * <xsl:sort select="@href"/> -->
-                  <!-- * <xsl:call-template name="make.attribute.definition"> -->
-                    <!-- * <xsl:with-param name="href"> -->
-                      <!-- * <xsl:value-of -->
-                        <!-- * select="concat('#',substring-after(@href,'#the-'))"/> -->
-                    <!-- * </xsl:with-param> -->
-                    <!-- * <xsl:with-param name="wrapper">p</xsl:with-param> -->
-                  <!-- * </xsl:call-template> -->
-                <!-- * </xsl:for-each> -->
-                <!-- * <xsl:text>&#10;        </xsl:text> -->
-              <!-- * </div> -->
-              <!-- * <xsl:text>&#10;      </xsl:text> -->
-            <!-- * </div> -->
-            <!-- * <xsl:text>&#10;    </xsl:text> -->
-          <!-- * </section> -->
-          <!-- * </section> -->
+          <xsl:if test="not($aria=0)">
+            <section id="aria">
+              <xsl:text>&#10;        </xsl:text>
+              <h2>ARIA</h2>
+              <xsl:text>&#10;        </xsl:text>
+              <p>This section provides information about 
+                <a href="http://www.w3.org/WAI/PF/aria/">ARIA</a>
+                attributes.</p>
+              <xsl:text>&#10;        </xsl:text>
+              <section id="common-aria">
+                <xsl:text>&#10;        </xsl:text>
+                <h2>Common ARIA attribute sets</h2>
+                <xsl:text>&#10;        </xsl:text>
+                <div id="common.attrs.aria-mdl">
+                  <xsl:text>&#10;        </xsl:text>
+                  <dl class="content-models">
+                    <xsl:text>&#10;            </xsl:text>
+                    <dt class="content-model">
+                      <span class="common-pattern-name">
+                        <dfn
+                          id="common.attrs.aria">common.attrs.aria</dfn>
+                      </span>
+                      <xsl:text> = </xsl:text>
+                      <a class="hash" href="#common.attrs.aria">#</a>
+                    </dt>
+                    <dd>
+                      <xsl:for-each
+                        select="document($rnc-html)//h:*[@id='common.attrs.aria']/node()">
+                        <xsl:copy-of select="."/>
+                      </xsl:for-each>
+                      <xsl:text>&#10;            </xsl:text>
+                    </dd>
+                    <xsl:text>&#10;          </xsl:text>
+                  </dl>
+                  <xsl:text>&#10;        </xsl:text>
+                </div>
+                <xsl:for-each select="document($rnc-html)//h:*
+                  [@id='common.attrs.aria']/h:a[not(@class='rnc-symbol')]">
+                  <xsl:variable name="ref" select="substring-after(@href,'#')"/>
+                  <xsl:variable name="type">
+                    <xsl:call-template name="substring-after-last">
+                      <xsl:with-param name="input" select="$ref"/>
+                      <xsl:with-param name="substr">.</xsl:with-param>
+                    </xsl:call-template>
+                  </xsl:variable>
+                  <xsl:variable name="type-tc">
+                    <xsl:value-of select="translate(
+                      substring($type,1,1),
+                      'abcdefghijklmnopqrstuvwxyz',
+                      'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+                      )"/><xsl:value-of
+                      select="substring($type,2)"/>
+                  </xsl:variable>
+                  <section id="{$type}-attrs" class="no-toc">
+                    <xsl:text>&#10;        </xsl:text>
+                    <h2 class="common-subhead">
+                      <xsl:value-of select="$type-tc"/>
+                    </h2>
+                    <xsl:text>&#10;        </xsl:text>
+                    <div id="{$ref}-mdl">
+                      <xsl:text>&#10;          </xsl:text>
+                      <dl class="content-models">
+                        <xsl:text>&#10;            </xsl:text>
+                        <dt class="content-model">
+                          <span class="common-pattern-name"><a
+                              href="#{$ref}"
+                              id="{$ref}">
+                              <xsl:value-of select="."/>
+                          </a></span>
+                          <xsl:text> = </xsl:text>
+                        </dt>
+                        <dd>
+                          <xsl:for-each select="document($rnc-html)//*[@id=$ref]/node()">
+                            <xsl:copy-of select="."/>
+                          </xsl:for-each>
+                          <xsl:text>&#10;            </xsl:text>
+                        </dd>
+                        <xsl:text>&#10;          </xsl:text>
+                      </dl>
+                      <xsl:text>&#10;        </xsl:text>
+                    </div>
+                    <xsl:text>&#10;        </xsl:text>
+                  </section>
+                </xsl:for-each>
+                <xsl:text>&#10;      </xsl:text>
+              </section>
+              <xsl:text>&#10;    </xsl:text>
+              <section id="implicit-aria">
+                <xsl:text>&#10;        </xsl:text>
+                <h2>ARIA attribute sets for implicit semantics</h2>
+                <xsl:text>&#10;        </xsl:text>
+                <div id="common.attrs.aria.implicit-mdl">
+                  <xsl:text>&#10;        </xsl:text>
+                  <xsl:for-each
+                    select="document($rnc-html)//h:*[@class='pattern'][starts-with(@id,'common.attrs.aria.implicit')]">
+                    <dl class="content-models">
+                      <xsl:text>&#10;            </xsl:text>
+                      <dt class="content-model">
+                        <span class="common-pattern-name">
+                          <dfn
+                            id="{@id}">
+                            <xsl:value-of select="@id"/>
+                          </dfn>
+                        </span>
+                        <xsl:text> = </xsl:text>
+                        <a class="hash" href="#{@id}">#</a>
+                      </dt>
+                      <dd>
+                        <xsl:for-each
+                          select="node()">
+                          <xsl:copy-of select="."/>
+                        </xsl:for-each>
+                        <xsl:text>&#10;            </xsl:text>
+                      </dd>
+                      <xsl:text>&#10;          </xsl:text>
+                    </dl>
+                    <xsl:text>&#10;        </xsl:text>
+                  </xsl:for-each>
+                </div>
+                <xsl:text>&#10;      </xsl:text>
+              </section>
+              <section id="landmark-aria">
+                <xsl:text>&#10;        </xsl:text>
+                <h2>ARIA attribute sets for landmark roles</h2>
+                <xsl:text>&#10;        </xsl:text>
+                <div id="common.attrs.aria.landmark-mdl">
+                  <xsl:text>&#10;        </xsl:text>
+                  <xsl:for-each
+                    select="document($rnc-html)//h:*[@class='pattern'][starts-with(@id,'common.attrs.aria.landmark')]">
+                    <dl class="content-models">
+                      <xsl:text>&#10;            </xsl:text>
+                      <dt class="content-model">
+                        <span class="common-pattern-name">
+                          <dfn
+                            id="{@id}">
+                            <xsl:value-of select="@id"/>
+                          </dfn>
+                        </span>
+                        <xsl:text> = </xsl:text>
+                        <a class="hash" href="#{@id}">#</a>
+                      </dt>
+                      <dd>
+                        <xsl:for-each
+                          select="node()">
+                          <xsl:copy-of select="."/>
+                        </xsl:for-each>
+                        <xsl:text>&#10;            </xsl:text>
+                      </dd>
+                      <xsl:text>&#10;          </xsl:text>
+                    </dl>
+                    <xsl:text>&#10;        </xsl:text>
+                  </xsl:for-each>
+                </div>
+                <xsl:text>&#10;      </xsl:text>
+              </section>
+              <section id="aria-attrs-all">
+                <xsl:text>&#10;        </xsl:text>
+                <h2>ARIA attribute models</h2>
+                <p>The semantics of the following attributes are
+                  normatively defined in the
+                  <a href="http://www.w3.org/WAI/PF/aria/">ARIA specification</a>.</p>
+                <xsl:text>&#10;        </xsl:text>
+                <div class="no-number no-toc">
+                  <xsl:text>&#10;        </xsl:text>
+                  <div class="attr-defs">
+                    <xsl:for-each select="document($rnc-html)//h:*[@class='define']
+                      [starts-with(@id,'aria-')]/*[@class='patternname']/h:a
+                      ">
+                      <xsl:sort select="@href"/>
+                      <xsl:call-template name="make.attribute.definition">
+                        <xsl:with-param name="href">
+                          <xsl:value-of
+                            select="concat('#',substring-after(@href,'#the-'))"/>
+                        </xsl:with-param>
+                        <xsl:with-param name="wrapper">p</xsl:with-param>
+                      </xsl:call-template>
+                    </xsl:for-each>
+                    <xsl:text>&#10;        </xsl:text>
+                  </div>
+                  <xsl:text>&#10;      </xsl:text>
+                </div>
+                <xsl:text>&#10;    </xsl:text>
+              </section>
+            </section>
+          <xsl:text>&#10;    </xsl:text>
+          </xsl:if>
         </div>
         <!-- * <xsl:text>&#10;      </xsl:text> -->
         <div id="appendices">
@@ -797,7 +840,7 @@
             <div>
               <xsl:text>&#10;      </xsl:text>
               <xsl:for-each
-                select="document('../html.rnc.spec.html')
+                select="document($rnc-html)
                 //h:span[@id='button']
                 ">
                 <xsl:call-template name="make.special.context"/>
@@ -824,7 +867,7 @@
             <div>
               <xsl:text>&#10;      </xsl:text>
               <xsl:for-each
-                select="document('../html.rnc.spec.html')
+                select="document($rnc-html)
                 //h:span[@id='command']
                 ">
                 <xsl:call-template name="make.special.context"/>
@@ -849,7 +892,7 @@
             <div>
               <xsl:text>&#10;      </xsl:text>
               <xsl:for-each
-                select="document('../html.rnc.spec.html')
+                select="document($rnc-html)
                 //h:span[@id='input']
                 ">
                 <xsl:call-template name="make.special.context"/>
@@ -891,6 +934,9 @@
           </section>
         </xsl:when>
       </xsl:choose>
+      <xsl:message>
+        <xsl:value-of select="$short-name"/>
+      </xsl:message>
       <section id="{$name}" class="no-number">
         <xsl:text>&#10;      </xsl:text>
         <h2 class="element-head">
@@ -1206,7 +1252,7 @@
           <xsl:when test="$name='li'">3</xsl:when>
           <xsl:otherwise>
             <xsl:value-of
-              select="count(document('../html.rnc.spec.html')//*[@id=$name
+              select="count(document($rnc-html)//*[@id=$name
               or (starts-with(@id,$name-dot) and
               child::h:span[@class='type']='element ')]/*[@class =
               'model'])"/>
@@ -1231,7 +1277,7 @@
         <xsl:choose>
           <!-- * <xsl:when test="$name='meta'"> -->
             <!-- * <xsl:for-each -->
-              <!-- * select="document('../html.rnc.spec.html')//*[@id=$name -->
+              <!-- * select="document($rnc-html)//*[@id=$name -->
               <!-- * or (starts-with(@id,$name-dot) and child::h:span[@class='type']='element ')]/*[@class = 'model']"> -->
               <!-- * <xsl:variable name="pname" select="../@id"/> -->
               <!-- * <xsl:call-template name="make.content.model"> -->
@@ -1241,7 +1287,7 @@
               <!-- * </xsl:call-template> -->
             <!-- * </xsl:for-each> -->
             <!-- * <xsl:for-each -->
-              <!-- * select="document('../html.rnc.spec.html')//*[@id='meta.elem.encoding']"> -->
+              <!-- * select="document($rnc-html)//*[@id='meta.elem.encoding']"> -->
               <!-- * <xsl:call-template name="make.content.model"> -->
                 <!-- * <xsl:with-param name="count" select="$count"/> -->
                 <!-- * <xsl:with-param name="name" select="$name"/> -->
@@ -1251,7 +1297,7 @@
           <!-- * </xsl:when> -->
           <xsl:when test="$name='li'">
             <xsl:for-each
-              select="document('../html.rnc.spec.html')//*[
+              select="document($rnc-html)//*[
               @id='li'
               or @id='mli'
               or @id='oli'
@@ -1266,7 +1312,7 @@
           </xsl:when>
           <xsl:otherwise>
             <xsl:for-each
-              select="document('../html.rnc.spec.html')//*[@id=$name
+              select="document($rnc-html)//*[@id=$name
               or (starts-with(@id,$name-dot) and child::h:span[@class='type']='element ')]/*[@class = 'model']">
               <xsl:variable name="pname" select="../@id"/>
               <xsl:call-template name="make.content.model">
@@ -1389,7 +1435,7 @@
           <xsl:choose>
             <xsl:when test="$name='li'">
               <xsl:for-each
-                select="document('../html.rnc.spec.html')//h:span[@class
+                select="document($rnc-html)//h:span[@class
                 = 'pattern'][child::h:a[@href = '#li'
                 or @href = '#mli'
                 or @href = '#oli'
@@ -1405,7 +1451,7 @@
                   or $name='command'
                   ">
                   <xsl:for-each
-                    select="document('../html.rnc.spec.html')//h:span[@class
+                    select="document($rnc-html)//h:span[@class
                     = 'pattern'][child::h:a[@href = concat('#',$name)
                     or starts-with(@href,concat('#',$name,'.elem.'))
                     ]]">
@@ -1414,7 +1460,7 @@
                 </xsl:when>
                 <xsl:otherwise>
                   <xsl:for-each
-                    select="document('../html.rnc.spec.html')//h:span[@class
+                    select="document($rnc-html)//h:span[@class
                     = 'pattern'][child::h:a[@href = concat('#',$full-name)
                     or starts-with(@href,concat('#',$full-name,'.elem.'))
                     ]]">
@@ -1630,13 +1676,13 @@
       <h2 class="element-subhead">Attribute model</h2>
       <xsl:text>&#10;        </xsl:text>
       <xsl:choose>
-        <xsl:when test="document('../html.rnc.spec.html')//*[(starts-with(@id,$name-dot)
+        <xsl:when test="document($rnc-html)//*[(starts-with(@id,$name-dot)
           and substring(@id,string-length(@id)-4)='attrs')]">
           <xsl:choose>
             <xsl:when test="@name='embed'">
               <div class="attr-content-models">
                 <xsl:for-each
-                  select="document('../html.rnc.spec.html')//*[@class='pattern']
+                  select="document($rnc-html)//*[@class='pattern']
                   [@id='embed.attrs' or @id='embed.attrs.other']">
                   <div class="attr-content-model">
                     <a class="attribute-pattern-name"
@@ -1661,7 +1707,7 @@
             <xsl:when test="@name='colgroup'">
               <div class="attr-content-models">
                 <xsl:for-each
-                  select="document('../html.rnc.spec.html')//*[@class='pattern'][starts-with(@id,'colgroup.attrs')]">
+                  select="document($rnc-html)//*[@class='pattern'][starts-with(@id,'colgroup.attrs')]">
                   <div class="attr-content-model">
                     <xsl:choose>
                       <xsl:when test="@id='colgroup.attrs.span'">
@@ -1707,13 +1753,13 @@
                   <span
                     class="pattern" id="area.attrs">
                     <xsl:for-each
-                      select="document('../html.rnc.spec.html')//*[@id='area.attrs']/node()">
+                      select="document($rnc-html)//*[@id='area.attrs']/node()">
                       <xsl:choose>
                         <xsl:when
                           test="@href='#area.attrs.shape'">
                           <br/>
                           <xsl:copy-of
-                            select="document('../html.rnc.spec.html')//*[@id='area.attrs.shape']/node()"/>
+                            select="document($rnc-html)//*[@id='area.attrs.shape']/node()"/>
                         </xsl:when>
                         <xsl:otherwise>
                           <xsl:copy-of
@@ -1728,7 +1774,7 @@
             <xsl:when test="@name='li'">
               <dl class="attr-content-models">
                 <xsl:for-each
-                  select="document('../html.rnc.spec.html')//*[@id='li.attrs'
+                  select="document($rnc-html)//*[@id='li.attrs'
                   or @id='oli.attrs' or @id='mli.attrs']">
                   <dt class="attr-content-model">
                     <a class="attribute-pattern-name"
@@ -1747,7 +1793,7 @@
             <xsl:otherwise>
               <div>
                 <xsl:attribute name="class">attr-content-models</xsl:attribute>
-                <xsl:for-each select="document('../html.rnc.spec.html')//*[starts-with(@id,$name-dot)
+                <xsl:for-each select="document($rnc-html)//*[starts-with(@id,$name-dot)
                   and substring(@id,string-length(@id)-4)='attrs']">
                   <xsl:text>&#10;          </xsl:text>
                   <p>
@@ -1767,12 +1813,12 @@
                         <xsl:variable name="ref" select="@id"/>
                         <span class="pattern" id="{@id}">
                           <xsl:choose>
-                            <xsl:when test="document('../html.rnc.spec.html')//h:*[@id = $ref]//h:a[@href='#common-form.attrs']">
-                              <xsl:for-each select="document('../html.rnc.spec.html')//h:*[@id = $ref]/node()">
+                            <xsl:when test="document($rnc-html)//h:*[@id = $ref]//h:a[@href='#common-form.attrs']">
+                              <xsl:for-each select="document($rnc-html)//h:*[@id = $ref]/node()">
                                 <xsl:choose>
                                   <xsl:when test=". = 'common-form.attrs'">
                                     <xsl:for-each
-                                      select="document('../html.rnc.spec.html')//h:*[@id = 'common-form.attrs']/node()">
+                                      select="document($rnc-html)//h:*[@id = 'common-form.attrs']/node()">
                                       <xsl:copy-of select="."/>
                                     </xsl:for-each>
                                   </xsl:when>
@@ -1791,13 +1837,13 @@
                       <xsl:otherwise>
                         <xsl:variable name="ref" select="@id"/>
                         <xsl:choose>
-                          <xsl:when test="document('../html.rnc.spec.html')//h:*[@id = $ref]//h:a[@href='#common-form.attrs']">
+                          <xsl:when test="document($rnc-html)//h:*[@id = $ref]//h:a[@href='#common-form.attrs']">
                             <span class="pattern" id="{@id}">
-                              <xsl:for-each select="document('../html.rnc.spec.html')//h:*[@id = $ref]/node()">
+                              <xsl:for-each select="document($rnc-html)//h:*[@id = $ref]/node()">
                                 <xsl:choose>
                                   <xsl:when test=". = 'common-form.attrs'">
                                     <xsl:for-each
-                                      select="document('../html.rnc.spec.html')//h:*[@id = 'common-form.attrs']/node()">
+                                      select="document($rnc-html)//h:*[@id = 'common-form.attrs']/node()">
                                       <xsl:copy-of select="."/>
                                     </xsl:for-each>
                                   </xsl:when>
@@ -1820,10 +1866,10 @@
             </xsl:otherwise>
           </xsl:choose>
         </xsl:when>
-        <xsl:when test="document('../html.rnc.spec.html')//*[@id = 'script.attrs.embedded'
+        <xsl:when test="document($rnc-html)//*[@id = 'script.attrs.embedded'
           or @id = 'script.attrs.imported']">
           <dl class="attr-content-models">
-            <xsl:for-each select="document('../html.rnc.spec.html')//*[@id = 'script.attrs.embedded'
+            <xsl:for-each select="document($rnc-html)//*[@id = 'script.attrs.embedded'
               or @id = 'script.attrs.imported']">
               <xsl:text>&#10;          </xsl:text>
               <dt class="attr-content-model">
@@ -1848,7 +1894,7 @@
   <xsl:template name="make.attribute.definitions.section">
     <xsl:param name="name"/>
     <xsl:param name="name-dot" select="concat($name, '.')"/>
-    <xsl:if test="document('../html.rnc.spec.html')//*[(starts-with(@id,$name-dot)
+    <xsl:if test="document($rnc-html)//*[(starts-with(@id,$name-dot)
       and substring(@id,string-length(@id)-4)='attrs')]//h:a[not(starts-with(.,'common'))
       and not(starts-with(.,'media.'))
       and not(starts-with(@href,'#common-form.attrs.'))
@@ -1869,7 +1915,7 @@
         <dl class="attr-defs">
           <xsl:choose>
             <xsl:when test="@name='video'">
-              <xsl:for-each select="document('../html.rnc.spec.html')//h:a[starts-with(@href,'#video.attrs.')]
+              <xsl:for-each select="document($rnc-html)//h:a[starts-with(@href,'#video.attrs.')]
                 ">
                 <xsl:call-template name="make.attribute.definition">
                   <xsl:with-param name="name" select="$name"/>
@@ -1877,7 +1923,7 @@
               </xsl:for-each>
             </xsl:when>
             <xsl:when test="@name='audio'">
-              <xsl:for-each select="document('../html.rnc.spec.html')//h:a[starts-with(@href,'#audio.attrs.')]
+              <xsl:for-each select="document($rnc-html)//h:a[starts-with(@href,'#audio.attrs.')]
                 ">
                 <xsl:call-template name="make.attribute.definition">
                   <xsl:with-param name="name" select="$name"/>
@@ -1885,7 +1931,7 @@
               </xsl:for-each>
             </xsl:when>
             <xsl:when test="@name='embed'">
-              <xsl:for-each select="document('../html.rnc.spec.html')//h:a[starts-with(@href,'#embed.attrs.')]
+              <xsl:for-each select="document($rnc-html)//h:a[starts-with(@href,'#embed.attrs.')]
                 [not(@href='#embed.attrs.other')]
                 ">
                 <xsl:call-template name="make.attribute.definition">
@@ -1895,7 +1941,7 @@
             </xsl:when>
             <xsl:when test="@name='area'">
               <xsl:for-each
-                select="document('../html.rnc.spec.html')//h:a[starts-with(@href,'#area.attrs.')]
+                select="document($rnc-html)//h:a[starts-with(@href,'#area.attrs.')]
                 [not(@href='#area.attrs.shape')]
                 [not(@href='#area.attrs.shape')]
                 [not(starts-with(@href,'#area.attrs.shape.'))]
@@ -1907,7 +1953,7 @@
                 </xsl:call-template>
               </xsl:for-each>
               <xsl:for-each
-                select="document('../html.rnc.spec.html')//h:a
+                select="document($rnc-html)//h:a
                 [starts-with(@href,'#area.attrs.shape.')]
                 ">
                 <xsl:call-template
@@ -1917,14 +1963,14 @@
               </xsl:for-each>
             </xsl:when>
             <xsl:when test="@name='colgroup'">
-              <xsl:for-each select="document('../html.rnc.spec.html')//*[@id = 'colgroup.inner']/h:a[contains(@href,'attrs')]">
+              <xsl:for-each select="document($rnc-html)//*[@id = 'colgroup.inner']/h:a[contains(@href,'attrs')]">
                 <xsl:call-template name="make.attribute.definition">
                   <xsl:with-param name="name" select="$name"/>
                 </xsl:call-template>
               </xsl:for-each>
             </xsl:when>
             <xsl:when test="@name='li'">
-              <xsl:for-each select="document('../html.rnc.spec.html')//*[@id = 'li.attrs'
+              <xsl:for-each select="document($rnc-html)//*[@id = 'li.attrs'
                 or @id = 'oli.attrs' or @id = 'mli.attrs']/h:a[not(contains(.,'common.'))]">
                 <xsl:call-template name="make.attribute.definition">
                   <xsl:with-param name="name" select="$name"/>
@@ -1932,7 +1978,7 @@
               </xsl:for-each>
             </xsl:when>
             <xsl:when test="@name='script'">
-              <xsl:for-each select="document('../html.rnc.spec.html')//*[@id = 'script.attrs.embedded'
+              <xsl:for-each select="document($rnc-html)//*[@id = 'script.attrs.embedded'
                 or @id = 'script.attrs.imported']/h:a">
                 <xsl:call-template name="make.attribute.definition">
                   <xsl:with-param name="name" select="$name"/>
@@ -1940,7 +1986,7 @@
               </xsl:for-each>
             </xsl:when>
             <xsl:otherwise>
-              <xsl:for-each select="document('../html.rnc.spec.html')//*[starts-with(@id,$name-dot)
+              <xsl:for-each select="document($rnc-html)//*[starts-with(@id,$name-dot)
                 and substring(@id,string-length(@id)-4)='attrs']//h:a[not(contains(.,'common'))
                 and not(@href = '#media.attrs')
                 and not(starts-with(@href,'#common-form.attrs.'))
@@ -2089,7 +2135,7 @@
             <xsl:choose>
               <xsl:when test="$ref='form.attrs.method' or $ref='form.attrs.enctype'">
                 <xsl:variable name="datatype" select="concat($ref,'.data')"/>
-                <xsl:for-each select="document('../html.rnc.spec.html')//*[@id=$datatype]/node()">
+                <xsl:for-each select="document($rnc-html)//*[@id=$datatype]/node()">
                   <xsl:call-template name="process.datatype.reference"/>
                 </xsl:for-each>
               </xsl:when>

Index: specgen.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/specgen.xsl,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- specgen.xsl	16 Aug 2009 10:53:46 -0000	1.39
+++ specgen.xsl	20 Aug 2009 07:43:17 -0000	1.40
@@ -13,6 +13,7 @@
   <xsl:include href="chunker.xsl"/>
   <xsl:param name="chunk" select="0"/>
   <xsl:param name="TOC-file"/>
+  <xsl:param name="aria" select="0"/>
   <xsl:key name="id" match="*" use="@id"/>
   <xsl:key name="chunk" match="*[@id='elements']/h:section
     |//h:section[count(ancestor::h:section)=0]
@@ -546,6 +547,9 @@
           <xsl:with-param name="content" select="$content"/>
           <xsl:with-param name="title" select="concat('HTML5: ',normalize-space(h:h2))"/>
           <xsl:with-param name="filename">
+            <xsl:if test="not($aria=0)">
+              <xsl:text>aria/</xsl:text>
+            </xsl:if>
             <xsl:value-of select="@id"/>
             <xsl:text>.html</xsl:text>
           </xsl:with-param>
Received on Thursday, 20 August 2009 07:43:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 20 August 2009 07:43:38 GMT