Ignore:
Timestamp:
2003-05-08T15:40:07+12:00 (21 years ago)
Author:
kjdon
Message:

lots of changes for lots of stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/web/interfaces/default/transform/style.xsl

    r4150 r4253  
    4242  </xsl:attribute-set>
    4343   
    44   <!-- this should probably use a greenstone image rather than nzdl image -->
    4544  <xsl:template name="greenstonePageBanner">
    4645    <center>
     
    129128  <xsl:template match="documentNode" mode="displayNodeIcon">
    130129   
    131   <!-- Root node: book icon (open or closed) -->
    132   <xsl:if test="@nodeType='root'">
    133     <xsl:choose>
    134       <xsl:when test="documentNode">
    135     <img border="0" width="28" height="23"
    136          src="interfaces/default/images/openbook.gif"
    137          alt="Close this book"/>
    138       </xsl:when>
    139       <xsl:otherwise>
    140     <img border="0" width="18" height="11"
    141          src="interfaces/default/images/book.gif"
    142          alt="Open this document and view contents"/>
    143       </xsl:otherwise>
    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       <xsl:when test="documentNode">
    151     <img border="0" width="23" height="15"
    152          src="interfaces/default/images/openfldr.gif"
    153          alt="Close this folder"/>
    154       </xsl:when>
    155       <xsl:otherwise>
    156     <img border="0" width="23" height="15"
    157          src="interfaces/default/images/clsdfldr.gif"
    158          alt="Open this folder and view contents"/>
    159       </xsl:otherwise>
    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   
    163162  <!-- Leaf node: page icon -->
    164163  <xsl:if test="@nodeType='leaf'">
     
    181180
    182181the text elem to be processed must be in the form
    183 <text name="query/about"/>
     182<text name="query.about"/>
    184183
    185184-->
    186185
    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 
    225198</xsl:stylesheet> 
Note: See TracChangeset for help on using the changeset viewer.