source: documentation/stable/tutorials/processing/xml-to-one-html.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: 2.2 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:include href="common.xsl"/>
6 <xsl:output method="html"/>
7 <!-- set mode to cd/web depending on where the files will end up -->
8 <xsl:variable name="mode">wiki</xsl:variable>
9
10 <xsl:template match="TutorialList">
11 <html>
12 <head>
13 <title><xsl:apply-templates select="Title/Text"/></title>
14 </head>
15 <body>
16 <h2><xsl:apply-templates select="Title/Text"/></h2>
17 <h3><xsl:apply-templates select="SupplementaryText/Text[@id='current']"/><xsl:text> </xsl:text><xsl:value-of select="Version/@current"/></h3>
18 <xsl:apply-templates select="Comment"/>
19 <a name="index"/>
20 <dl>
21 <xsl:apply-templates select="Tutorial[not(@hidden)]" mode="index"/>
22 </dl>
23 <xsl:apply-templates select="Tutorial[not(@hidden)]"/>
24
25 <hr/><div style="text-align:center;"><xsl:apply-templates select="SupplementaryText/Text[@id='copyright']"/></div>
26 </body>
27 </html>
28 </xsl:template>
29
30 <xsl:template match="Tutorial" mode="index">
31 <dt><a href="#{@id}"><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:template match="Tutorial">
39 <div style="page-break-before: always;">
40 <a name="{@id}"/>
41 <h2><xsl:apply-templates select="Title/Text"/></h2>
42 <div style="text-align:right;">
43 <xsl:call-template name="supplementary">
44 <xsl:with-param name="mode" select="$mode"/>
45 </xsl:call-template>
46 </div>
47 <xsl:apply-templates select="Content/*"/>
48 <br/>
49 <br/>
50 </div>
51 </xsl:template>
52
53 <xsl:template name="supplementary">
54 <xsl:param name="mode">web</xsl:param>
55 <!--
56 <xsl:call-template name="IndexLink">
57 <xsl:with-param name="mode">combined</xsl:with-param>
58 </xsl:call-template>
59 -->
60 <xsl:apply-templates select="Prerequisite" mode="combined"/>
61 <xsl:if test="SampleFiles">
62 <xsl:call-template name="SampleFiles">
63 <xsl:with-param name="mode"><xsl:value-of select="$mode"/></xsl:with-param>
64 </xsl:call-template>
65 </xsl:if>
66 <xsl:apply-templates select="Version"/>
67 </xsl:template>
68
69</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.