[5420] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[12724] | 2 | <xsl:stylesheet version="1.0"
|
---|
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 4 | xmlns:java="http://xml.apache.org/xalan/java"
|
---|
| 5 | extension-element-prefixes="java"
|
---|
| 6 | exclude-result-prefixes="java">
|
---|
[5420] | 7 |
|
---|
[6586] | 8 | <xsl:output method="html" encoding="UTF-8"/>
|
---|
[5420] | 9 |
|
---|
[12724] | 10 | <xsl:variable name="diction" select="java:Dictionary.new('en')"/>
|
---|
| 11 |
|
---|
| 12 |
|
---|
[5420] | 13 | <xsl:template match="Document">
|
---|
[5422] | 14 | <xsl:for-each select="Section">
|
---|
| 15 | <xsl:call-template name="processSection">
|
---|
| 16 | <xsl:with-param name="sectionHead" select="position()"/>
|
---|
| 17 | </xsl:call-template>
|
---|
| 18 | </xsl:for-each>
|
---|
[5420] | 19 | </xsl:template>
|
---|
| 20 |
|
---|
[5422] | 21 |
|
---|
[5420] | 22 | <xsl:template match="Reference">
|
---|
[11594] | 23 | <xsl:variable name="target" select="@target"/>
|
---|
| 24 | <a href="{@target}.htm"><xsl:value-of select="/Document//Section[@name=$target]/Title/Text"/></a>
|
---|
[5420] | 25 | </xsl:template>
|
---|
| 26 |
|
---|
[5422] | 27 |
|
---|
[5420] | 28 | <xsl:template match="Section"/>
|
---|
| 29 |
|
---|
[5422] | 30 |
|
---|
[5420] | 31 | <xsl:template match="Title"/>
|
---|
| 32 |
|
---|
[11594] | 33 | <xsl:template match="Text">
|
---|
| 34 | <p><xsl:apply-templates/></p>
|
---|
| 35 | </xsl:template>
|
---|
[5420] | 36 |
|
---|
| 37 | <xsl:template name="processSection">
|
---|
| 38 | <xsl:param name="sectionHead"/>
|
---|
| 39 |
|
---|
[5422] | 40 | <html>
|
---|
| 41 | <head>
|
---|
| 42 | <title>The Greenstone Librarian Interface - Help Pages</title>
|
---|
| 43 | </head>
|
---|
| 44 | <body bgcolor="#E0F0E0">
|
---|
| 45 | <table border="2" bgcolor="#B0D0B0" cellpadding="5" cellspacing="0" width="100%">
|
---|
| 46 | <tr>
|
---|
| 47 | <td align="center" width="15%">
|
---|
[6575] | 48 | <img height="45" src="../gatherer_medium.gif" width="45"/>
|
---|
[5422] | 49 | </td>
|
---|
| 50 | <td align="center" width="*">
|
---|
| 51 | <a name="{@name}">
|
---|
| 52 | <xsl:call-template name="processTitle">
|
---|
| 53 | <xsl:with-param name="sectionNumber" select="$sectionHead"/>
|
---|
| 54 | <xsl:with-param name="sectionTitle" select="Title"/>
|
---|
| 55 | </xsl:call-template>
|
---|
| 56 | </a>
|
---|
| 57 | </td>
|
---|
| 58 | <td align="center" width="15%">
|
---|
[6575] | 59 | <img height="45" src="../gatherer_medium.gif" width="45"/>
|
---|
[5422] | 60 | </td>
|
---|
| 61 | </tr>
|
---|
| 62 | </table>
|
---|
[5420] | 63 |
|
---|
[5422] | 64 | <xsl:apply-templates/>
|
---|
| 65 | </body>
|
---|
| 66 | </html>
|
---|
[5420] | 67 |
|
---|
| 68 | <xsl:for-each select="Section">
|
---|
| 69 | <xsl:call-template name="processSection">
|
---|
| 70 | <xsl:with-param name="sectionHead" select="concat($sectionHead, '.', position())"/>
|
---|
| 71 | </xsl:call-template>
|
---|
| 72 | </xsl:for-each>
|
---|
| 73 | </xsl:template>
|
---|
| 74 |
|
---|
[5422] | 75 |
|
---|
[5420] | 76 | <xsl:template name="processTitle">
|
---|
| 77 | <xsl:param name="sectionNumber"/>
|
---|
| 78 | <xsl:param name="sectionTitle"/>
|
---|
| 79 |
|
---|
[5422] | 80 | <font face="Verdana" size="5">
|
---|
| 81 | <strong>
|
---|
[11594] | 82 | <xsl:value-of select="concat($sectionNumber, ': ', $sectionTitle/Text)"/>
|
---|
[5422] | 83 | </strong>
|
---|
| 84 | </font>
|
---|
[5420] | 85 | </xsl:template>
|
---|
| 86 |
|
---|
[12724] | 87 | <xsl:template match="span|img|table|b|br|td|tr|u|i">
|
---|
| 88 | <xsl:copy><xsl:for-each select="@*"><xsl:copy/></xsl:for-each>
|
---|
| 89 | <xsl:apply-templates/>
|
---|
| 90 | </xsl:copy>
|
---|
| 91 | </xsl:template>
|
---|
| 92 |
|
---|
| 93 | <xsl:template match="AutoText">
|
---|
| 94 | <xsl:variable name="value"><xsl:choose><xsl:when test="@key"><xsl:value-of select="java:get($diction, @key, @args)"/></xsl:when><xsl:otherwise><xsl:value-of select="@text"/></xsl:otherwise></xsl:choose></xsl:variable>
|
---|
| 95 | <xsl:choose>
|
---|
| 96 | <xsl:when test="@type='button'">
|
---|
| 97 | <b><<xsl:value-of select="$value"/>></b>
|
---|
| 98 | </xsl:when>
|
---|
| 99 | <xsl:when test="@type='quoted'">
|
---|
| 100 | <xsl:text>"</xsl:text><xsl:value-of select="$value"/><xsl:text>"</xsl:text>
|
---|
| 101 | </xsl:when>
|
---|
| 102 | <xsl:when test="@type='italics'">
|
---|
| 103 | <i><xsl:value-of select="$value"/></i>
|
---|
| 104 | </xsl:when>
|
---|
| 105 | <xsl:when test="@type='plain'">
|
---|
| 106 | <xsl:value-of select="$value"/>
|
---|
| 107 | </xsl:when>
|
---|
| 108 | <xsl:when test="@type='bold'">
|
---|
| 109 | <b><xsl:value-of select="$value"/></b>
|
---|
| 110 | </xsl:when>
|
---|
| 111 | <xsl:otherwise>
|
---|
| 112 | <xsl:text>"</xsl:text><xsl:value-of select="$value"/><xsl:text>"</xsl:text>
|
---|
| 113 | </xsl:otherwise>
|
---|
| 114 | </xsl:choose>
|
---|
| 115 | </xsl:template>
|
---|
| 116 |
|
---|
[5420] | 117 | </xsl:stylesheet> |
---|