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

html5/markup/tools generate-spec-source.xsl,1.259,1.260 specgen.xsl,1.68,1.69

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 07 Jul 2010 01:11:55 +0000
To: public-html-commits@w3.org
Message-Id: <E1OWJB5-00055s-1u@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv19153/tools

Modified Files:
	generate-spec-source.xsl specgen.xsl 
Log Message:
made generated HTML5 spec targets directly link to appropriate files (rather than relying on client-side JS redirect)


Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -d -r1.259 -r1.260
--- generate-spec-source.xsl	6 Jul 2010 03:03:06 -0000	1.259
+++ generate-spec-source.xsl	7 Jul 2010 01:11:52 -0000	1.260
@@ -931,6 +931,7 @@
       </xsl:variable>
       <xsl:choose>
         <xsl:when test="$name='button.submit'">
+          <xsl:variable name="filename" select="document('../fragment-links.html')//*[preceding-sibling::*='#the-button-element']"/>
           <xsl:text>&#10;    </xsl:text>
           <section id="button" class="no-number">
             <xsl:text>&#10;      </xsl:text>
@@ -939,7 +940,7 @@
               <xsl:text> </xsl:text>
               <span class="spec-link">
                 <a title="Read about the button element in the HTML5 spec"
-                  href="http://dev.w3.org/html5/spec-author-view/#the-button-element">&#9432;</a>
+                  href="http://dev.w3.org/html5/spec-author-view/{$filename}.html#the-button-element">&#9432;</a>
               </span>
             </h2>
             <xsl:text>&#10;      </xsl:text>
@@ -963,6 +964,7 @@
           </section>
         </xsl:when>
         <xsl:when test="$name='command.command'">
+          <xsl:variable name="filename" select="document('../fragment-links.html')//*[preceding-sibling::*='#the-command']"/>
           <xsl:text>&#10;    </xsl:text>
           <section id="command" class="no-number">
             <xsl:text>&#10;      </xsl:text>
@@ -971,7 +973,7 @@
               <xsl:text> </xsl:text>
               <span class="spec-link">
                 <a title="Read about the command element in the HTML5 spec"
-                  href="http://dev.w3.org/html5/spec-author-view/#the-command">&#9432;</a>
+                  href="http://dev.w3.org/html5/spec-author-view/{$filename}.html#the-command">&#9432;</a>
               </span>
               <xsl:text> </xsl:text>
               <span class="new-feature" title="This markup feature is newly added in HTML5.">NEW</span>
@@ -995,6 +997,7 @@
           </section>
         </xsl:when>
         <xsl:when test="$name='input.text'">
+          <xsl:variable name="filename" select="document('../fragment-links.html')//*[preceding-sibling::*='#the-input-element']"/>
           <xsl:text>&#10;    </xsl:text>
           <section id="input" class="no-number">
             <xsl:text>&#10;      </xsl:text>
@@ -1003,7 +1006,7 @@
               <xsl:text> </xsl:text>
               <span class="spec-link">
                 <a title="Read about the input element in the HTML5 spec"
-                  href="http://dev.w3.org/html5/spec-author-view/#the-input-element">&#9432;</a>
+                  href="http://dev.w3.org/html5/spec-author-view/{$filename}.html#the-input-element">&#9432;</a>
               </span>
             </h2>
             <xsl:text>&#10;      </xsl:text>
@@ -1025,6 +1028,7 @@
           </section>
         </xsl:when>
         <xsl:when test="$name='meta.name'">
+          <xsl:variable name="filename" select="document('../fragment-links.html')//*[preceding-sibling::*='#meta']"/>
           <xsl:text>&#10;    </xsl:text>
           <section id="meta" class="no-number">
             <xsl:text>&#10;      </xsl:text>
@@ -1033,7 +1037,7 @@
               <xsl:text> </xsl:text>
               <span class="spec-link">
                 <a title="Read about the meta element in the HTML5 spec"
-                  href="http://dev.w3.org/html5/spec-author-view/#the-meta-element">&#9432;</a>
+                  href="http://dev.w3.org/html5/spec-author-view/{$filename}.html#meta">&#9432;</a>
               </span>
             </h2>
             <xsl:text>&#10;      </xsl:text>
@@ -1176,36 +1180,42 @@
           </span>
             <xsl:variable name="target">
               <xsl:choose>
