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

html5/markup/tools specgen.xsl,1.33,1.34

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Sat, 13 Jun 2009 08:36:18 +0000
To: public-html-commits@w3.org
Message-Id: <E1MFOio-0003As-Ar@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv11913/tools

Modified Files:
	specgen.xsl 
Log Message:
h:tml; fixed most of the broken idrefs that were remaining


Index: specgen.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/specgen.xsl,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- specgen.xsl	9 May 2009 08:33:00 -0000	1.33
+++ specgen.xsl	13 Jun 2009 08:36:16 -0000	1.34
@@ -574,24 +574,37 @@
           select="key('id',$href)/ancestor-or-self::h:section[child::h:h2[@class='element-head']]
           |key('id',$href)/ancestor::h:section[(count(ancestor::h:section)=0 and not(@id='elements'))]
           "/>
-        <xsl:if test="not($section/@id)">
-          <xsl:message>
-            <xsl:text>UNDEFINED: </xsl:text>
-            <xsl:value-of select="$href"/>
-            <xsl:text> in </xsl:text>
-            <xsl:value-of select="ancestor::h:section[child::h:h2[@class='element-head']]/@id
-              |ancestor::h:section[(count(ancestor::h:section)=0 and not(@id='elements'))]/@id"/>
-            <xsl:text>.html</xsl:text>
-          </xsl:message>
-        </xsl:if>
-        <a>
-          <xsl:copy-of select="@*"/>
-          <xsl:attribute name="href">
-            <xsl:value-of select="concat($section/@id,'.html')"/>
-            <xsl:value-of select="@href"/>
-          </xsl:attribute>
-          <xsl:apply-templates/>
-        </a>
+        <xsl:choose>
+          <xsl:when test="$href='elements'">
+            <a>
+              <xsl:copy-of select="@*"/>
+              <xsl:attribute name="href">
+                <xsl:text>elements.html#elements</xsl:text>
+              </xsl:attribute>
+              <xsl:apply-templates/>
+            </a>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:if test="not($section/@id)">
+              <xsl:message>
+                <xsl:text>UNDEFINED: </xsl:text>
+                <xsl:value-of select="$href"/>
+                <xsl:text> in </xsl:text>
+                <xsl:value-of select="ancestor::h:section[child::h:h2[@class='element-head']]/@id
+                  |ancestor::h:section[(count(ancestor::h:section)=0 and not(@id='elements'))]/@id"/>
+                <xsl:text>.html</xsl:text>
+              </xsl:message>
+            </xsl:if>
+            <a>
+              <xsl:copy-of select="@*"/>
+              <xsl:attribute name="href">
+                <xsl:value-of select="concat($section/@id,'.html')"/>
+                <xsl:value-of select="@href"/>
+              </xsl:attribute>
+              <xsl:apply-templates/>
+            </a>
+          </xsl:otherwise>
+        </xsl:choose>
       </xsl:when>
       <xsl:otherwise>
         <a>
Received on Saturday, 13 June 2009 08:36:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 13 June 2009 08:36:33 GMT