source: documentation/stable/tutorials/processing/xml-to-index.xsl@ 20741

Last change on this file since 20741 was 17494, checked in by anna, 16 years ago

Updated tutorials and associated files.

  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 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:include href="common.xsl"/>
7
8 <!-- set mode to cd/web/wiki depending on where the files will end up -->
9 <xsl:variable name="mode">wiki</xsl:variable>
10
11 <xsl:template match="TutorialList">
12 <html>
13 <head>
14 <title><xsl:apply-templates select="Title/Text"/></title>
15 </head>
16 <body>
17 <h2><xsl:apply-templates select="Title/Text"/></h2>
18 <h3><xsl:apply-templates select="SupplementaryText/Text[@id='current']"/><xsl:text> </xsl:text><xsl:value-of select="Version/@current"/></h3>
19 <p><a href="all_tutorials.html"><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='print']"/></a>
20 <xsl:if test="$mode='wiki'"><xsl:text> </xsl:text><xsl:call-template name="WikiLink"/></xsl:if>
21 </p>
22 <xsl:apply-templates select="Comment"/>
23 <dl>
24 <xsl:apply-templates select="Tutorial[not(@hidden)]"/>
25 </dl>
26
27 <hr/><div style="text-align:center;"><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='copyright']"/></div>
28
29 </body>
30 </html>
31 </xsl:template>
32
33 <xsl:template match="Tutorial">
34 <dt><a href="{@id}.htm"><xsl:apply-templates select="Title/Text"/></a></dt>
35 <dd><xsl:for-each select="Content/Heading">
36 <xsl:apply-templates/><br/>
37 </xsl:for-each>
38 </dd>
39 </xsl:template>
40
41</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.