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

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 UTC