Changeset 3917


Ignore:
Timestamp:
2003-03-19T14:37:56+12:00 (21 years ago)
Author:
kjdon
Message:

some changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/resources/java/config_format.xsl

    r3843 r3917  
    2222      <xsl:copy-of select="@*"/>
    2323      <xsl:attribute name="priority">2</xsl:attribute>
     24      <xsl:if test=".//gsf:link/@type">
     25    <xslt:param name="serviceName">service-name</xslt:param>
     26      </xsl:if>
    2427      <xsl:if test=".//gsf:link">
    2528    <xslt:param name="collName">coll-name</xslt:param>
     
    3134 
    3235  <xsl:template match="gsf:link">
    33   <a><xsl:attribute name="href">{$library}?a=d&amp;c={$collName}&amp;d={@name}</xsl:attribute>
    34     <xsl:apply-templates/>
    35     </a>
     36    <xsl:choose>
     37      <xsl:when test="@type='classifier'">
     38    <a><xslt:attribute name='href'><xslt:value-of select='$library'/>?a=b&amp;s=<xslt:value-of select='$serviceName'/>&amp;c=<xslt:value-of select='$collName'/>&amp;cl=<xslt:value-of select='@nodeID'/><xslt:if test="classifierNode|documentNode">.pr</xslt:if></xslt:attribute>
     39      <xsl:apply-templates/>
     40    </a>
     41      </xsl:when>
     42      <xsl:otherwise> <!-- a document link -->
     43    <a><xsl:attribute name="href">{$library}?a=d&amp;c={$collName}&amp;d={@nodeID}</xsl:attribute>
     44      <xsl:apply-templates/>
     45    </a>
     46      </xsl:otherwise>
     47    </xsl:choose>
    3648  </xsl:template>
    3749
    3850  <xsl:template match="gsf:icon">
    39     <img src='interfaces/default/images/book.gif' width='18' height='11' border='0'/>
     51    <xsl:choose>
     52      <xsl:when test="@type='classifier'">
     53    <img src='interfaces/default/images/bshelf.gif' border='0' width='20' height='16' />
     54      </xsl:when>
     55      <xsl:otherwise>
     56    <xslt:apply-templates select="." mode="displayNodeIcon"/>
     57    <!--
     58    <img src='interfaces/default/images/book.gif' width='18' height='11' border='0'/>-->
     59      </xsl:otherwise>
     60    </xsl:choose>
    4061  </xsl:template>
    4162
     
    5778
    5879
     80<!-- copied from style for now-->
     81<!-- Display the appropriate image, depending on the node type -->
     82<xsl:template match="documentNode" mode="displayNodeIcon">
     83
     84  <!-- Root node: book icon (open or closed) -->
     85  <xsl:if test="@nodeType='root'">
     86    <xsl:choose>
     87      <xsl:when test="documentNode">
     88    <img border="0" width="28" height="23"
     89         src="interfaces/default/images/openbook.gif"
     90         alt="Close this book"/>
     91      </xsl:when>
     92      <xsl:otherwise>
     93    <img border="0" width="18" height="11"
     94         src="interfaces/default/images/book.gif"
     95         alt="Open this document and view contents"/>
     96      </xsl:otherwise>
     97    </xsl:choose>
     98  </xsl:if>
     99
     100  <!-- Interior node: folder icon (open or closed) -->
     101  <xsl:if test="@nodeType='interior'">
     102    <xsl:choose>
     103      <xsl:when test="documentNode">
     104    <img border="0" width="23" height="15"
     105         src="interfaces/default/images/openfldr.gif"
     106         alt="Close this folder"/>
     107      </xsl:when>
     108      <xsl:otherwise>
     109    <img border="0" width="23" height="15"
     110         src="interfaces/default/images/clsdfldr.gif"
     111         alt="Open this folder and view contents"/>
     112      </xsl:otherwise>
     113    </xsl:choose>
     114  </xsl:if>
     115
     116  <!-- Leaf node: page icon -->
     117  <xsl:if test="@nodeType='leaf'">
     118    <img border="0" width="16" height="21"
     119     src="interfaces/default/images/itext.gif"
     120     alt="View the document"/>
     121  </xsl:if>
     122</xsl:template>
     123
    59124</xsl:stylesheet>
    60125
Note: See TracChangeset for help on using the changeset viewer.