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