[5416] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 2 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
| 3 |
|
---|
[6586] | 4 | <xsl:output method="html" encoding="UTF-8"/>
|
---|
[5416] | 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 | <!-- Skip the first section -->
|
---|
| 14 | <xsl:if test="position() > 1">
|
---|
| 15 | <xsl:call-template name="processSection">
|
---|
| 16 | <xsl:with-param name="sectionHead" select="position()"/>
|
---|
| 17 | </xsl:call-template>
|
---|
| 18 | </xsl:if>
|
---|
| 19 | </xsl:for-each>
|
---|
| 20 | </body>
|
---|
| 21 | </html>
|
---|
| 22 | </xsl:template>
|
---|
| 23 |
|
---|
| 24 | <xsl:template match="Reference">
|
---|
[11594] | 25 | <xsl:variable name="target" select="@target"/>
|
---|
| 26 | <xsl:value-of select="/Document//Section[@name=$target]/Title/Text"/>
|
---|
[5416] | 27 | </xsl:template>
|
---|
| 28 |
|
---|
| 29 | <xsl:template match="Section"/>
|
---|
| 30 |
|
---|
| 31 | <xsl:template match="Title"/>
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | <xsl:template name="processSection">
|
---|
| 35 | <xsl:param name="sectionHead"/>
|
---|
| 36 |
|
---|
| 37 | <xsl:if test="Title">
|
---|
| 38 | <xsl:call-template name="processTitle">
|
---|
| 39 | <xsl:with-param name="sectionNumber" select="$sectionHead"/>
|
---|
| 40 | <xsl:with-param name="sectionTitle" select="Title"/>
|
---|
| 41 | </xsl:call-template>
|
---|
| 42 | </xsl:if>
|
---|
| 43 |
|
---|
| 44 | <xsl:apply-templates/>
|
---|
| 45 |
|
---|
| 46 | <xsl:for-each select="Section">
|
---|
| 47 | <xsl:call-template name="processSection">
|
---|
| 48 | <xsl:with-param name="sectionHead" select="concat($sectionHead, '.', position())"/>
|
---|
| 49 | </xsl:call-template>
|
---|
| 50 | </xsl:for-each>
|
---|
| 51 | </xsl:template>
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 | <xsl:template name="processTitle">
|
---|
| 55 | <xsl:param name="sectionNumber"/>
|
---|
| 56 | <xsl:param name="sectionTitle"/>
|
---|
| 57 |
|
---|
| 58 | <xsl:choose>
|
---|
| 59 | <xsl:when test="contains($sectionNumber, '.')">
|
---|
[11594] | 60 | <h4><xsl:value-of select="$sectionTitle/Text"/></h4>
|
---|
[5416] | 61 | </xsl:when>
|
---|
| 62 | <xsl:otherwise>
|
---|
[11594] | 63 | <h3><xsl:value-of select="$sectionTitle/Text"/></h3>
|
---|
[5416] | 64 | </xsl:otherwise>
|
---|
| 65 | </xsl:choose>
|
---|
| 66 | </xsl:template>
|
---|
| 67 |
|
---|
[11594] | 68 | <xsl:template match="Text">
|
---|
| 69 | <p><xsl:apply-templates/></p>
|
---|
| 70 | </xsl:template>
|
---|
| 71 |
|
---|
[5416] | 72 | </xsl:stylesheet> |
---|