W3C home > Mailing lists > Public > public-html-commits@w3.org > July 2010

html5/markup/tools generate-spec-source.xsl,1.277,1.278 specgen.xsl,1.71,1.72 toc.xsl,1.20,1.21

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 29 Jul 2010 09:39:29 +0000
To: public-html-commits@w3.org
Message-Id: <E1OePaL-0008Uq-AM@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv32054/tools

Modified Files:
	generate-spec-source.xsl specgen.xsl toc.xsl 
Log Message:
make the general pages for the <input>, <meta>, <command>, and <button> elements more useful


Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -d -r1.277 -r1.278
--- generate-spec-source.xsl	28 Jul 2010 16:15:09 -0000	1.277
+++ generate-spec-source.xsl	29 Jul 2010 09:39:26 -0000	1.278
@@ -103,9 +103,9 @@
           <section id="common-models">
             <xsl:text>&#10;        </xsl:text>
             <h2>Common content models</h2>
-            <p>This section defines content models that are
+            <p>This section describes content models that are
               referenced by a number of different element
-              definitions in the
+              descriptions in the
               <i>Content model</i>
               subsections of the per-element documentation in the
               <a href="#elements">HTML elements</a>
@@ -168,7 +168,7 @@
             <xsl:text>&#10;        </xsl:text>
             <h2>Global attributes</h2>
             <xsl:text>&#10;        </xsl:text>
-            <p>This section defines attributes that are common to
+            <p>This section describes attributes that are common to
               all elements in the
               <a href="#html-language">HTML language</a>.</p>
             <xsl:text>&#10;        </xsl:text>
@@ -362,7 +362,7 @@
             <xsl:text>&#10;        </xsl:text>
             <h2>Forms attributes</h2>
             <xsl:text>&#10;    </xsl:text>
-            <p>This section defines attributes that are common to
+            <p>This section describes attributes that are common to
               a number of forms elements.</p>
             <xsl:text>&#10;    </xsl:text>
             <dl class="attr-defs">
@@ -476,8 +476,8 @@
             <xsl:text>&#10;        </xsl:text>
             <h2>Datatypes</h2>
             <xsl:text>&#10;        </xsl:text>
-            <p>This section defines datatypes that are referenced
-              by attribute definitions in the 
+            <p>This section describes datatypes that are referenced
+              by attribute descriptions in the 
               <a href="#elements">HTML elements</a>,
               <a href="#global-attributes">Global attributes</a>,
               and
@@ -955,22 +955,18 @@
   <xsl:template name="make.elements.by.function">
     <xsl:apply-templates select="document('../src/elements-by-function.html')/node()"/>
   </xsl:template>
-
   <xsl:template match="h:section[@id='elements-by-function']/*[not(h:section)]">
     <xsl:copy-of select="."/>
   </xsl:template>
-
   <xsl:template match="h:section[@id='elements-by-function']/h:section">
     <section class="no-toc" id="{@id}">
       <xsl:text>&#10;</xsl:text>
       <xsl:apply-templates/>
     </section>
   </xsl:template>
-
   <xsl:template match="h:section[@id='elements-by-function']/h:section/*[not(h:ul)]">
     <xsl:copy-of select="."/>
   </xsl:template>
-
   <xsl:template match="h:section[@id='elements-by-function']/h:section/h:ul">
     <ul>
       <xsl:text>&#10;</xsl:text>
@@ -1071,22 +1067,32 @@
               </xsl:call-template>
             </h2>
             <xsl:text>&#10;      </xsl:text>
+            <div id="button-longdesc" class="longdesc">
+              <xsl:text>&#10;      </xsl:text>
+              <p>The
+                <a href="#button" class="element">button</a>
+                element is a multipurpose element for representing buttons.</p>
+            </div>
+            <xsl:text>&#10;      </xsl:text>
             <div>
               <xsl:text>&#10;      </xsl:text>
               <xsl:for-each
                 select="$rnc-html
                 //h:span[@id='button']
                 ">
