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

Last change on this file since 20741 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: 2.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
4
5 <xsl:include href="common.xsl"/>
6
7 <xsl:output method="html"/>
8
9 <xsl:variable name="es">español</xsl:variable>
10 <xsl:variable name="fr">français</xsl:variable>
11 <xsl:variable name="ru">русскОй</xsl:variable>
12 <xsl:template match="TutorialList">
13 <html>
14 <head>
15 <title><xsl:apply-templates select="Title/Text"/>: <xsl:value-of select="Version/@current"/></title>
16 </head>
17 <body>
18 <h2><xsl:apply-templates select="Title/Text"/><xsl:text> </xsl:text><a href="es/index.html"><xsl:value-of select="$es"/></a><xsl:text> </xsl:text><a href="fr/index.html"><xsl:value-of select="$fr"/></a><xsl:text> </xsl:text><a href="ru/index.html"><xsl:value-of select="$ru"/></a></h2>
19 <h3><xsl:apply-templates select="SupplementaryText/Text[@id='current']"/><xsl:text> </xsl:text><xsl:value-of select="Version/@current"/></h3>
20 <p><a href="en/all_tutorials.html"><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='print']"/></a><xsl:text> </xsl:text><a href="es/all_tutorials.html"><xsl:value-of select="$es"/></a><xsl:text> </xsl:text><a href="fr/all_tutorials.html"><xsl:value-of select="$fr"/></a><xsl:text> </xsl:text><a href="ru/all_tutorials.html"><xsl:value-of select="$ru"/></a></p>
21 <xsl:apply-templates select="Comment"/>
22 <dl>
23 <xsl:apply-templates select="Tutorial[not(@hidden)]"/>
24 </dl>
25 </body>
26 </html>
27 </xsl:template>
28
29 <xsl:template match="Tutorial">
30 <dt><a href="en/{@id}.htm"><xsl:apply-templates select="Title/Text"/></a><xsl:text> </xsl:text><a href="es/{@id}.htm"><xsl:value-of select="$es"/></a><xsl:text> </xsl:text><a href="fr/{@id}.htm"><xsl:value-of select="$fr"/></a><xsl:text> </xsl:text><a href="ru/{@id}.htm"><xsl:value-of select="$ru"/></a></dt>
31 <dd><xsl:for-each select="Content/Heading">
32 <xsl:apply-templates/><br/>
33 </xsl:for-each>
34 </dd>
35 </xsl:template>
36
37</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.