Last change
on this file since 26126 was 25472, checked in by ak19, 12 years ago |
- 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.4 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:output method="html"/>
|
---|
6 | <xsl:param name="gs-major-version"/>
|
---|
7 | <xsl:include href="common.xsl"/>
|
---|
8 |
|
---|
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="TutorialList">
|
---|
13 | <html>
|
---|
14 | <head>
|
---|
15 | <title><xsl:apply-templates select="Title/Text"/></title>
|
---|
16 | </head>
|
---|
17 | <body>
|
---|
18 | <h2><xsl:apply-templates select="Title/Text"/></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="all_tutorials.html"><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='print']"/></a>
|
---|
21 | <xsl:if test="$mode='wiki'"><xsl:text> </xsl:text><xsl:call-template name="WikiLink"/></xsl:if>
|
---|
22 | </p>
|
---|
23 | <xsl:apply-templates select="Comment"/>
|
---|
24 | <dl>
|
---|
25 | <xsl:apply-templates select="Tutorial[not(@hidden)]"/>
|
---|
26 | </dl>
|
---|
27 |
|
---|
28 | <hr/><div style="text-align:center;"><xsl:apply-templates select="/TutorialList/SupplementaryText/Text[@id='copyright']"/></div>
|
---|
29 |
|
---|
30 | </body>
|
---|
31 | </html>
|
---|
32 | </xsl:template>
|
---|
33 |
|
---|
34 | <xsl:template match="Tutorial">
|
---|
35 | <dt><a href="{@id}.htm"><xsl:apply-templates select="Title/Text"/></a></dt>
|
---|
36 | <dd><xsl:for-each select="Content/Heading">
|
---|
37 | <xsl:apply-templates/><br/>
|
---|
38 | </xsl:for-each>
|
---|
39 | </dd>
|
---|
40 | </xsl:template>
|
---|
41 |
|
---|
42 | </xsl:stylesheet>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.