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