source: trunk/gli/help/gen-one-html.xsl@ 11597

Last change on this file since 11597 was 11594, checked in by kjdon, 18 years ago

modified for the new XML format that works with the translator

  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <xsl:output method="html" encoding="UTF-8"/>
5
6 <xsl:template match="Document">
7 <html>
8 <head>
9 <title>The Greenstone Librarian Interface - Help Pages</title>
10 </head>
11 <body bgcolor="#E0F0E0">
12 <xsl:for-each select="Section">
13 <xsl:call-template name="processSection">
14 <xsl:with-param name="sectionHead" select="position()"/>
15 </xsl:call-template>
16 </xsl:for-each>
17 </body>
18 </html>
19 </xsl:template>
20
21 <xsl:template match="Reference">
22 <xsl:variable name="target" select="@target"/>
23 <a href="#{@target}"><xsl:value-of select="/Document//Section[@name=$target]/Title/Text"/></a>
24 </xsl:template>
25
26 <xsl:template match="Section"/>
27
28 <xsl:template match="Title"/>
29
30
31 <xsl:template name="processSection">
32 <xsl:param name="sectionHead"/>
33
34 <xsl:if test="Title">
35 <a name="{@name}">
36 <xsl:call-template name="processTitle">
37 <xsl:with-param name="sectionNumber" select="$sectionHead"/>
38 <xsl:with-param name="sectionTitle" select="Title"/>
39 </xsl:call-template>
40 </a>
41 </xsl:if>
42
43 <xsl:apply-templates/>
44
45 <xsl:for-each select="Section">
46 <xsl:call-template name="processSection">
47 <xsl:with-param name="sectionHead" select="concat($sectionHead, '.', position())"/>
48 </xsl:call-template>
49 </xsl:for-each>
50 </xsl:template>
51
52
53 <xsl:template name="processTitle">
54 <xsl:param name="sectionNumber"/>
55 <xsl:param name="sectionTitle"/>
56
57 <xsl:choose>
58 <xsl:when test="contains($sectionNumber, '.')">
59 <h3>Section <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle/Text)"/></h3>
60 </xsl:when>
61 <xsl:otherwise>
62 <h1>Section <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle/Text)"/></h1>
63 </xsl:otherwise>
64 </xsl:choose>
65 </xsl:template>
66
67 <xsl:template match="Text">
68 <p><xsl:apply-templates/></p>
69 </xsl:template>
70
71</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.