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

html5/markup/tools generate-spec-source.xsl,1.223,1.224

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 01 Feb 2010 05:25:06 +0000
To: public-html-commits@w3.org
Message-Id: <E1NbomY-0002GM-W8@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv8455/tools

Modified Files:
	generate-spec-source.xsl 
Log Message:
mostly complete

Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.223
retrieving revision 1.224
diff -u -d -r1.223 -r1.224
--- generate-spec-source.xsl	1 Feb 2010 02:34:55 -0000	1.223
+++ generate-spec-source.xsl	1 Feb 2010 05:25:04 -0000	1.224
@@ -143,40 +143,31 @@
             <xsl:text>&#10;        </xsl:text>
             <div id="common.attrs-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="#common.attrs"
-                      id="common.attrs">common.attrs</a></span>
-                  <xsl:text> = </xsl:text>
-                </dt>
-                <dd>
+              <div class="attr-content-models">
                   <xsl:for-each
                     select="document($rnc-html)//h:*[@id='common.attrs']/node()">
-                    <xsl:choose>
-                      <xsl:when test=".='common.attrs.other'">
-                        <xsl:for-each
-                          select="//*[@id='common.attrs.other']/node()">
-                          <xsl:choose>
-                            <xsl:when test="contains(.,'empty')">
-                              <!-- * do nothing -->
-                            </xsl:when>
-                            <xsl:otherwise>
-                              <xsl:copy-of select="."/>
-                            </xsl:otherwise>
-                          </xsl:choose>
-                        </xsl:for-each>
-                      </xsl:when>
-                      <xsl:otherwise>
-                        <xsl:copy-of select="."/>
-                      </xsl:otherwise>
-                    </xsl:choose>
+                    <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:choose>
+<xsl:when test="starts-with(.,'common.')">
+<a href="{@href}">
+<xsl:value-of select="$type"/>
+<xsl:text> attributes</xsl:text>
+</a>
+<span class="postfix optional">?</span>
+</xsl:when>
+<xsl:otherwise>
+<xsl:copy-of select="."/>
+</xsl:otherwise>
+</xsl:choose>
                   </xsl:for-each>
                   <xsl:text>&#10;            </xsl:text>
-                </dd>
-                <xsl:text>&#10;          </xsl:text>
-              </dl>
+              </div>
               <xsl:text>&#10;        </xsl:text>
             </div>
             <xsl:text>&#10;      </xsl:text>
@@ -197,7 +188,7 @@
                   )"/><xsl:value-of
                   select="substring($type,2)"/>
               </xsl:variable>
-              <section id="{$type}-attrs">
+              <section id="{$ref}">
                 <xsl:text>&#10;        </xsl:text>
                 <h2 class="common-subhead">
                   <xsl:choose>
@@ -213,14 +204,15 @@
                 <div id="{$ref}-mdl">
                   <xsl:text>&#10;        </xsl:text>
                   <xsl:text>&#10;          </xsl:text>
-                  <div class="content-models">
+                  <div class="attr-content-models">
                     <xsl:text>&#10;            </xsl:text>
-                    <p><span class="common-pattern-name"><a
-                          href="#{$ref}"
-                          id="{$ref}">
-                          <xsl:value-of select="."/>
-                      </a></span>
-                      <xsl:text> = </xsl:text>
+                    <p>
+                      <!-- * <span class="common-pattern-name"><a -->
+                          <!-- * href="#{$ref}" -->
+                          <!-- * id="{$ref}"> -->
+                          <!-- * <xsl:value-of select="."/> -->
+                      <!-- * </a></span> -->
+                      <!-- * <xsl:text> = </xsl:text> -->
                       <xsl:for-each select="document($rnc-html)//*[@id=$ref]/node()">
                         <xsl:choose>
                           <xsl:when test="@href='#common.attrs.xmlbase'">
@@ -1366,7 +1358,7 @@
   <xsl:template name="make.tag.omission.section">
     <xsl:param name="name"/>
     <xsl:param name="full-name"/>
-    <div class="no-number no-toc" id="{$full-name}-tags">
+    <div class="no-number no-toc tag-omission" id="{$full-name}-tags">
       <xsl:text>&#10;        </xsl:text>
       <h2 class="element-subhead">Tag omission</h2>
       <xsl:text>&#10;        </xsl:text>
@@ -1446,7 +1438,7 @@
         <xsl:text>&#10;        </xsl:text>
         <h2 class="element-subhead">Permitted parent elements</h2>
         <xsl:text>&#10;        </xsl:text>
-        <p>
+        <p class="permitted-parents">
           <xsl:choose>
             <xsl:when test="$name='li'">
               <xsl:for-each
@@ -1461,6 +1453,20 @@
                 </xsl:if>
               </xsl:for-each>
             </xsl:when>
+            <xsl:when test="$name='param'">
+              <a href="#object">
+                <xsl:text>object</xsl:text>
+              </a>
+            </xsl:when>
+            <xsl:when test="$name='source'">
+              <a href="#audio">
+                <xsl:text>audio</xsl:text>
+              </a>
+              <xsl:text>, </xsl:text>
+              <a href="#video">
+                <xsl:text>video</xsl:text>
+              </a>
+            </xsl:when>
             <xsl:otherwise>
               <xsl:choose>
                 <xsl:when test="
@@ -1625,10 +1631,7 @@
     </xsl:variable>
     <span class="context-mdl">
       <xsl:choose>
-        <xsl:when test="
-          @id='script'
-          or @id='common.elem.metadata'
-          ">
+        <xsl:when test="@id='script'">
           <a href="#{@id}">
             <xsl:value-of select="@id"/>
           </a>
@@ -1638,19 +1641,25 @@
           <!-- * </xsl:for-each> -->
         </xsl:when>
         <xsl:when test="@id='common.elem.phrasing'">
-          <a href="#{@id}">
-            <xsl:text>phrasing elements</xsl:text>
-          </a>
+          <span>Any element that can contain
+            <a href="#{@id}">
+              <xsl:text>phrasing elements</xsl:text>
+            </a>
+          </span>
         </xsl:when>
         <xsl:when test="@id='common.elem.flow'">
-          <a href="#{@id}">
-            <xsl:text>flow elements</xsl:text>
-          </a>
+          <span>Any element that can contain
+            <a href="#{@id}">
+              <xsl:text>flow elements</xsl:text>
+            </a>
+          </span>
         </xsl:when>
         <xsl:when test="@id='common.elem.metadata'">
-          <a href="#{@id}">
-            <xsl:text>metadata elements</xsl:text>
-          </a>
+          <span>Any element that can contain
+            <a href="#{@id}">
+              <xsl:text>metadata elements</xsl:text>
+            </a>
+          </span>
         </xsl:when>
         <xsl:otherwise>
           <xsl:choose>
@@ -1812,13 +1821,17 @@
               <div class="attr-content-models">
                 <p>
                   <a href="#common-attributes">common attributes</a>
+                  <span class="postfix optional">?</span>
                 </p>
-                <p><span class="postfix or">or</span></p>
+                <span class="postfix or">or</span>
                 <p>
                   <a href="#common-attributes">common attributes</a>
+                  <span class="postfix optional">?</span>
                   <xsl:text> </xsl:text>
                   <span class="postfix &amp;">&amp;</span>
+                  <xsl:text> </xsl:text>
                   <a href="#oli.attrs.value">value</a>
+                  <span class="postfix optional">?</span>
                 </p>
               </div>
             </xsl:when>
Received on Monday, 1 February 2010 05:25:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 1 February 2010 05:25:16 GMT