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="Break">
|
---|
7 | <p/>
|
---|
8 | </xsl:template>
|
---|
9 |
|
---|
10 | <xsl:template match="Document">
|
---|
11 | <html>
|
---|
12 | <head>
|
---|
13 | <title>The Greenstone Librarian Interface - Help Pages</title>
|
---|
14 | </head>
|
---|
15 | <body bgcolor="#E0F0E0">
|
---|
16 | <xsl:for-each select="Section">
|
---|
17 | <!-- Skip the first section -->
|
---|
18 | <xsl:if test="position() > 1">
|
---|
19 | <xsl:call-template name="processSection">
|
---|
20 | <xsl:with-param name="sectionHead" select="position()"/>
|
---|
21 | </xsl:call-template>
|
---|
22 | </xsl:if>
|
---|
23 | </xsl:for-each>
|
---|
24 | </body>
|
---|
25 | </html>
|
---|
26 | </xsl:template>
|
---|
27 |
|
---|
28 | <xsl:template match="Reference">
|
---|
29 | <xsl:apply-templates/>
|
---|
30 | </xsl:template>
|
---|
31 |
|
---|
32 | <xsl:template match="Section"/>
|
---|
33 |
|
---|
34 | <xsl:template match="Title"/>
|
---|
35 |
|
---|
36 |
|
---|
37 | <xsl:template name="processSection">
|
---|
38 | <xsl:param name="sectionHead"/>
|
---|
39 |
|
---|
40 | <xsl:if test="Title">
|
---|
41 | <xsl:call-template name="processTitle">
|
---|
42 | <xsl:with-param name="sectionNumber" select="$sectionHead"/>
|
---|
43 | <xsl:with-param name="sectionTitle" select="Title"/>
|
---|
44 | </xsl:call-template>
|
---|
45 | </xsl:if>
|
---|
46 |
|
---|
47 | <xsl:apply-templates/>
|
---|
48 |
|
---|
49 | <xsl:for-each select="Section">
|
---|
50 | <xsl:call-template name="processSection">
|
---|
51 | <xsl:with-param name="sectionHead" select="concat($sectionHead, '.', position())"/>
|
---|
52 | </xsl:call-template>
|
---|
53 | </xsl:for-each>
|
---|
54 | </xsl:template>
|
---|
55 |
|
---|
56 |
|
---|
57 | <xsl:template name="processTitle">
|
---|
58 | <xsl:param name="sectionNumber"/>
|
---|
59 | <xsl:param name="sectionTitle"/>
|
---|
60 |
|
---|
61 | <xsl:choose>
|
---|
62 | <xsl:when test="contains($sectionNumber, '.')">
|
---|
63 | <h4><xsl:value-of select="$sectionTitle"/></h4>
|
---|
64 | </xsl:when>
|
---|
65 | <xsl:otherwise>
|
---|
66 | <h3><xsl:value-of select="$sectionTitle"/></h3>
|
---|
67 | </xsl:otherwise>
|
---|
68 | </xsl:choose>
|
---|
69 | </xsl:template>
|
---|
70 |
|
---|
71 | </xsl:stylesheet> |
---|