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

Last change on this file since 13638 was 13638, checked in by kjdon, 17 years ago

xsl transform files copied from gsdl-tutorials repository

  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
RevLine 
[13638]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">cd</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 </body>
27 </html>
28 </xsl:template>
29
30 <xsl:template match="Tutorial">
31 <dt><a href="{@id}.htm"><xsl:apply-templates select="Title/Text"/></a></dt>
32 <dd><xsl:for-each select="Content/Heading">
33 <xsl:apply-templates/><br/>
34 </xsl:for-each>
35 </dd>
36 </xsl:template>
37
38</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.