Changeset 3360 for trunk/gsdl3/interfaces/default/transform/style.xsl
- Timestamp:
- 2002-08-20T10:21:20+12:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/interfaces/default/transform/style.xsl
r3335 r3360 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 2 <xsl:stylesheet version="1.0" 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4 xmlns:java="http://xml.apache.org/xslt/java" 5 extension-element-prefixes="java"> 6 4 7 5 8 <xsl:output method="html"/> 9 6 10 7 11 <xsl:attribute-set name="body-style"> … … 11 15 <xsl:attribute name="alink">#cc9900</xsl:attribute> 12 16 <xsl:attribute name="vlink">#666633</xsl:attribute> 13 <xsl:attribute name="background"> /gsdl3/interfaces/default/images/chalk.gif</xsl:attribute>17 <xsl:attribute name="background">interfaces/default/images/chalk.gif</xsl:attribute> 14 18 </xsl:attribute-set> 15 19 … … 17 21 <xsl:template name="greenstoneHead"> 18 22 <head> 19 <title> New Zealand Digital Library</title>23 <title><xsl:call-template name="text"><xsl:with-param name="key">common/nzdl</xsl:with-param></xsl:call-template></title> 20 24 21 25 </head> … … 24 28 <xsl:template name="greenstonePageBanner"> 25 29 26 <!-- page banner (_style:pagebanner_) -->27 30 <center> 28 31 <table width="537" cellspacing="0" cellpadding="0"> 29 32 <tr valign="top"> 30 <td rowspan="2" align="left"><center><img src=" /gsdl3/interfaces/default/images/nzdl2gr.gif" width="457" height="181" alt="The New Zealand Digital Library"/></center></td>33 <td rowspan="2" align="left"><center><img src="interfaces/default/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">common/nzdl</xsl:with-param></xsl:call-template></xsl:attribute></img></center></td> 31 34 <td align="right"></td> 32 35 </tr> … … 60 63 <xsl:param name="collIcon"><xsl:value-of select="$collName"/>.gif</xsl:param> 61 64 <table width="537"> 62 <tr><td align="left"><a href="library?a=p&sa=about&c={$collName}"><img width="150" border="1"><xsl:attribute name="src">/gsdl3/sites/localsite/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute><xsl:attribute name="alt">about page</xsl:attribute></img></a></td><td align="right"><a href="library?a=p&sa=home">HOME</a></td></tr></table> 65 <tr><td align="left"><a href="library?a=p&sa=about&c={$collName}"><img width="150" border="1"><xsl:attribute name="src">sites/<xsl:value-of select="ancestor::page/config/site_name"/>/collect/<xsl:value-of select="$collName"/>/images/<xsl:value-of select="$collIcon"/></xsl:attribute><xsl:attribute name="alt"><xsl:call-template name="text"><xsl:with-param name="key">common/aboutpage</xsl:with-param></xsl:call-template></xsl:attribute></img></a></td><td align="right"><a href="library?a=p&sa=home"><xsl:call-template name="text"><xsl:with-param name="key">common/home</xsl:with-param></xsl:call-template></a></td></tr></table> 66 63 67 <xsl:call-template name="greenBar"/> 64 68 </xsl:template> … … 66 70 67 71 <xsl:template name="greenBar"> 68 <p/><img src=" /gsdl3/interfaces/default/images/divb.gif" width="537" height="17"/>72 <p/><img src="interfaces/default/images/divb.gif" width="537" height="17"/> 69 73 </xsl:template> 74 75 76 77 <!-- text stuff. can be called via xsl:call-template: 78 79 <xsl:call-template name="text"><xsl:with-param name="key">your text name here</xsl:with-param></xsl:call-template> 80 81 otherwise can be selected by : 82 83 <xsl:apply-templates select="text"/> 84 85 the text elem to be processed must be in the form 86 <text name="query/about"/> 87 88 --> 89 90 <xsl:template name="text" match="text"> 91 92 <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param> 93 94 <!-- try the current language --> 95 96 <xsl:variable name="path1">ancestor::page/translate/current/text/<xsl:value-of select="$key"/></xsl:variable> 97 <xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path1)"/></xsl:variable> 98 <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when> 99 <xsl:otherwise> 100 101 <!-- try the default language --> 102 <xsl:variable name="path2">ancestor::page/translate/default/text/<xsl:value-of select="$key"/></xsl:variable> 103 <xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path2)"/> 104 </xsl:otherwise> 105 </xsl:choose> 106 </xsl:template> 107 70 108 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.