-                <xsl:call-template name="make.special.context"/>
+                <xsl:call-template name="make.special.context">
+                  <xsl:with-param name="element-name">button</xsl:with-param>
+                </xsl:call-template>
               </xsl:for-each>
               <xsl:text>&#10;      </xsl:text>
-              <p>A <span class="element">button</span> element with
-                no <span class="attribute">type</span> attribute
-                specified represents the same thing as a <a
-                  href="#button.submit">button element with its type
-                  attribute set to "submit"</a>.</p>
-              <xsl:text>&#10;      </xsl:text>
             </div>
+            <p>A
+              <a href="#button" class="element">button</a>
+              element with no
+              <span class="attribute">type</span>
+              attribute specified represents the same thing as a
+              <a href="#button.submit">button element with its type
+                attribute set to "submit"</a>.</p>
             <xsl:text>&#10;      </xsl:text>
           </section>
         </xsl:when>
@@ -1116,21 +1122,32 @@
               </xsl:call-template>
             </h2>
             <xsl:text>&#10;      </xsl:text>
+            <div id="command-longdesc" class="longdesc">
+              <xsl:text>&#10;      </xsl:text>
+              <p>The
+                <a href="#command" class="element">command</a>
+                element is a multipurpose element for representing commands.</p>
+            </div>
+            <xsl:text>&#10;      </xsl:text>
             <div>
               <xsl:text>&#10;      </xsl:text>
               <xsl:for-each
                 select="$rnc-html
                 //h:span[@id='command']
                 ">
-                <xsl:call-template name="make.special.context"/>
+                <xsl:call-template name="make.special.context">
+                  <xsl:with-param name="element-name">command</xsl:with-param>
+                </xsl:call-template>
               </xsl:for-each>
-              <xsl:text>&#10;      </xsl:text>
-              <p>A <span class="element">command</span> element with
-                no <span class="attribute">type</span> attribute
-                specified represents the same thing as a <a
-                  href="#command.command">command element with its type
-                  attribute set to "command"</a>.</p>
             </div>
+            <xsl:text>&#10;      </xsl:text>
+            <p>A
+              <a href="#command" class="element">command</a>
+              element with no
+              <span class="attribute">type</span>
+              attribute specified represents the same thing as a
+              <a href="#command.command">command element with its type
+                attribute set to "command"</a>.</p>
           </section>
         </xsl:when>
         <xsl:when test="$name='input.text'">
@@ -1159,20 +1176,42 @@
               </xsl:call-template>
             </h2>
             <xsl:text>&#10;      </xsl:text>
-            <div>
+            <div id="input-longdesc" class="longdesc">
+              <xsl:text>&#10;      </xsl:text>
+              <p>The
+                <a href="#input" class="element">input</a>
+                element is a multipurpose element for representing input controls.</p>
+            </div>
+            <xsl:text>&#10;      </xsl:text>
+            <div class="toc">
               <xsl:text>&#10;      </xsl:text>
               <xsl:for-each
                 select="$rnc-html
                 //h:span[@id='input']
                 ">
-                <xsl:call-template name="make.special.context"/>
+                <xsl:call-template name="make.special.context">
+                  <xsl:with-param name="element-name">input</xsl:with-param>
+                </xsl:call-template>
               </xsl:for-each>
               <xsl:text>&#10;      </xsl:text>
-              <p>An <span class="element">input</span> element with
-                no <span class="attribute">type</span> attribute
-                specified represents the same thing as a <a
-                  href="#input.text">input element with its type
-                  attribute set to "text"</a>.</p>
+            </div>
+            <p>An
+              <a href="#input" class="element">input</a>
+              element with no
+              <span class="attribute">type</span>
+              attribute specified represents the same thing as an
+              <a href="#input.text">input element with its type
+                attribute set to "text"</a>.</p>
+            <xsl:text>&#10;      </xsl:text>
+            <div class="no-number no-toc" id="input-changes">
+              <xsl:text>&#10;</xsl:text>
+              <h2 class="element-subhead">Changes in HTML5</h2>
+              <div class="changes">
+                <p>Several new 
+                  <a href="#input" class="element">input</a>
+                  element types have been added, and several new
+                  attributes are now allowed on the element.</p>
+              </div>
             </div>
           </section>
         </xsl:when>
