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

html5/markup/tools generate-spec-source.xsl,1.268,1.269

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 22 Jul 2010 20:16:43 +0000
To: public-html-commits@w3.org
Message-Id: <E1Oc2CB-0007eo-8Y@lionel-hutz.w3.org>
Update of /sources/public/html5/markup/tools
In directory hutz:/tmp/cvs-serv28951/tools

Modified Files:
	generate-spec-source.xsl 
Log Message:
added spec links for all forms attributes


Index: generate-spec-source.xsl
===================================================================
RCS file: /sources/public/html5/markup/tools/generate-spec-source.xsl,v
retrieving revision 1.268
retrieving revision 1.269
diff -u -d -r1.268 -r1.269
--- generate-spec-source.xsl	22 Jul 2010 11:05:41 -0000	1.268
+++ generate-spec-source.xsl	22 Jul 2010 20:16:40 -0000	1.269
@@ -409,6 +409,28 @@
                   </span>
                   <xsl:text> </xsl:text>
                   <xsl:variable name="ref" select="@id"/>
+                  <xsl:variable name="spec-target">
+                    <xsl:choose>
+                      <xsl:when test="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('#the-',$shared-attr-name,'-attribute')"/>
+                      </xsl:otherwise>
+                    </xsl:choose>
+                  </xsl:variable>
+                  <xsl:variable name="filename">
+                    <xsl:call-template name="get-spec-filename">
+                      <xsl:with-param name="ref" select="$spec-target"/>
+                    </xsl:call-template>
+                  </xsl:variable>
+                  <xsl:if test="not($filename='')">
+                    <span class="spec-link">
+                      <a title="Read about this attribute in the HTML5 spec"
+                        href="{$filename}.html{$spec-target}">&#9432;</a>
+                    </span>
+                    <xsl:text> </xsl:text>
+                  </xsl:if>
                   <xsl:if test="$attributes//*[@id=$ref][contains(@class,'new')]">
                     <span class="new-feature"
                       title="This markup feature is newly added in HTML5."
Received on Thursday, 22 July 2010 20:16:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 July 2010 20:16:44 GMT