source: documentation/trunk/tutorials/processing/xml-to-many-html.xsl@ 25472

Last change on this file since 25472 was 25472, checked in by ak19, 12 years ago
  1. ApplyXSLT takes an additional parameter: the Greenstone major version number, or sets this to 2 if none is provided. This is then passed onto the XSLT files. 2. generate-html.sh/bat will pass any commandline parameters on to ApplyXSLT.java. 3. Simplified the generate-html.bat file with a for loop to avoid code duplication. 4. The MajorVersion element will now be processed by processing/common.xsl: anything in a MajorVersion element whose number matches the Greenstone major version number specified to generate-html.sh/bat (or ApplyXSLT.java) will be output to html, if the MajorVersion number does not match, it won't be output.
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 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:param name="gs-major-version"/>
6 <xsl:include href="common.xsl"/>
7
8 <xsl:output method="html"/>
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="Tutorial">
13 <xsl:if test="not(@hidden)">
14 <html>
15 <head>
16 <title><xsl:apply-templates select="Title/Text"/></title>
17 </head>
18 <body>
19 <h1><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='title']"/></h1>
20 <div style="text-align:right;">
21 <xsl:call-template name="supplementary">
22 <xsl:with-param name="mode" select="$mode"/>
23 </xsl:call-template>
24 </div>
25 <a name="{@id}"/>
26 <h2><xsl:apply-templates select="Title/Text"/></h2>
27 <xsl:apply-templates select="Content/*"/>
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:if>
34 </xsl:template>
35
36 <xsl:template name="supplementary">
37 <xsl:param name="mode">web</xsl:param>
38 <xsl:if test="$mode='wiki'">
39 <xsl:call-template name="WikiLink"/>
40 </xsl:if>
41 <xsl:call-template name="IndexLink">
42 <xsl:with-param name="mode">individual</xsl:with-param>
43 </xsl:call-template>
44 <xsl:apply-templates select="Prerequisite" mode="individual"/>
45 <xsl:if test="SampleFiles">
46 <xsl:call-template name="SampleFiles">
47 <xsl:with-param name="mode"><xsl:value-of select="$mode"/></xsl:with-param>
48 </xsl:call-template>
49 </xsl:if>
50 <xsl:apply-templates select="Version"/>
51 </xsl:template>
52
53 <!-- <xsl:template match="Title">
54 <h2><xsl:apply-templates select="Text"/></h2>
55 </xsl:template>-->
56
57
58</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.