@@ -1202,23 +1241,133 @@
               </xsl:call-template>
             </h2>
             <xsl:text>&#10;      </xsl:text>
-            <p>The <span class="element">meta</span> element is
-              defined in the following sections:</p>
+            <div id="meta-longdesc" class="longdesc">
+              <xsl:text>&#10;      </xsl:text>
+              <p>The
+                <a href="#meta" class="element">meta</a>
+                element is a multipurpose element for representing
+                metadata.</p>
+            <xsl:text>&#10;      </xsl:text>
+            </div>
+            <xsl:text>&#10;      </xsl:text>
+            <p>The details of the
+              <a href="#meta" class="element">meta</a>
+              element are described in the following sections:</p>
             <xsl:text>&#10;      </xsl:text>
+            <div class="toc">
             <ul>
               <xsl:text>&#10;      </xsl:text>
-              <li><a href="#meta.name">meta name</a></li>
+              <li>
+                <xsl:call-template name="make-element-spec-link">
+                  <xsl:with-param name="element-name">meta</xsl:with-param>
+                  <xsl:with-param name="filename">
+                    <xsl:call-template name="get-spec-filename">
+                      <xsl:with-param name="ref">#attr-meta-name</xsl:with-param>
+                    </xsl:call-template>
+                  </xsl:with-param>
+                  <xsl:with-param name="target">#attr-meta-name</xsl:with-param>
+                </xsl:call-template>
+                <span><xsl:text> </xsl:text></span>
+                <a href="#meta.name">meta name</a>
+              </li>
               <xsl:text>&#10;      </xsl:text>
-              <li><a href="#meta.http-equiv.refresh">meta http-equiv=refresh</a></li>
+              <li>
+                <xsl:call-template name="make-element-spec-link">
+                  <xsl:with-param name="element-name">meta</xsl:with-param>
+                  <xsl:with-param name="filename">
+                    <xsl:call-template name="get-spec-filename">
+                      <xsl:with-param name="ref">#attr-meta-http-equiv-refresh</xsl:with-param>
+                    </xsl:call-template>
+                  </xsl:with-param>
+                  <xsl:with-param name="target">#attr-meta-http-equiv-refresh</xsl:with-param>
+                </xsl:call-template>
+                <span><xsl:text> </xsl:text></span>
+                <a href="#meta.http-equiv.refresh">meta http-equiv=refresh</a>
+              </li>
               <xsl:text>&#10;      </xsl:text>
-              <li><a href="#meta.http-equiv.default-style">meta http-equiv=default-style</a></li>
+              <li>
+                <xsl:call-template name="make-element-spec-link">
+                  <xsl:with-param name="element-name">meta</xsl:with-param>
+                  <xsl:with-param name="filename">
+                    <xsl:call-template name="get-spec-filename">
+                      <xsl:with-param name="ref">#attr-meta-http-equiv-default-style</xsl:with-param>
+                    </xsl:call-template>
+                  </xsl:with-param>
+                  <xsl:with-param name="target">#attr-meta-http-equiv-default-style</xsl:with-param>
+                </xsl:call-template>
+                <span><xsl:text> </xsl:text></span>
+                <a href="#meta.http-equiv.default-style">meta http-equiv=default-style</a>
+              </li>
               <xsl:text>&#10;      </xsl:text>
-              <li><a href="#meta.charset">meta charset</a></li>
+              <li>
+                <xsl:call-template name="make-element-spec-link">
+                  <xsl:with-param name="element-name">meta</xsl:with-param>
+                  <xsl:with-param name="filename">
+                    <xsl:call-template name="get-spec-filename">
+                      <xsl:with-param name="ref">#attr-meta-http-equiv-content-language</xsl:with-param>
+                    </xsl:call-template>
+                  </xsl:with-param>
+                  <xsl:with-param name="target">#attr-meta-http-equiv-content-language</xsl:with-param>
+                </xsl:call-template>
+                <span><xsl:text> </xsl:text></span>
+                <a href="#meta.http-equiv.content-type">meta http-equiv=content-language</a>
+                <span><xsl:text> </xsl:text></span>
+                <span class="obsoleted-feature"
+                  title="This markup feature has been obsoleted in HTML5."
+                  >OBSOLETE</span>
+              </li>
               <xsl:text>&#10;      </xsl:text>