-                <xsl:when test="starts-with($name,'button')">the-button-element</xsl:when>
-                <xsl:when test="starts-with($name,'command')">the-command</xsl:when>
-                <xsl:when test="starts-with($name,'input')">the-input-element</xsl:when>
-                <xsl:when test="$name = 'audio'">audio</xsl:when>
-                <xsl:when test="$name = 'body'">the-body-element-0</xsl:when>
-                <xsl:when test="$name = 'command'">the-command</xsl:when>
-                <xsl:when test="$name = 'h1'">the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
-                <xsl:when test="$name = 'h2'">the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
-                <xsl:when test="$name = 'h3'">the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
-                <xsl:when test="$name = 'h4'">the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
-                <xsl:when test="$name = 'h5'">the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
-                <xsl:when test="$name = 'h6'">the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
-                <xsl:when test="$name = 'head'">the-head-element-0</xsl:when>
-                <xsl:when test="$name = 'html'">the-html-element-0</xsl:when>
-                <xsl:when test="$name = 'menu'">menus</xsl:when>
-                <xsl:when test="$name = 'meta'">meta</xsl:when>
-                <xsl:when test="$name = 'sub'">the-sub-and-sup-elements</xsl:when>
-                <xsl:when test="$name = 'sup'">the-sub-and-sup-elements</xsl:when>
-                <xsl:when test="$name = 'title'">the-title-element-0</xsl:when>
-                <xsl:when test="$name = 'video'">video</xsl:when>
+                <xsl:when test="starts-with($name,'button')">#the-button-element</xsl:when>
+                <xsl:when test="starts-with($name,'command')">#the-command</xsl:when>
+                <xsl:when test="starts-with($name,'input')">#the-input-element</xsl:when>
+                <xsl:when test="starts-with($name,'meta')">#meta</xsl:when>
+                <xsl:when test="$name = 'audio'">#audio</xsl:when>
+                <xsl:when test="$name = 'body'">#the-body-element-0</xsl:when>
+                <xsl:when test="$name = 'command'">#the-command</xsl:when>
+                <xsl:when test="$name = 'h1'">#the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
+                <xsl:when test="$name = 'h2'">#the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
+                <xsl:when test="$name = 'h3'">#the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
+                <xsl:when test="$name = 'h4'">#the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
+                <xsl:when test="$name = 'h5'">#the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
+                <xsl:when test="$name = 'h6'">#the-h1-h2-h3-h4-h5-and-h6-elements</xsl:when>
+                <xsl:when test="$name = 'head'">#the-head-element-0</xsl:when>
+                <xsl:when test="$name = 'html'">#the-html-element-0</xsl:when>
+                <xsl:when test="$name = 'menu'">#menus</xsl:when>
+                <xsl:when test="$name = 'script'">#script</xsl:when>
+                <xsl:when test="$name = 'sub'">#the-sub-and-sup-elements</xsl:when>
+                <xsl:when test="$name = 'sup'">#the-sub-and-sup-elements</xsl:when>
+                <xsl:when test="$name = 'title'">#the-title-element-0</xsl:when>
+                <xsl:when test="$name = 'video'">#video</xsl:when>
                 <xsl:otherwise>
-                  <xsl:value-of select="concat('the-',$name,'-element')"/>
+                  <xsl:value-of select="concat('#the-',$name,'-element')"/>
                 </xsl:otherwise>
               </xsl:choose>
             </xsl:variable>
             <xsl:text> </xsl:text>
+            <xsl:message>
+              <xsl:text>  </xsl:text>
+              <xsl:value-of select="$target"/>
+            </xsl:message>
+            <xsl:variable name="filename" select="document('../fragment-links.html')//*[preceding-sibling::*=$target]"/>
             <span class="spec-link">
               <xsl:text> </xsl:text>
               <a title="Read about the {$name} element in the HTML5 spec"
-                href="http://dev.w3.org/html5/spec-author-view/#{$target}">&#9432;</a>
+                href="http://dev.w3.org/html5/spec-author-view/{$filename}.html{$target}">&#9432;</a>
             </span>
           <xsl:text> </xsl:text>
           <xsl:if test='not($obsoleted="")'>
@@ -2628,17 +2638,22 @@
           <xsl:variable name="spec-target">
             <xsl:choose>
               <xsl:when test="not($name='') and document('../src/map-attributes.html')//*[preceding-sibling::*=$ref]">
-                <xsl:value-of select="document('../src/map-attributes.html')//*[preceding-sibling::*=$ref]"/>
+                <xsl:value-of select="concat('#',document('../src/map-attributes.html')//*[preceding-sibling::*=$ref])"/>
               </xsl:when>
               <xsl:otherwise>
-                <xsl:value-of select="concat('attr-',$name,'-',$attribute-name)"/>
+                <xsl:value-of select="concat('#attr-',$name,'-',$attribute-name)"/>
               </xsl:otherwise>
             </xsl:choose>
           </xsl:variable>
           <xsl:text> </xsl:text>
+          <xsl:message>
+            <xsl:text>  </xsl:text>
+            <xsl:value-of select="$spec-target"/>
+          </xsl:message>
+          <xsl:variable name="filename" select="document('../fragment-links.html')//*[preceding-sibling::*=$spec-target]"/>
           <span class="spec-link">
             <a title="Read about this attribute in the HTML5 spec"
-              href="http://dev.w3.org/html5/spec-author-view/#{$spec-target}">&#9432;</a>
+              href="http://dev.w3.org/html5/spec-author-view/{$filename}.html{$spec-target}">&#9432;</a>
           </span>
           <xsl:text> </xsl:text>
           <xsl:if test="not($name='') and document(concat('../elements/',$name,'.html'))//*[@id=$ref][contains(@class,'new')]

Index: specgen.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/specgen.xsl,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- specgen.xsl	28 Jun 2010 12:06:10 -0000	1.68
+++ specgen.xsl	7 Jul 2010 01:11:52 -0000	1.69
@@ -680,7 +680,8 @@
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-  <xsl:template match="h:a[@href[starts-with(.,'#')]]" name="link-handler"> <xsl:choose>
+  <xsl:template match="h:a[@href[starts-with(.,'#')]]" name="link-handler">
+    <xsl:choose>
       <xsl:when test="preceding-sibling::h:span[@class='postfix intermixed']
         and ancestor::*[@class='elem-mdl']
         and contains(@href,'.attrs')
Received on Wednesday, 7 July 2010 01:11:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 July 2010 01:11:57 GMT