Ignore:
Timestamp:
2009-01-06T14:52:16+13:00 (15 years ago)
Author:
kjdon
Message:

made the indentation nice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/gs2/transform/document.xsl

    r18315 r18318  
    1313  <xsl:output method="html"/>
    1414 
    15  
    16 
    1715  <!-- the main page layout template is here -->
    1816  <!-- override the one in style so we can display the doc over the whole page and get rid of the green bar down the side -->
    1917  <xsl:template match="page" priority='2'>
    2018    <html>
    21     <head>
    22       <title>
    23     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    24     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    25       </title>
    26       <xsl:call-template name="globalStyle"/>
    27       <xsl:call-template name="pageStyle"/>
    28     </head>
     19      <head>
     20    <title>
     21      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     22      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     23    </title>
     24    <xsl:call-template name="globalStyle"/>
     25    <xsl:call-template name="pageStyle"/>
     26      </head>
    2927      <body>
    3028        <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    3129        <div id="page">
    32            <xsl:apply-templates select="pageResponse"/>
    33        <xsl:call-template name="greenstoneFooter"/>
     30      <xsl:apply-templates select="pageResponse"/>
     31      <xsl:call-template name="greenstoneFooter"/>
    3432    </div> 
    35        </body>
     33      </body>
    3634    </html>
    3735  </xsl:template>
     
    6462    </xsl:call-template>
    6563    <div class="document">     
    66     <!-- display the document -->
    67     <xsl:apply-templates select="document">
    68       <xsl:with-param name="collName" select="$collName"/>
    69     </xsl:apply-templates>
    70    </div>
    71   </xsl:template>
     64      <!-- display the document -->
     65      <xsl:apply-templates select="document">
     66    <xsl:with-param name="collName" select="$collName"/>
     67      </xsl:apply-templates>
     68    </div>
     69  </xsl:template>
     70 
     71  <xsl:template match="document">
     72    <xsl:param name="collName"/>
     73
     74    <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
     75    <xsl:choose><xsl:when test="$external != ''">
     76    <xsl:call-template name="externalPage">
     77      <xsl:with-param name="external" select="$external"/>
     78    </xsl:call-template>
     79      </xsl:when>
     80      <xsl:otherwise>
    7281   
    73   <xsl:template match="document">
    74     <xsl:param name="collName"/>
    75 
    76     <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
    77     <xsl:choose><xsl:when test="$external != ''">
    78         <xsl:call-template name="externalPage">
    79           <xsl:with-param name="external" select="$external"/>
    80         </xsl:call-template>
    81       </xsl:when>
    82       <xsl:otherwise>
    83        
    8482    <xsl:call-template name="documentHeading">
    85       <xsl:with-param name="collName" select="$collName"/>
    86     </xsl:call-template>
    87    
    88     <xsl:call-template name="documentArrows">
    89       <xsl:with-param name="collName" select="$collName"/>
    90     </xsl:call-template>         
    91     <xsl:call-template name="documentContent">
    92       <xsl:with-param name="collName" select="$collName"/>
    93     </xsl:call-template>
    94     <xsl:call-template name="documentArrows">
    95       <xsl:with-param name="collName" select="$collName"/>
    96     </xsl:call-template>
    97     <br/>
     83      <xsl:with-param name="collName" select="$collName"/>
     84    </xsl:call-template>
     85   
     86    <xsl:call-template name="documentArrows">
     87      <xsl:with-param name="collName" select="$collName"/>
     88    </xsl:call-template>         
     89    <xsl:call-template name="documentContent">
     90      <xsl:with-param name="collName" select="$collName"/>
     91    </xsl:call-template>
     92    <xsl:call-template name="documentArrows">
     93      <xsl:with-param name="collName" select="$collName"/>
     94    </xsl:call-template>
     95    <br/>
    9896      </xsl:otherwise></xsl:choose>
    9997  </xsl:template>
     
    107105   
    108106    <div class="documentarrows">
    109     <xsl:if test="not(string($ed)='1')">
    110        <xsl:call-template name="documentArrow">
    111         <xsl:with-param name="collName" select="$collName"/>
    112         <xsl:with-param name="direction" select="$firstDir"/>
    113         <xsl:with-param name="pageDir" select="$dir"/>
    114      </xsl:call-template>
    115     <xsl:call-template name="documentArrow">
    116       <xsl:with-param name="collName" select="$collName"/>
    117       <xsl:with-param name="direction" select="$secondDir"/>
    118       <xsl:with-param name="pageDir" select="$dir"/>
    119     </xsl:call-template>
    120     </xsl:if>
     107      <xsl:if test="not(string($ed)='1')">
     108    <xsl:call-template name="documentArrow">
     109      <xsl:with-param name="collName" select="$collName"/>
     110      <xsl:with-param name="direction" select="$firstDir"/>
     111      <xsl:with-param name="pageDir" select="$dir"/>
     112    </xsl:call-template>
     113    <xsl:call-template name="documentArrow">
     114      <xsl:with-param name="collName" select="$collName"/>
     115      <xsl:with-param name="direction" select="$secondDir"/>
     116      <xsl:with-param name="pageDir" select="$dir"/>
     117    </xsl:call-template>
     118      </xsl:if>
    121119    </div>   
    122120  </xsl:template>
     
    126124    <xsl:param name="direction"/>
    127125    <xsl:param name="pageDir"/>
    128        
     126   
    129127    <xsl:variable name="disp">
    130         <xsl:choose>
    131             <xsl:when test="$direction ='back' and nodeStructureInfo/info[@name='siblingPosition']/@value = -1">n</xsl:when>
    132             <xsl:when test="$direction ='forward' and nodeStructureInfo/info[@name='siblingPosition']/@value = nodeStructureInfo/info[@name='numSiblings']/@value">n</xsl:when>         
    133             <xsl:otherwise>y</xsl:otherwise>
    134         </xsl:choose>
     128      <xsl:choose>
     129    <xsl:when test="$direction ='back' and nodeStructureInfo/info[@name='siblingPosition']/@value = -1">n</xsl:when>
     130    <xsl:when test="$direction ='forward' and nodeStructureInfo/info[@name='siblingPosition']/@value = nodeStructureInfo/info[@name='numSiblings']/@value">n</xsl:when>         
     131    <xsl:otherwise>y</xsl:otherwise>
     132      </xsl:choose>
    135133    </xsl:variable>
    136134
    137135    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
    138136    <xsl:if test='$request-params/param[@name="dt"]/@value != "simple" and $disp = "y"'> 
    139     <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose>
    140     <xsl:when test="$direction='back'"><img class="lessarrow{$pageDir}" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow{$pageDir}" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
     137      <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose>
     138      <xsl:when test="$direction='back'"><img class="lessarrow{$pageDir}" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow{$pageDir}" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
    141139    </xsl:if>
    142140  </xsl:template>
    143          
     141 
    144142
    145143  <xsl:template name="documentHeading">
     
    152150    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    153151    <div id="documentheading">
    154       <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
    155       </xsl:call-template></a>
    156          <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
    157   </div>
    158 
    159  <div id="docheadwrapper">
    160   <div id="documentinfo">
     152      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
     153    </xsl:call-template></a>
     154      <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose>
     155    </div>
     156
     157    <div id="docheadwrapper">
     158      <div id="documentinfo">
    161159        <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
    162160          <div id="headingimage">
    163              <xsl:call-template name="coverImage"/>
     161        <xsl:call-template name="coverImage"/>
    164162          </div>
    165163        </xsl:if>
    166      
     164   
    167165        <ul id="docbuttons" >
    168          <xsl:call-template name="documentButtons">
    169        <xsl:with-param name="collName" select="$collName"/>
    170          </xsl:call-template>
    171        </ul>
    172   </div>
    173    
     166      <xsl:call-template name="documentButtons">
     167        <xsl:with-param name="collName" select="$collName"/>
     168      </xsl:call-template>
     169    </ul>
     170      </div>
     171     
    174172      <!--<div><xsl:call-template name="enrichServices">
     173      <xsl:with-param name="collName" select="$collName"/>
     174    </xsl:call-template></div>-->
     175     
     176      <xsl:if test="string($doTOC) != 'false'">
     177    <div id="toc">
     178      <xsl:call-template name="TOC">
    175179        <xsl:with-param name="collName" select="$collName"/>
    176       </xsl:call-template></div>-->
    177  
    178     <xsl:if test="string($doTOC) != 'false'">
    179        <div id="toc">
    180      <xsl:call-template name="TOC">
    181        <xsl:with-param name="collName" select="$collName"/>
    182      </xsl:call-template>
    183       </div>
    184     </xsl:if>
     180      </xsl:call-template>
     181    </div>
     182      </xsl:if>
    185183    </div>
    186    </xsl:template>
     184  </xsl:template>
    187185
    188186  <xsl:template name="coverImage">
     
    202200    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
    203201    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    204      
    205       <!-- expand document -->
    206       <!-- this doesn't work with MG so comment it out for now -->     
    207       <!--<xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">-->
    208       <!-- shouldn't appear for paged document -->
    209       <xsl:if test="@docType = 'hierarchy'">
     202   
     203    <!-- expand document -->
     204    <xsl:if test="@docType = 'hierarchy'">
    210205      <div class="button">
    211206        <span class="button">
    212207      <xsl:choose><xsl:when test="string($ed)='1'">
    213208          <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
    214           <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
     209        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
    215210          </a>
    216211        </xsl:when>
    217212        <xsl:otherwise>
    218             <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
    219        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
     213          <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
     214        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
    220215          </a>
    221216        </xsl:otherwise>
    222217      </xsl:choose>
    223          </span>
    224     </div>
    225       </xsl:if>
    226      
    227       <!-- expand contents -->
    228       <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
     218    </span>
     219      </div>
     220    </xsl:if>
     221   
     222    <!-- expand contents -->
     223    <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
    229224      <div class="button">
    230225        <span class="button">
    231226      <xsl:choose><xsl:when test="string($ec)='1'">
    232227          <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
    233          <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/>
     228        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/>
    234229          </a>
    235230        </xsl:when>
     
    240235        </xsl:otherwise>
    241236      </xsl:choose>
    242      </span>
    243     </div>
    244       </xsl:if>
    245       <!-- detach page -->
    246       <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
    247       <div class="button">
    248         <span class="button">
    249       <a  target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
    250         <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
    251       </a>
    252          </span>
     237    </span>
    253238      </div>
    254    </xsl:template>
     239    </xsl:if>
     240    <!-- detach page -->
     241    <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
     242    <div class="button">
     243      <span class="button">
     244    <a  target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute>
     245      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
     246    </a>
     247      </span>
     248    </div>
     249  </xsl:template>
    255250
    256251  <xsl:template name="TOC">
     
    269264    </xsl:choose>
    270265  </xsl:template>
    271    
     266 
    272267  <xsl:template name="hierarchicalContents">
    273268    <xsl:param name="collName"/>
     
    284279   
    285280    <xsl:if test="documentNode[@nodeID]">
    286     <ul id="tocnodes">
     281      <ul id="tocnodes">
    287282    <li>
    288         <xsl:choose><xsl:when test="string($oc)='0'">
    289         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
    290           </xsl:when>
    291           <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose>
     283      <xsl:choose><xsl:when test="string($oc)='0'">
     284          <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a>
     285        </xsl:when>
     286        <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose>
    292287      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
    293     <xsl:if test="string($oc)!='0'">
    294       <ul class="tocnode">
    295         <xsl:for-each select="documentNode/documentNode[@nodeID]">
    296           <xsl:apply-templates select='.'>
     288      <xsl:if test="string($oc)!='0'">
     289        <ul class="tocnode">
     290          <xsl:for-each select="documentNode/documentNode[@nodeID]">
     291        <xsl:apply-templates select='.'>
    297292          <xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/>
    298293         
     
    304299         
    305300        </xsl:apply-templates>
    306         </xsl:for-each>
    307          </ul>
     301          </xsl:for-each>
     302        </ul>
    308303      </xsl:if>
    309  </li>
     304    </li>
    310305      </ul>
    311306    </xsl:if>
     
    323318    <xsl:param name="p.c"/>
    324319    <!-- Display the appropriate image, depending on the node type -->
    325        
    326      <li>
    327     <!--
    328     <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
    329     -->
     320   
     321    <li>
     322      <!--
     323      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
     324      -->   
     325     
     326      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
    330327   
    331     <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
    332    
    333       <xsl:apply-templates select="." mode="displayNodeIcon"/>
    334     </a>
     328    <xsl:apply-templates select="." mode="displayNodeIcon"/>
     329      </a>
    335330     
    336331      <!-- Display associated title, bolded if the node has content -->
    337     <xsl:choose>
    338       <xsl:when test="nodeContent">
    339          <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
    340       </xsl:when>
    341       <xsl:otherwise>
    342         <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
    343       </xsl:otherwise>
    344     </xsl:choose>
    345 
    346     <!-- Apply recursively to the children of this node -->
    347     <xsl:if test="documentNode[@nodeID]">
    348      
    349          <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
    350           <xsl:with-param name="collName" select="$collName"/>
    351           <xsl:with-param name="ec" select="$ec"/>
    352          
    353           <!-- added parameters -->
    354           <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
    355           <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
    356         </xsl:apply-templates>
    357        </ul>
     332      <xsl:choose>
     333    <xsl:when test="nodeContent">
     334      <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
     335    </xsl:when>
     336    <xsl:otherwise>
     337      <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
     338    </xsl:otherwise>
     339      </xsl:choose>
     340
     341      <!-- Apply recursively to the children of this node -->
     342      <xsl:if test="documentNode[@nodeID]">
     343   
     344    <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
     345        <xsl:with-param name="collName" select="$collName"/>
     346        <xsl:with-param name="ec" select="$ec"/>
     347       
     348        <!-- added parameters -->
     349        <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/>
     350        <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
     351      </xsl:apply-templates>
     352    </ul>
    358353      </xsl:if>
    359354    </li>
     
    380375      </xsl:if>
    381376      <xsl:apply-templates select="nodeContent"/>
    382       </xsl:if>
     377    </xsl:if>
    383378   
    384379  </xsl:template>
     
    422417    <xsl:variable name="serviceargs">
    423418      <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
    424   </xsl:variable>
     419    </xsl:variable>
    425420    <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
    426421  </xsl:template>
     
    439434    <!-- parameters for the bookicon to work properly -->
    440435    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
    441     <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
    442     <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
    443     <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
     436    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
     437    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
     438    <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    444439
    445440    <xsl:choose>
    446     <xsl:when test="$pos=-1"><!-- a doc -->
    447       <tr valign="top">
    448         <td align="left">
    449         </td>
    450         <td align="center"><center>
    451         <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
    452           </center></td>
    453         <td align="right">
    454           <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
    455         </td>
    456       </tr>
    457     </xsl:when>
    458    
    459     <xsl:otherwise> <!-- an internal node -->     
    460       <tr valign="top">
    461         <td align="left">
    462           <xsl:if test=" not ( $pos = 1 )">
    463         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
    464           </xsl:if>
    465         </td>
    466         <td align="center"><center>
    467         <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
    468           </center></td>
    469         <td align="right">
    470           <xsl:if test=" not($pos = $length)">
    471         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
    472           </xsl:if>
    473         </td>
    474       </tr>
    475     </xsl:otherwise>
    476       </xsl:choose>
    477       <tr valign="middle">
    478     <td align='center' valign='top' colspan='3'>
    479       <form name="GotoForm" method="get" action="{$library_name}">
    480         <input type='hidden' name='a' value='d'/>
    481         <input type='hidden' name='c' value='{$collName}'/>
    482         <!--<input type='hidden' name='d' value='{@selectedNode}'/>-->
    483         <input type='hidden' name='d'>
    484             <xsl:attribute name='value'>
    485                 <xsl:if test="contains(@selectedNode, '.')"><xsl:value-of select="@selectedNode"/></xsl:if>
    486                 <xsl:if test="not(contains(@selectedNode, '.'))"><xsl:value-of select="@selectedNode"/>.0</xsl:if>
    487             </xsl:attribute>
    488         </input>               
    489        
    490         <input type='hidden' name='p.s' value='{$p.s}'/>
    491         <input type='hidden' name='p.sa' value='{$p.sa}'/>
    492         <input type='hidden' name='p.a' value='{$p.a}'/>
    493         <input type='hidden' name='p.c' value='{$p.c}'/>   
    494        
    495         <input type="text" name="gp" size="3" maxlength="4"/>
    496         <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
    497       </form>
    498     </td>
    499       </tr>
    500    </xsl:template>
     441      <xsl:when test="$pos=-1"><!-- a doc -->
     442    <tr valign="top">
     443      <td align="left">
     444      </td>
     445      <td align="center"><center>
     446          <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
     447        </center></td>
     448      <td align="right">
     449        <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
     450      </td>
     451    </tr>
     452      </xsl:when>
     453     
     454      <xsl:otherwise> <!-- an internal node -->   
     455    <tr valign="top">
     456      <td align="left">
     457        <xsl:if test=" not ( $pos = 1 )">
     458          <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
     459        </xsl:if>
     460      </td>
     461      <td align="center"><center>
     462          <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
     463        </center></td>
     464      <td align="right">
     465        <xsl:if test=" not($pos = $length)">
     466          <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
     467        </xsl:if>
     468      </td>
     469    </tr>
     470      </xsl:otherwise>
     471    </xsl:choose>
     472    <tr valign="middle">
     473      <td align='center' valign='top' colspan='3'>
     474    <form name="GotoForm" method="get" action="{$library_name}">
     475      <input type='hidden' name='a' value='d'/>
     476      <input type='hidden' name='c' value='{$collName}'/>
     477      <!--<input type='hidden' name='d' value='{@selectedNode}'/>-->
     478      <input type='hidden' name='d'>
     479        <xsl:attribute name='value'>
     480          <xsl:if test="contains(@selectedNode, '.')"><xsl:value-of select="@selectedNode"/></xsl:if>
     481          <xsl:if test="not(contains(@selectedNode, '.'))"><xsl:value-of select="@selectedNode"/>.0</xsl:if>
     482        </xsl:attribute>
     483      </input>             
     484     
     485      <input type='hidden' name='p.s' value='{$p.s}'/>
     486      <input type='hidden' name='p.sa' value='{$p.sa}'/>
     487      <input type='hidden' name='p.a' value='{$p.a}'/>
     488      <input type='hidden' name='p.c' value='{$p.c}'/>   
     489     
     490      <input type="text" name="gp" size="3" maxlength="4"/>
     491      <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
     492    </form>
     493      </td>
     494    </tr>
     495  </xsl:template>
    501496 
    502497  <xsl:template name="enrichServices">
     
    535530
    536531  <xsl:template name="externalPage">
    537      <xsl:param name="external"/>
    538      <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
     532    <xsl:param name="external"/>
     533    <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
    539534    <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
    540535    <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
Note: See TracChangeset for help on using the changeset viewer.