source: documentation/trunk/tutorials/processing/xml-to-wiki-index.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.5 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:param name="gs-major-version"/>
6 <xsl:include href="common.xsl"/>
7
8 <xsl:output method="text"/>
9
10 <xsl:variable name="es">Spanish</xsl:variable>
11 <xsl:variable name="fr">French</xsl:variable>
12 <xsl:variable name="ru">Russian</xsl:variable>
13 <xsl:variable name="sampledir">{{SERVER}}{{SCRIPTPATH}}/gsdoc/tutorial/sample_files</xsl:variable>
14 <xsl:variable name="htmldir">{{SERVER}}{{SCRIPTPATH}}/gsdoc/tutorial</xsl:variable>
15 <xsl:template match="TutorialList">
16'''<xsl:apply-templates select="Title/Text"/>'''<xsl:text>
17</xsl:text>
18These work with Greenstone <xsl:value-of select="Version/@current"/>. [<xsl:value-of select="$htmldir"/>/en/all_tutorials.html <xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='print']"/>]<xsl:text>
19</xsl:text>
20Translations of March 2006 version (for Greenstone 2.70):
21[<xsl:value-of select="$htmldir"/>/es/index.html <xsl:value-of select="$es"/>]
22[<xsl:value-of select="$htmldir"/>/fr/index.html <xsl:value-of select="$fr"/>]
23[<xsl:value-of select="$htmldir"/>/ru/index.html <xsl:value-of select="$ru"/>]<xsl:text>
24
25</xsl:text>
26 <xsl:apply-templates select="Tutorial"/>
27 </xsl:template>
28
29 <xsl:template match="Tutorial">
30==[<xsl:value-of select="$htmldir"/>/en/<xsl:value-of select="@id"/>.htm <xsl:apply-templates select="Title/Text"/>]==
31 <xsl:for-each select="Content/Heading/Text">
32*<xsl:apply-templates/>
33 </xsl:for-each>
34 </xsl:template>
35
36</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.