Changeset 4253 for trunk/gsdl3/web/interfaces/default/transform/style.xsl
- Timestamp:
- 2003-05-08T15:40:07+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/web/interfaces/default/transform/style.xsl
r4150 r4253 42 42 </xsl:attribute-set> 43 43 44 <!-- this should probably use a greenstone image rather than nzdl image -->45 44 <xsl:template name="greenstonePageBanner"> 46 45 <center> … … 129 128 <xsl:template match="documentNode" mode="displayNodeIcon"> 130 129 131 <!-- Root node: book icon (open or closed) -->132 <xsl:if test="@nodeType='root'">133 <xsl:choose>134 135 <img border="0" width="28" height="23"136 137 138 139 140 <img border="0" width="18" height="11"141 142 143 144 </xsl:choose>145 </xsl:if>146 147 <!-- Interior node: folder icon (open or closed) -->148 <xsl:if test="@nodeType='interior'">149 <xsl:choose>150 151 <img border="0" width="23" height="15"152 153 154 155 156 <img border="0" width="23" height="15"157 158 159 160 </xsl:choose>161 </xsl:if>162 130 <!-- Root node: book icon (open or closed) --> 131 <xsl:if test="@nodeType='root'"> 132 <xsl:choose> 133 <xsl:when test="documentNode"> 134 <img border="0" width="28" height="23" 135 src="interfaces/default/images/openbook.gif" 136 alt="Close this book"/> 137 </xsl:when> 138 <xsl:otherwise> 139 <img border="0" width="18" height="11" 140 src="interfaces/default/images/book.gif" 141 alt="Open this document and view contents"/> 142 </xsl:otherwise> 143 </xsl:choose> 144 </xsl:if> 145 146 <!-- Interior node: folder icon (open or closed) --> 147 <xsl:if test="@nodeType='interior'"> 148 <xsl:choose> 149 <xsl:when test="documentNode"> 150 <img border="0" width="23" height="15" 151 src="interfaces/default/images/openfldr.gif" 152 alt="Close this folder"/> 153 </xsl:when> 154 <xsl:otherwise> 155 <img border="0" width="23" height="15" 156 src="interfaces/default/images/clsdfldr.gif" 157 alt="Open this folder and view contents"/> 158 </xsl:otherwise> 159 </xsl:choose> 160 </xsl:if> 161 163 162 <!-- Leaf node: page icon --> 164 163 <xsl:if test="@nodeType='leaf'"> … … 181 180 182 181 the text elem to be processed must be in the form 183 <text name="query /about"/>182 <text name="query.about"/> 184 183 185 184 --> 186 185 187 <xsl:template name="text" match="text"> 188 <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param> 189 <xsl:variable name="path">ancestor::page/pageExtra/display/<xsl:value-of select='$key'/></xsl:variable> 190 <xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path)"/></xsl:variable> 191 <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when> 192 <xsl:otherwise> 193 194 <!-- no match found, output the name of the text string --> 195 _<xsl:value-of select="$key"/>_</xsl:otherwise> 196 </xsl:choose> 197 </xsl:template> 198 199 200 <!-- may not have to use this anymore--> 201 <xsl:template name="text-old" match="text-old"> 202 203 <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param> 204 205 <!-- try the current language --> 206 207 <xsl:variable name="path1">ancestor::page/translate/current/text/<xsl:value-of select="$key"/></xsl:variable> 208 <xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path1)"/></xsl:variable> 209 <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when> 210 <xsl:otherwise> 211 212 <!-- try the default language --> 213 <xsl:variable name="path2">ancestor::page/translate/default/text/<xsl:value-of select="$key"/></xsl:variable> 214 <xsl:variable name="string2"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path2)"/></xsl:variable> 215 <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when> 216 <xsl:otherwise> 217 218 <!-- no match found, output the name of the text string --> 219 _<xsl:value-of select="$key"/>_</xsl:otherwise> 220 </xsl:choose> 221 </xsl:otherwise> 222 </xsl:choose> 223 </xsl:template> 224 186 <!-- should we look in the display element, or dynamically get from resource bundles - would this mean they are reloaded everytime??--> 187 <xsl:template name="text" match="text"> 188 <xsl:param name="key"><xsl:value-of select="@name"/></xsl:param> 189 <xsl:variable name="path">ancestor::page/pageExtra/display/<xsl:value-of select='$key'/></xsl:variable> 190 <xsl:variable name="string1"><xsl:value-of select="java:org.apache.xalan.lib.Extensions.evaluate($path)"/></xsl:variable> 191 <xsl:choose><xsl:when test="boolean(string($string1))"><xsl:value-of select="$string1"/></xsl:when> 192 <xsl:otherwise> 193 <!-- no match found, output the name of the text string --> 194 _<xsl:value-of select="$key"/>_</xsl:otherwise> 195 </xsl:choose> 196 </xsl:template> 197 225 198 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.