source: documentation/trunk/tutorials/processing/xml-to-wiki-index.xsl

Last change on this file was 33781, checked in by kjdon, 4 years ago

tidied up the intro

  • Property svn:keywords set to Author Date Id Revision
File size: 1.9 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
7 <xsl:include href="common.xsl"/>
8
9 <xsl:output method="text"/>
10
11 <xsl:variable name="currentfolder">gs<xsl:value-of select="$gs-major-version"/>-current</xsl:variable>
12 <xsl:variable name="server-scriptpath">http://wiki.greenstone.org/</xsl:variable>
13 <xsl:variable name="sampledir"><xsl:value-of select="$server-scriptpath"/>/gsdoc/tutorial/<xsl:value-of select="$currentfolder"/>/sample_files</xsl:variable>
14 <xsl:variable name="htmldir"><xsl:value-of select="$server-scriptpath"/>/gsdoc/tutorial/<xsl:value-of select="$currentfolder"/></xsl:variable>
15
16 <xsl:template match="TutorialList">
17'''<xsl:apply-templates select="Title/Text"/>'''<xsl:text>
18</xsl:text>
19 * These 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>
20</xsl:text>
21 * Each tutorial that requires sample files has a link to a zip download of the files. Alternatively, you can download all of the sample files for all of the tutorials in a single [[<xsl:value-of select="$sampledir"/>/sample_files.zip sample_files.zip]]. <xsl:text>
22</xsl:text>
23 * Tutorials for older versions of Greenstone can be found at the [[legacy:tutorials | Old Tutorials ]] page.<xsl:text>
24</xsl:text>
25 <xsl:apply-templates select="Tutorial"/>
26 </xsl:template>
27
28 <xsl:template match="Tutorial"><xsl:text>
29
30</xsl:text>
31**[[<xsl:value-of select="$htmldir"/>/en/<xsl:value-of select="@id"/>.htm|<xsl:apply-templates select="Title/Text"/>]]**
32<xsl:for-each select="Content//Synopsis">
33''<xsl:apply-templates/>''</xsl:for-each>
34 <xsl:for-each select="Content/Heading/Text">
35 * <xsl:apply-templates/>
36 </xsl:for-each>
37 </xsl:template>
38
39</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.