Browse Source

more toc testing, now with anchor links

svn path=/branches/test/; revision=31118
pull/8/head
Max Mehl 5 years ago
parent
commit
55e8c085ef
2 changed files with 19 additions and 4 deletions
  1. +1
    -1
      contribute/promotion-materials-archive.en.xhtml
  2. +18
    -3
      contribute/promotion-materials-archive.xsl

+ 1
- 1
contribute/promotion-materials-archive.en.xhtml View File

@ -30,7 +30,7 @@
</head>
<body>
<p id="category"><a href="/contribute/">Contribute</a></p>
<p id="category"><a href="/contribute/spreadtheword">Spread the word!</a></p>
<toc />


+ 18
- 3
contribute/promotion-materials-archive.xsl View File

@ -6,16 +6,31 @@
<xsl:template match="toc">
<xsl:element name="ul">
<xsl:for-each select="/buildinfo/document/set/item">
<xsl:sort select="@type" order="ascending" />
<xsl:variable name="id"><xsl:value-of select="@id"/></xsl:variable>
<xsl:variable name="link" select="concat('#', $id)"/>
<xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
<xsl:element name="li">
<xsl:value-of select="/buildinfo/document/set/info[@id=$id]/name" />
</xsl:element>
<xsl:text>[</xsl:text>
<xsl:value-of select="$type"/>
<xsl:text>] </xsl:text>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="$link"/>
</xsl:attribute>
<xsl:value-of select="/buildinfo/document/set/info[@id=$id]/name" />
</xsl:element> <!-- /a -->
</xsl:element> <!-- /li -->
</xsl:for-each>
</xsl:element>
</xsl:element> <!-- /ul -->
</xsl:template>
<!-- Fill dynamic content -->


Loading…
Cancel
Save