-              <li><a href="#meta.http-equiv.content-type">meta http-equiv=content-type</a></li>
+              <li>
+                <xsl:call-template name="make-element-spec-link">
+                  <xsl:with-param name="element-name">meta</xsl:with-param>
+                  <xsl:with-param name="filename">
+                    <xsl:call-template name="get-spec-filename">
+                      <xsl:with-param name="ref">#attr-meta-charset</xsl:with-param>
+                    </xsl:call-template>
+                  </xsl:with-param>
+                  <xsl:with-param name="target">#attr-meta-charset</xsl:with-param>
+                </xsl:call-template>
+                <span><xsl:text> </xsl:text></span>
+                <a href="#meta.charset">meta charset</a>
+                <span><xsl:text> </xsl:text></span>
+                <span class="new-feature"
+                  title="This markup feature is newly added in HTML5."
+                  >NEW</span>
+              </li>
+              <xsl:text>&#10;      </xsl:text>
+              <li>
+                <xsl:call-template name="make-element-spec-link">
+                  <xsl:with-param name="element-name">meta</xsl:with-param>
+                  <xsl:with-param name="filename">
+                    <xsl:call-template name="get-spec-filename">
+                      <xsl:with-param name="ref">#attr-meta-http-equiv-content-type</xsl:with-param>
+                    </xsl:call-template>
+                  </xsl:with-param>
+                  <xsl:with-param name="target">#attr-meta-http-equiv-content-type</xsl:with-param>
+                </xsl:call-template>
+                <span><xsl:text> </xsl:text></span>
+                <a href="#meta.http-equiv.content-type">meta http-equiv=content-type</a>
+              </li>
               <xsl:text>&#10;      </xsl:text>
             </ul>
+          </div>
             <xsl:text>&#10;      </xsl:text>
+            <div class="no-number no-toc" id="meta-changes">
+              <xsl:text>&#10;</xsl:text>
+              <h2 class="element-subhead">Changes in HTML5</h2>
+              <div class="changes">
+                <p>Although previous versions of HTML allowed the
+                  <span class="attribute">http-equiv</span>
+                  attribute on the
+                  <a href="#meta" class="element">meta</a>
+                  element to have any number of possible values, the
+                  <span class="attribute">http-equiv</span>
+                  attribute is now restricted to only the specific
+                  values described in this reference. Also, the new
+                  <a href="#meta.charset" class="attribute">charset</a>
+                  attribute is now allowed.</p>
+              </div>
+            </div>
           </section>
         </xsl:when>
       </xsl:choose>
@@ -2086,15 +2235,44 @@
   </xsl:template>
 
   <xsl:template name="make.special.context">
-    <p>See the following sections:</p>
+    <xsl:param name="element-name"/>
+    <p>The details of the
+      <a href="#{element-name}" class="element">
+        <xsl:value-of select="$element-name"/>
+      </a>
+      element are described in the following sections:</p>
     <ul>
       <xsl:for-each select="node()">
         <xsl:if test="@href">
           <li>
+            <xsl:variable name="target">
+              <xsl:call-template name="get-spec-target">
+                <xsl:with-param name="name" select="normalize-space(.)"/>
+              </xsl:call-template>
+            </xsl:variable>
+            <xsl:variable name="filename">
+              <xsl:call-template name="get-spec-filename">
+                <xsl:with-param name="ref" select="$target"/>
+              </xsl:call-template>
+            </xsl:variable>
+            <xsl:if test="$element-name = 'input'">
+              <xsl:call-template name="make-element-spec-link">
+                <xsl:with-param name="element-name" select="$element-name"/>
+                <xsl:with-param name="filename" select="$filename"/>
+                <xsl:with-param name="target" select="$target"/>
+              </xsl:call-template>
+              <span><xsl:text> </xsl:text></span>
+            </xsl:if>
             <a>
               <xsl:copy-of select="@*"/>
               <xsl:value-of select="concat(substring-before(.,'.'),' type=',substring-after(.,'.'))"/>
             </a>
