source: documentation/trunk/tutorials/processing/xml-to-index.xsl

Last change on this file was 33785, checked in by kjdon, 4 years ago

added google analytics

  • Property svn:keywords set to Author Date Id Revision
File size: 1.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5 <xsl:output method="html"/>
6 <xsl:param name="gs-major-version"/>
7 <xsl:include href="common.xsl"/>
8
9 <!-- set mode to cd/web/wiki depending on where the files will end up -->
10 <xsl:variable name="mode">wiki</xsl:variable>
11
12 <xsl:template match="TutorialList">
13 <html>
14 <head>
15 <title><xsl:apply-templates select="Title/Text"/></title>
16 <xsl:call-template name="add-google-analytics"/>
17 </head>
18 <body>
19 <h2><xsl:apply-templates select="Title/Text"/></h2>
20 <h3><xsl:apply-templates select="SupplementaryText/Text[@id='current']"/><xsl:text> </xsl:text><xsl:value-of select="Version/@current"/></h3>
21 <p><a href="all_tutorials.html"><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='print']"/></a>
22 <xsl:if test="$mode='wiki'"><xsl:text> </xsl:text><xsl:call-template name="WikiLink"/></xsl:if>
23 </p>
24 <xsl:apply-templates select="Comment"/>
25 <dl>
26 <xsl:apply-templates select="Tutorial[not(@hidden)]"/>
27 </dl>
28
29 <hr/><div style="text-align:center;"><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='copyright']"/></div>
30
31 </body>
32 </html>
33 </xsl:template>
34
35 <xsl:template match="Tutorial">
36 <dt><a href="{@id}.htm"><xsl:apply-templates select="Title/Text"/></a></dt>
37 <dd><xsl:for-each select="Content/Heading">
38 <xsl:apply-templates/><br/>
39 </xsl:for-each>
40 </dd>
41 </xsl:template>
42
43</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.