+            <xsl:if test="$element-name = 'input'">
+              <span><xsl:text> </xsl:text></span>
+              <xsl:call-template name="make-markup-feature-flags">
+                <xsl:with-param name="element-name" select="normalize-space(.)"/>
+              </xsl:call-template>
+            </xsl:if>
           </li>
         </xsl:if>
       </xsl:for-each>
@@ -2611,7 +2789,7 @@
                 <a href="#data-string">string</a>
               </xsl:when>
               <xsl:when
-                test="not(//*[@id=$ref]//*[@class='model']/h:a)">
+                test="not(key('elements',$ref)//*[@class='model']/h:a)">
                 <xsl:for-each select="key('elements',$ref)//*[@class='model']/node()">
                   <xsl:choose>
                     <xsl:when test="name()=''">
@@ -3112,6 +3290,7 @@
       </xsl:choose>
     </span>
   </xsl:template>
+
   <!-- * ***************************************************************** -->
   <!-- * * MAKE OBSOLETE/CHANGED/NEW FLAGS -->
   <!-- * ***************************************************************** -->
@@ -3149,6 +3328,7 @@
       </xsl:when>
     </xsl:choose>
   </xsl:template>
+
   <!-- * ***************************************************************** -->
   <!-- * * MAKE ELEMENT LINK TO HTML5 SPEC -->
   <!-- * ***************************************************************** -->
@@ -3242,6 +3422,7 @@
       <xsl:copy-of select="key('interface-name',$interface)"/>
     </xsl:for-each>
   </xsl:template>
+
 <!-- * ***************************************************************** -->
 <!-- * * UTILITY TEMPLATES -->
 <!-- * ***************************************************************** -->
@@ -3458,7 +3639,6 @@
     <!-- * <xsl:value-of select="."/> -->
     <!-- * <xsl:text>&#160;</xsl:text> -->
     <!-- * </xsl:message> -->
-
   <xsl:template match="h:span[@class='postfix intermixed']">
     <xsl:copy-of select="."/>
   </xsl:template>

Index: specgen.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/specgen.xsl,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- specgen.xsl	22 Jul 2010 05:48:27 -0000	1.71
+++ specgen.xsl	29 Jul 2010 09:39:27 -0000	1.72
@@ -505,9 +505,9 @@
     <xsl:choose>
       <xsl:when test='$section/ancestor::* = $sections'>
         <xsl:for-each select='$section/ancestor-or-self::h:section'>
-          <xsl:if test='not(position()=1) and position()=last() and 9 > count(preceding-sibling::h:section)'>
-            <xsl:text>0</xsl:text>
-          </xsl:if>
+          <!-- * <xsl:if test='not(position()=1) and position()=last() and 9 > count(preceding-sibling::h:section)'> -->
+            <!-- * <xsl:text>0</xsl:text> -->
+          <!-- * </xsl:if> -->
           <xsl:value-of select='count(preceding-sibling::h:section) + 1'/>
           <xsl:if test='position() != last()'>
             <xsl:text>.</xsl:text>

Index: toc.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/toc.xsl,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- toc.xsl	28 Jul 2010 16:07:34 -0000	1.20
+++ toc.xsl	29 Jul 2010 09:39:27 -0000	1.21
@@ -30,9 +30,9 @@
             <xsl:value-of select='$prefix'/>
             <xsl:if test='$prefix'>
               <xsl:text>.</xsl:text>
-              <xsl:if test='10 > position()'>
-                <xsl:text>0</xsl:text>
-              </xsl:if>
+              <!-- * <xsl:if test='10 > position()'> -->
+                <!-- * <xsl:text>0</xsl:text> -->
+              <!-- * </xsl:if> -->
             </xsl:if>
             <xsl:choose>
               <xsl:when test='$alpha'><xsl:number value='position()' format='A'/></xsl:when>
Received on Thursday, 29 July 2010 09:39:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 29 July 2010 09:39:40 GMT