Changeset 25370 for main/trunk


Ignore:
Timestamp:
2012-04-12T15:13:27+12:00 (12 years ago)
Author:
sjm84
Message:

Some fixes for the GS3 skin (I think)

File:
1 edited

Legend:

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

    r23972 r25370  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    2 <xsl:stylesheet version="1.0"
    3   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    4   xmlns:java="http://xml.apache.org/xslt/java"
    5   xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
    6   xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
    7   extension-element-prefixes="java util"
    8   exclude-result-prefixes="java util gsf">
    9 
    10 
     2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" version="1.0" extension-element-prefixes="java util" exclude-result-prefixes="java util gsf">
    113  <!-- style includes global params interface_name, library_name -->
    124  <xsl:include href="style.xsl"/>
    135  <xsl:include href="service-params.xsl"/>
    146  <xsl:include href="berrytools.xsl"/>
    15 
    167  <xsl:output method="html"/>
    17  
    188  <!-- the main page layout template is here -->
    199  <xsl:template match="page">
    20     <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
    21     <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/></xsl:variable>
    22 
    23     <xsl:choose>
     10    <xsl:variable name="bookswitch">
     11      <xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/>
     12    </xsl:variable>
     13    <xsl:variable name="a">
     14      <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>
     15    </xsl:variable>
     16    <xsl:choose>
    2417      <xsl:when test="$bookswitch = 'flashxml' and $a = 'd'">
    25     <html>
    26       <xsl:call-template name="response" />
     18        <html>
     19          <xsl:call-template name="response"/>
    2720        </html>
    2821      </xsl:when>
    29 
    30       <xsl:otherwise>   
     22      <xsl:otherwise>
    3123        <html>
    32       <head>
    33         <title>
    34           <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    35           <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    36         </title>
    37         <xsl:call-template name="globalStyle"/>
    38         <xsl:call-template name="pageStyle"/>
    39       </head>
     24          <head>
     25            <title>
     26              <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     27              <xsl:call-template name="pageTitle"/>
     28              <xsl:text> </xsl:text>
     29            </title>
     30            <xsl:call-template name="globalStyle"/>
     31            <xsl:call-template name="pageStyle"/>
     32          </head>
    4033          <body>
    41         <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    42         <div id="page-wrapper">
    43           <xsl:call-template name="response" />
    44           <xsl:call-template name="greenstoneFooter"/>
    45         </div>
     34            <xsl:attribute name="dir">
     35              <xsl:call-template name="direction"/>
     36            </xsl:attribute>
     37            <div id="page-wrapper">
     38              <xsl:call-template name="response"/>
     39              <xsl:call-template name="greenstoneFooter"/>
     40            </div>
    4641          </body>
    4742        </html>
     
    4944    </xsl:choose>
    5045  </xsl:template>
    51  
    52  
    53   <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
    54   <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable>
    55  
     46  <xsl:variable name="berrybasketswitch">
     47    <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/>
     48  </xsl:variable>
     49  <xsl:variable name="bookswitch">
     50    <xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/>
     51  </xsl:variable>
    5652  <xsl:template name="pageTitle">
    5753    <xsl:variable name="docID" select="/page/pageResponse/document/@selectedNode"/>
    58     <xsl:for-each select='/page/pageResponse/document/descendant::documentNode[@nodeID=$docID]/ancestor-or-self::documentNode'><xsl:if test='position()!=1'>::</xsl:if><xsl:value-of select="metadataList/metadata[@name='Title']"/></xsl:for-each>
    59   </xsl:template>
    60 
     54    <xsl:for-each select="/page/pageResponse/document/descendant::documentNode[@nodeID=$docID]/ancestor-or-self::documentNode">
     55      <xsl:if test="position()!=1">::</xsl:if>
     56      <xsl:value-of select="metadataList/metadata[@name='Title']"/>
     57    </xsl:for-each>
     58  </xsl:template>
    6159  <!-- this is hard coded for GATE, should somehow do it dynamically-->
    6260  <xsl:template name="pageStyle">
     
    7068      </xsl:text>
    7169    </style>
    72 
    7370    <!--TODO: add berry basket switch-->
    7471    <!--<xsl:if test="$berryBaskets = 'true'">-->
    7572    <xsl:if test="$berrybasketswitch = 'on'">
    76       <xsl:call-template name="berryStyleSheet"/> 
     73      <xsl:call-template name="berryStyleSheet"/>
    7774      <xsl:call-template name="js-library"/>
    7875    </xsl:if>
    7976  </xsl:template>
    80  
    8177  <xsl:template match="pageResponse">
    82     <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
     78    <xsl:variable name="collName">
     79      <xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     80    </xsl:variable>
    8381    <xsl:choose>
    8482      <xsl:when test="$bookswitch = 'on' or $bookswitch = 'off'">
    8583        <xsl:call-template name="standardPageBanner">
    86       <xsl:with-param name="collName" select="$collName"/>
     84          <xsl:with-param name="collName" select="$collName"/>
    8785        </xsl:call-template>
    8886        <xsl:call-template name="navigationBar">
    89       <xsl:with-param name="collName" select="$collName"/>
     87          <xsl:with-param name="collName" select="$collName"/>
    9088        </xsl:call-template>
    91    
    9289        <!--<xsl:if test="$berryBaskets = 'true'">-->
    9390        <xsl:if test="$berrybasketswitch = 'on'">
    9491          <xsl:call-template name="documentBerryBasket">
    95         <xsl:with-param name="collName" select="$collName"/>
    96         <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
    97         <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
    98         <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
     92            <xsl:with-param name="collName" select="$collName"/>
     93            <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
     94            <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
     95            <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
    9996          </xsl:call-template>
    10097        </xsl:if>
    10198      </xsl:when>
    102     </xsl:choose>   
    103 
     99    </xsl:choose>
    104100    <!-- display the document -->
    105101    <xsl:if test="$bookswitch != 'flashxml'">
     
    113109    </xsl:if>
    114110  </xsl:template>
    115  
    116111  <xsl:template match="document">
    117112    <xsl:param name="collName"/>
    118     <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
     113    <xsl:variable name="external">
     114      <xsl:value-of select="/page/pageResponse/document/@external"/>
     115    </xsl:variable>
    119116    <xsl:choose>
    120117      <xsl:when test="$external != ''">
    121     <xsl:call-template name="externalPage">
    122       <xsl:with-param name="external" select="$external"/>
    123     </xsl:call-template>
     118        <xsl:call-template name="externalPage">
     119          <xsl:with-param name="external" select="$external"/>
     120        </xsl:call-template>
    124121      </xsl:when>
    125122      <xsl:otherwise>
    126     <xsl:choose>
    127     <xsl:when test="$bookswitch = 'flashxml'">
    128       <xsl:call-template name="xmldocumentContentPeeling">
    129         <xsl:with-param name="collName" select="$collName"/>
    130       </xsl:call-template>
    131     </xsl:when>
    132    
    133     <xsl:when test="$bookswitch = 'on'">
    134       <xsl:call-template name="documentHeading">
    135         <xsl:with-param name="collName" select="$collName"/>
    136       </xsl:call-template>
    137       <div id="bookdiv"></div>
    138       <script type="text/javascript">
    139         <xsl:text disable-output-escaping="yes">
     123        <xsl:choose>
     124          <xsl:when test="$bookswitch = 'flashxml'">
     125            <xsl:call-template name="xmldocumentContentPeeling">
     126              <xsl:with-param name="collName" select="$collName"/>
     127            </xsl:call-template>
     128          </xsl:when>
     129          <xsl:when test="$bookswitch = 'on'">
     130            <xsl:call-template name="documentHeading">
     131              <xsl:with-param name="collName" select="$collName"/>
     132            </xsl:call-template>
     133            <div id="bookdiv"/>
     134            <script type="text/javascript">
     135              <xsl:text disable-output-escaping="yes">
    140136          var doc_url = document.URL;
    141137          doc_url = doc_url.replace(/(&amp;|\?)book=[a-z]+/gi,'');
     
    168164          flash_div.innerHTML = flash_plug_html;
    169165        </xsl:text>
    170       </script>
    171     </xsl:when>
    172     <xsl:otherwise>
    173       <xsl:call-template name="documentHeading">
    174         <xsl:with-param name="collName" select="$collName"/>
    175       </xsl:call-template>
    176       <xsl:call-template name="documentArrows">
    177         <xsl:with-param name="collName" select="$collName"/>
    178       </xsl:call-template>         
    179       <xsl:call-template name="documentContent">
    180         <xsl:with-param name="collName" select="$collName"/>
    181       </xsl:call-template>
    182       <xsl:call-template name="documentArrows">
    183         <xsl:with-param name="collName" select="$collName"/>
    184       </xsl:call-template>   
    185     </xsl:otherwise>
    186     </xsl:choose>
    187    
     166            </script>
     167          </xsl:when>
     168          <xsl:otherwise>
     169            <xsl:call-template name="documentHeading">
     170              <xsl:with-param name="collName" select="$collName"/>
     171            </xsl:call-template>
     172            <xsl:call-template name="documentArrows">
     173              <xsl:with-param name="collName" select="$collName"/>
     174            </xsl:call-template>
     175            <xsl:call-template name="documentContent">
     176              <xsl:with-param name="collName" select="$collName"/>
     177            </xsl:call-template>
     178            <xsl:call-template name="documentArrows">
     179              <xsl:with-param name="collName" select="$collName"/>
     180            </xsl:call-template>
     181          </xsl:otherwise>
     182        </xsl:choose>
    188183      </xsl:otherwise>
    189184    </xsl:choose>
    190185  </xsl:template>
    191 
    192186  <xsl:template name="documentHeading">
    193187    <xsl:param name="collName"/>
     
    197191    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
    198192    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
    199     <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>
     193    <xsl:variable name="p.c">
     194      <xsl:choose>
     195        <xsl:when test="/page/pageRequest/paramList/param[@name='p.c']">
     196          <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/>
     197        </xsl:when>
     198        <xsl:otherwise>
     199          <xsl:value-of select="$collName"/>
     200        </xsl:otherwise>
     201      </xsl:choose>
     202    </xsl:variable>
    200203    <div id="documentheading">
    201       <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>
    202     </xsl:call-template></a>
    203       <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>
     204      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd">
     205        <xsl:call-template name="openbookimg">
     206          <xsl:with-param name="title">
     207            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/>
     208          </xsl:with-param>
     209        </xsl:call-template>
     210      </a>
     211      <xsl:choose>
     212        <xsl:when test="@docType='simple'">
     213          <xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/>
     214        </xsl:when>
     215        <xsl:otherwise>
     216          <xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/>
     217        </xsl:otherwise>
     218      </xsl:choose>
    204219    </div>
    205    
    206220    <div id="docheadwrapper">
    207221      <div id="documentinfo">
    208    
    209     <xsl:choose>
    210       <xsl:when test="$bookswitch = 'on'">
    211         <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
    212           <div id="headingimage">
    213         <xsl:call-template name="coverImage"/>
    214           </div>
    215         </xsl:if>
    216       </xsl:when>
    217       <xsl:otherwise>
    218         <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
    219           <div id="headingimage">
    220         <xsl:call-template name="coverImage"/>
    221           </div>
    222         </xsl:if>
    223        
    224         <ul id="docbuttons" >
    225           <xsl:call-template name="documentButtons">
    226         <xsl:with-param name="collName" select="$collName"/>
    227           </xsl:call-template>
    228         </ul>
    229       </xsl:otherwise>
    230     </xsl:choose>     
     222        <xsl:choose>
     223          <xsl:when test="$bookswitch = 'on'">
     224            <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
     225              <div id="headingimage">
     226                <xsl:call-template name="coverImage"/>
     227              </div>
     228            </xsl:if>
     229          </xsl:when>
     230          <xsl:otherwise>
     231            <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
     232              <div id="headingimage">
     233                <xsl:call-template name="coverImage"/>
     234              </div>
     235            </xsl:if>
     236            <ul id="docbuttons">
     237              <xsl:call-template name="documentButtons">
     238                <xsl:with-param name="collName" select="$collName"/>
     239              </xsl:call-template>
     240            </ul>
     241          </xsl:otherwise>
     242        </xsl:choose>
    231243      </div>
    232244      <!--<div><xsl:call-template name="enrichServices">
     
    234246    </xsl:call-template></div>-->
    235247      <xsl:if test="$bookswitch = 'off'">
    236     <xsl:if test="string($doTOC) != 'false'">
    237       <div id="toc">
    238         <xsl:call-template name="TOC">
    239           <xsl:with-param name="collName" select="$collName"/>
    240         </xsl:call-template>
    241       </div>
    242     </xsl:if>
    243       </xsl:if> 
     248        <xsl:if test="string($doTOC) != 'false'">
     249          <div id="toc">
     250            <xsl:call-template name="TOC">
     251              <xsl:with-param name="collName" select="$collName"/>
     252            </xsl:call-template>
     253          </div>
     254        </xsl:if>
     255      </xsl:if>
    244256    </div>
    245257  </xsl:template>
    246 
    247258  <xsl:template name="coverImage">
    248259    <xsl:choose>
    249260      <xsl:when test="$bookswitch = 'on'">
    250     <script type="text/javascript">
    251       <xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='assocfilepath']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text>
    252     </script>
     261        <script type="text/javascript"><xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='assocfilepath']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text></script>
    253262      </xsl:when>
    254263      <xsl:otherwise>
    255     <img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
     264        <img>
     265          <xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute>
     266        </img>
    256267      </xsl:otherwise>
    257268    </xsl:choose>
    258269  </xsl:template>
    259 
    260270  <xsl:template name="documentButtons">
    261271    <xsl:param name="collName"/>
     
    264274    <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
    265275    <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
    266    
    267    
    268276    <!-- expand document -->
    269277    <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
    270278      <li>
    271         <xsl:choose><xsl:when test="string($ed)='1'">
    272         <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
    273           <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
    274         </a>
    275       </xsl:when>
    276       <xsl:otherwise>
    277         <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
    278           <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
    279         </a>
    280       </xsl:otherwise>
    281     </xsl:choose>
     279        <xsl:choose>
     280          <xsl:when test="string($ed)='1'">
     281            <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0">
     282              <xsl:attribute name="title">
     283                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/>
     284              </xsl:attribute>
     285              <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
     286            </a>
     287          </xsl:when>
     288          <xsl:otherwise>
     289            <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1">
     290              <xsl:attribute name="title">
     291                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/>
     292              </xsl:attribute>
     293              <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
     294            </a>
     295          </xsl:otherwise>
     296        </xsl:choose>
    282297      </li>
    283     </xsl:if>
    284    
     298    </xsl:if>
    285299    <!-- expand contents -->
    286300    <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
    287301      <li>
    288     <xsl:choose><xsl:when test="string($ec)='1'">
    289         <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
    290           <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
    291       </xsl:when>
    292       <xsl:otherwise>
    293         <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute>
    294           <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
    295         </a>
    296       </xsl:otherwise>
    297     </xsl:choose>
     302        <xsl:choose>
     303          <xsl:when test="string($ec)='1'">
     304            <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0">
     305              <xsl:attribute name="title">
     306                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/>
     307              </xsl:attribute>
     308              <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/>
     309            </a>
     310          </xsl:when>
     311          <xsl:otherwise>
     312            <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=1">
     313              <xsl:attribute name="title">
     314                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/>
     315              </xsl:attribute>
     316              <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
     317            </a>
     318          </xsl:otherwise>
     319        </xsl:choose>
    298320      </li>
    299321    </xsl:if>
    300 
    301322    <!-- detach page -->
    302323    <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
    303324    <li>
    304       <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>
    305     <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
    306       </a></li>
    307   </xsl:template>
    308 
     325      <a target="_blank">
     326        <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>
     327        <xsl:attribute name="title">
     328          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/>
     329        </xsl:attribute>
     330        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
     331      </a>
     332    </li>
     333  </xsl:template>
    309334  <xsl:template name="TOC">
    310335    <xsl:param name="collName"/>
    311336    <xsl:choose>
    312337      <xsl:when test="@docType='hierarchy'">
    313     <xsl:call-template name="hierarchicalContents">
    314       <xsl:with-param name="collName" select="$collName"/>
    315     </xsl:call-template>
     338        <xsl:call-template name="hierarchicalContents">
     339          <xsl:with-param name="collName" select="$collName"/>
     340        </xsl:call-template>
    316341      </xsl:when>
    317342      <xsl:when test="@docType='paged'">
    318     <xsl:call-template name="pagedContents">
    319       <xsl:with-param name="collName" select="$collName"/>
    320     </xsl:call-template>
     343        <xsl:call-template name="pagedContents">
     344          <xsl:with-param name="collName" select="$collName"/>
     345        </xsl:call-template>
    321346      </xsl:when>
    322347    </xsl:choose>
    323348  </xsl:template>
    324  
    325349  <xsl:template name="hierarchicalContents">
    326350    <xsl:param name="collName"/>
     
    332356    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
    333357    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
    334     <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>
     358    <xsl:variable name="p.c">
     359      <xsl:choose>
     360        <xsl:when test="/page/pageRequest/paramList/param[@name='p.c']">
     361          <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/>
     362        </xsl:when>
     363        <xsl:otherwise>
     364          <xsl:value-of select="$collName"/>
     365        </xsl:otherwise>
     366      </xsl:choose>
     367    </xsl:variable>
    335368    <xsl:if test="documentNode[@nodeID]">
    336369      <ul id="tocnodes">
    337     <li>
    338       <xsl:choose><xsl:when test="string($oc)='0'">
    339           <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>
    340         </xsl:when>
    341         <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><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
    342       <xsl:if test="string($oc)!='0'">
    343         <ul class="tocnode">
    344           <xsl:for-each select="documentNode/documentNode[@nodeID]">
    345         <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/><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"/></xsl:apply-templates>
    346           </xsl:for-each>
     370        <li>
     371          <xsl:choose>
     372            <xsl:when test="string($oc)='0'">
     373              <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}">
     374                <xsl:call-template name="closedfolderimg">
     375                  <xsl:with-param name="title">
     376                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/>
     377                  </xsl:with-param>
     378                </xsl:call-template>
     379              </a>
     380            </xsl:when>
     381            <xsl:otherwise>
     382              <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}">
     383                <xsl:call-template name="openfolderimg">
     384                  <xsl:with-param name="title">
     385                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/>
     386                  </xsl:with-param>
     387                </xsl:call-template>
     388              </a>
     389            </xsl:otherwise>
     390          </xsl:choose>
     391          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
     392          <xsl:if test="string($oc)!='0'">
     393            <ul class="tocnode">
     394              <xsl:for-each select="documentNode/documentNode[@nodeID]">
     395                <xsl:apply-templates select=".">
     396                  <xsl:with-param name="collName" select="$collName"/>
     397                  <xsl:with-param name="ec" select="$ec"/>
     398                  <xsl:with-param name="p.a" select="$p.a"/>
     399                  <xsl:with-param name="p.s" select="$p.s"/>
     400                  <xsl:with-param name="p.sa" select="$p.sa"/>
     401                  <xsl:with-param name="p.c" select="$p.c"/>
     402                </xsl:apply-templates>
     403              </xsl:for-each>
    347404            </ul>
    348       </xsl:if>
    349         </li> 
     405          </xsl:if>
     406        </li>
    350407      </ul>
    351408    </xsl:if>
    352409  </xsl:template>
    353  
    354410  <!-- each icon-title pair is a row in a table. children go in a table in another row -->
    355411  <xsl:template match="documentNode">
     
    362418    <!-- Display the appropriate image, depending on the node type -->
    363419    <li>
    364       <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>
    365     <xsl:apply-templates select="." mode="displayNodeIcon"/>
     420      <a>
     421        <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>
     422        <xsl:apply-templates select="." mode="displayNodeIcon"/>
    366423      </a>
    367      
    368424      <!-- Display associated title, bolded if the node has content -->
    369425      <xsl:choose>
    370     <xsl:when test="nodeContent">
    371       <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
    372     </xsl:when>
    373     <xsl:otherwise>
    374       <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
    375     </xsl:otherwise>
     426        <xsl:when test="nodeContent">
     427          <span class="bold">
     428            <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
     429          </span>
     430        </xsl:when>
     431        <xsl:otherwise>
     432          <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
     433        </xsl:otherwise>
    376434      </xsl:choose>
    377435      <!-- Apply recursively to the children of this node -->
    378436      <xsl:if test="documentNode[@nodeID]">
    379     <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
    380         <xsl:with-param name="collName" select="$collName"/>
    381         <xsl:with-param name="ec" select="$ec"/>
    382         <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"/>
    383         <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
    384       </xsl:apply-templates>
    385     </ul>
     437        <ul class="tocnode">
     438          <xsl:apply-templates select="documentNode[@nodeID]">
     439            <xsl:with-param name="collName" select="$collName"/>
     440            <xsl:with-param name="ec" select="$ec"/>
     441            <xsl:with-param name="p.a" select="$p.a"/>
     442            <xsl:with-param name="p.s" select="$p.s"/>
     443            <xsl:with-param name="p.sa" select="$p.sa"/>
     444            <xsl:with-param name="p.c" select="$p.c"/>
     445            <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
     446          </xsl:apply-templates>
     447        </ul>
    386448      </xsl:if>
    387449    </li>
    388450  </xsl:template>
    389  
    390451  <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
    391452  <xsl:template name="documentContent">
    392     <div class="documenttext"> 
     453    <div class="documenttext">
    393454      <xsl:choose>
    394     <xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when>
    395     <xsl:otherwise>
    396       <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
    397     </xsl:otherwise>
     455        <xsl:when test="@docType='simple'">
     456          <xsl:apply-templates select="nodeContent"/>
     457        </xsl:when>
     458        <xsl:otherwise>
     459          <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
     460        </xsl:otherwise>
    398461      </xsl:choose>
    399462    </div>
    400463  </xsl:template>
    401  
    402464  <xsl:template match="documentNode" mode="content">
    403465    <xsl:if test="nodeContent">
    404466      <xsl:if test="metadataList/metadata[@name='Title']">
    405     <h3><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></h3>
     467        <h3>
     468          <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
     469        </h3>
    406470      </xsl:if>
    407471      <xsl:apply-templates select="nodeContent"/>
    408472    </xsl:if>
    409473  </xsl:template>
    410 
    411474  <!-- the actual text/content -->
    412475  <xsl:template match="nodeContent">
     
    414477    <xsl:for-each select="node()">
    415478      <xsl:choose>
    416     <xsl:when test="not(name())">
    417       <xsl:value-of select="." disable-output-escaping="yes"/>
    418     </xsl:when>
    419     <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
     479        <xsl:when test="not(name())">
     480          <xsl:value-of select="." disable-output-escaping="yes"/>
     481        </xsl:when>
     482        <xsl:otherwise>
     483          <xsl:apply-templates select="."/>
     484        </xsl:otherwise>
    420485      </xsl:choose>
    421486    </xsl:for-each>
    422487  </xsl:template>
    423  
    424488  <xsl:template name="xmldocumentContentPeeling">
    425489    <xsl:choose>
    426490      <xsl:when test="@docType='simple'">
    427     <xsl:apply-templates select="nodeContent"/>
     491        <xsl:apply-templates select="nodeContent"/>
    428492      </xsl:when>
    429493      <xsl:otherwise>
    430     <xsl:call-template name="xmlpeelingContents" />
     494        <xsl:call-template name="xmlpeelingContents"/>
    431495      </xsl:otherwise>
    432496    </xsl:choose>
    433497  </xsl:template>
    434  
    435498  <xsl:template name="xmlpeelingContents">
    436499    <xsl:if test="documentNode">
    437       <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
    438     </xsl:if>
    439   </xsl:template>
    440 
    441     <xsl:template match="documentNode" mode="xmlpeeling">
    442         <!-- get title -->
    443         <xsl:if test="nodeContent">
    444             <xsl:text disable-output-escaping="yes">
     500      <xsl:apply-templates select="documentNode" mode="xmlpeeling"/>
     501    </xsl:if>
     502  </xsl:template>
     503  <xsl:template match="documentNode" mode="xmlpeeling">
     504    <!-- get title -->
     505    <xsl:if test="nodeContent">
     506      <xsl:text disable-output-escaping="yes">
    445507                &lt;Section&gt;
    446508                &lt;Description&gt;
    447509                &lt;Metadata name="Title"&gt;
    448510            </xsl:text>
    449             <xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
    450             <xsl:text disable-output-escaping="yes">
     511      <xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/>
     512      <xsl:text disable-output-escaping="yes">
    451513                &lt;/Metadata&gt;
    452514                &lt;/Description&gt;
    453515            </xsl:text>
    454             <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
    455         </xsl:if>
    456 
    457         <!-- recurse to the children -->
    458         <xsl:if test="documentNode">
    459             <xsl:apply-templates select="documentNode" mode="xmlpeeling" />
    460         </xsl:if>
    461    
    462         <!-- end the section -->
    463         <xsl:if test="nodeContent">
    464             <xsl:text disable-output-escaping="yes">
     516      <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
     517    </xsl:if>
     518    <!-- recurse to the children -->
     519    <xsl:if test="documentNode">
     520      <xsl:apply-templates select="documentNode" mode="xmlpeeling"/>
     521    </xsl:if>
     522    <!-- end the section -->
     523    <xsl:if test="nodeContent">
     524      <xsl:text disable-output-escaping="yes">
    465525                &lt;/Section&gt;
    466526            </xsl:text>
    467         </xsl:if>
    468   </xsl:template>
    469  
     527    </xsl:if>
     528  </xsl:template>
    470529  <!-- match any file nodes -->
    471530  <xsl:template match="file">
     
    473532    <xsl:choose>
    474533      <xsl:when test="util:isImage(@mimeType)">
    475     <img src="{$httpPath}/{@href}"/>
     534        <img src="{$httpPath}/{@href}"/>
    476535      </xsl:when>
    477536      <xsl:otherwise>
    478     <a href="{$httpPath}/{@href}"><xsl:value-of select="@href"/></a>
     537        <a href="{$httpPath}/{@href}">
     538          <xsl:value-of select="@href"/>
     539        </a>
    479540      </xsl:otherwise>
    480541    </xsl:choose>
    481542  </xsl:template>
    482  
    483543  <!-- match any link nodes -->
    484544  <xsl:template match="link">
    485     <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 
     545    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    486546    <xsl:variable name="actionargs">
    487547      <xsl:choose>
    488     <xsl:when test="@type='document'">a=d</xsl:when>
    489     <xsl:when test="@type='query'">a=q&amp;s=<xsl:value-of select="@service"/>&amp;rt=rd</xsl:when>
    490     <xsl:otherwise>
     548        <xsl:when test="@type='document'">a=d</xsl:when>
     549        <xsl:when test="@type='query'">a=q&amp;s=<xsl:value-of select="@service"/>&amp;rt=rd</xsl:when>
     550        <xsl:otherwise>
    491551    p
    492552    </xsl:otherwise>
     
    496556      <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
    497557    </xsl:variable>
    498     <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
    499   </xsl:template>
    500 
     558    <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}">
     559      <xsl:value-of disable-output-escaping="yes" select="."/>
     560    </a>
     561  </xsl:template>
    501562  <!-- match any annotations and make them span elements -->
    502563  <xsl:template match="annotation">
    503     <span class="{@type}"><xsl:value-of disable-output-escaping="yes" select="."/></span>
    504   </xsl:template>
    505  
     564    <span class="{@type}">
     565      <xsl:value-of disable-output-escaping="yes" select="."/>
     566    </span>
     567  </xsl:template>
    506568  <!-- paged naviagtion : INCOMPLETE!!-->
    507569  <xsl:template name="pagedContents">
     
    512574    <table>
    513575      <xsl:choose>
    514     <xsl:when test="$pos=-1"><!-- a doc -->
    515       <tr valign="top">
    516         <td align="left">
     576        <xsl:when test="$pos=-1">
     577          <!-- a doc -->
     578          <tr valign="top">
     579            <td align="left">
    517580        </td>
    518         <td align="center"><center>
    519         <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
    520           </center></td>
    521         <td align="right">
    522           <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
    523         </td>
    524       </tr>
    525     </xsl:when>
    526    
    527     <xsl:otherwise> <!-- an internal node -->     
    528       <tr valign="top">
    529         <td align="left">
    530           <xsl:if test=" not ( $pos = 1 )">
    531         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
    532           </xsl:if>
    533         </td>
    534         <td align="center"><center>
    535         <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
    536           </center></td>
    537         <td align="right">
    538           <xsl:if test=" not($pos = $length)">
    539         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
    540           </xsl:if>
    541         </td>
    542       </tr>
    543     </xsl:otherwise>
     581            <td align="center">
     582              <center>
     583                <b>
     584                  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/>
     585                </b>
     586              </center>
     587            </td>
     588            <td align="right">
     589              <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc">
     590                <img src="interfaces/default/images/more.gif" border="0" align="absbottom"/>
     591              </a>
     592            </td>
     593          </tr>
     594        </xsl:when>
     595        <xsl:otherwise>
     596          <!-- an internal node -->
     597          <tr valign="top">
     598            <td align="left">
     599              <xsl:if test=" not ( $pos = 1 )">
     600                <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps">
     601                  <img src="interfaces/default/images/less.gif" border="0" align="absbottom"/>
     602                </a>
     603              </xsl:if>
     604            </td>
     605            <td align="center">
     606              <center>
     607                <b>
     608                  <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/>
     609                </b>
     610              </center>
     611            </td>
     612            <td align="right">
     613              <xsl:if test=" not($pos = $length)">
     614                <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns">
     615                  <img src="interfaces/default/images/more.gif" border="0" align="absbottom"/>
     616                </a>
     617              </xsl:if>
     618            </td>
     619          </tr>
     620        </xsl:otherwise>
    544621      </xsl:choose>
    545622      <tr valign="middle">
    546     <td align='center' valign='top' colspan='3'>
    547       <form name="GotoForm" method="get" action="{$library_name}">
    548         <input type='hidden' name='a' value='d'/>
    549         <input type='hidden' name='c' value='{$collName}'/>
    550         <input type='hidden' name='d' value='{@selectedNode}'/>
    551         <input type="text" name="gp" size="3" maxlength="4"/>
    552         <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
    553       </form>
    554     </td>
     623        <td align="center" valign="top" colspan="3">
     624          <form name="GotoForm" method="get" action="{$library_name}">
     625            <input type="hidden" name="a" value="d"/>
     626            <input type="hidden" name="c" value="{$collName}"/>
     627            <input type="hidden" name="d" value="{@selectedNode}"/>
     628            <input type="text" name="gp" size="3" maxlength="4"/>
     629            <input type="submit">
     630              <xsl:attribute name="value">
     631                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/>
     632              </xsl:attribute>
     633            </input>
     634          </form>
     635        </td>
    555636      </tr>
    556637    </table>
    557638  </xsl:template>
    558  
    559639  <xsl:template name="enrichServices">
    560640    <xsl:param name="collName"/>
     
    562642    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
    563643    <xsl:for-each select="../serviceList/service">
    564       <table border='1' cellspacing='0'>
    565     <tr><td>
    566         <p /><xsl:value-of select="displayItem[@name='name']"/><p/>
    567         <form name="EnrichForm" method="get" action="{$library_name}">
    568           <xsl:apply-templates select="paramList"/>
    569           <input type='hidden' name='a' value='d'/>
    570           <input type='hidden' name='d' value='{$docID}'/>
    571           <input type='hidden' name='c' value='{$collName}'/>
    572           <xsl:if test='$request-params/param[@name="sib"]'>
    573         <input type='hidden' name='sib'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="sib"]/@value'/></xsl:attribute></input></xsl:if>
    574           <input type='hidden' name='s' value='{@name}'/>
    575           <input type='hidden' name='p.a'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.a"]'/></xsl:attribute></input>
    576           <input type='hidden' name='p.sa'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.sa"]'/></xsl:attribute></input>
    577           <input type='hidden' name='p.s'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.s"]'/></xsl:attribute></input>
    578           <input type='hidden' name='end' value='1'/>
    579           <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
    580         </form>
    581       </td></tr>
     644      <table border="1" cellspacing="0">
     645        <tr>
     646          <td>
     647            <p/>
     648            <xsl:value-of select="displayItem[@name='name']"/>
     649            <p/>
     650            <form name="EnrichForm" method="get" action="{$library_name}">
     651              <xsl:apply-templates select="paramList"/>
     652              <input type="hidden" name="a" value="d"/>
     653              <input type="hidden" name="d" value="{$docID}"/>
     654              <input type="hidden" name="c" value="{$collName}"/>
     655              <xsl:if test="$request-params/param[@name=&quot;sib&quot;]">
     656                <input type="hidden" name="sib">
     657                  <xsl:attribute name="value">
     658                    <xsl:value-of select="$request-params/param[@name=&quot;sib&quot;]/@value"/>
     659                  </xsl:attribute>
     660                </input>
     661              </xsl:if>
     662              <input type="hidden" name="s" value="{@name}"/>
     663              <input type="hidden" name="p.a">
     664                <xsl:attribute name="value">
     665                  <xsl:value-of select="$request-params/param[@name=&quot;p.a&quot;]"/>
     666                </xsl:attribute>
     667              </input>
     668              <input type="hidden" name="p.sa">
     669                <xsl:attribute name="value">
     670                  <xsl:value-of select="$request-params/param[@name=&quot;p.sa&quot;]"/>
     671                </xsl:attribute>
     672              </input>
     673              <input type="hidden" name="p.s">
     674                <xsl:attribute name="value">
     675                  <xsl:value-of select="$request-params/param[@name=&quot;p.s&quot;]"/>
     676                </xsl:attribute>
     677              </input>
     678              <input type="hidden" name="end" value="1"/>
     679              <input type="submit">
     680                <xsl:attribute name="value">
     681                  <xsl:value-of select="displayItem[@name='submit']"/>
     682                </xsl:attribute>
     683              </input>
     684            </form>
     685          </td>
     686        </tr>
    582687      </table>
    583688    </xsl:for-each>
    584689  </xsl:template>
    585 
    586690  <xsl:template match="paramList" mode="hidden">
    587691    <xsl:for-each select="param">
    588       <input type='hidden' name='{@name}' value='{@value}'/><xsl:text>
     692      <input type="hidden" name="{@name}" value="{@value}"/>
     693      <xsl:text>
    589694      </xsl:text>
    590695    </xsl:for-each>
    591696  </xsl:template>
    592  
    593697  <xsl:template name="documentArrows">
    594698    <xsl:param name="collName"/>
    595699    <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
    596    
    597700    <div class="documentarrows">
    598701      <xsl:if test="not(string($ed)='1')">
    599     <xsl:call-template name="documentArrow">
    600       <xsl:with-param name="collName" select="$collName"/>
    601       <xsl:with-param name="direction">back</xsl:with-param>
    602     </xsl:call-template>
    603     <xsl:call-template name="documentArrow">
    604       <xsl:with-param name="collName" select="$collName"/>
    605       <xsl:with-param name="direction">forward</xsl:with-param>
    606     </xsl:call-template>
     702        <xsl:call-template name="documentArrow">
     703          <xsl:with-param name="collName" select="$collName"/>
     704          <xsl:with-param name="direction">back</xsl:with-param>
     705        </xsl:call-template>
     706        <xsl:call-template name="documentArrow">
     707          <xsl:with-param name="collName" select="$collName"/>
     708          <xsl:with-param name="direction">forward</xsl:with-param>
     709        </xsl:call-template>
    607710      </xsl:if>
    608711    </div>
    609    
    610   </xsl:template>
    611  
     712  </xsl:template>
    612713  <xsl:template name="documentArrow">
    613714    <xsl:param name="collName"/>
    614715    <xsl:param name="direction"/>
    615716    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
    616     <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'> 
    617       <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><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
    618     </xsl:if>
    619   </xsl:template>
    620 
     717    <xsl:if test="$request-params/param[@name=&quot;dt&quot;]/@value != &quot;simple&quot;">
     718      <a>
     719        <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=&quot;p.s&quot;]/@value"/>&amp;p.sa=<xsl:value-of select="$request-params/param[@name=&quot;p.sa&quot;]/@value"/>&amp;p.a=<xsl:value-of select="$request-params/param[@name=&quot;p.a&quot;]/@value"/></xsl:attribute>
     720        <xsl:choose>
     721          <xsl:when test="$direction='back'">
     722            <img class="lessarrow" src="interfaces/default/images/less.gif"/>
     723          </xsl:when>
     724          <xsl:otherwise>
     725            <img class="morearrow" src="interfaces/default/images/more.gif"/>
     726          </xsl:otherwise>
     727        </xsl:choose>
     728      </a>
     729    </xsl:if>
     730  </xsl:template>
    621731  <xsl:template name="externalPage">
    622732    <xsl:param name="external"/>
    623     <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>
    624     <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
    625     <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
     733    <xsl:variable name="go_forward_link">
     734      <a>
     735        <xsl:attribute name="href">
     736          <xsl:value-of select="$external"/>
     737        </xsl:attribute>
     738        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/>
     739      </a>
     740    </xsl:variable>
     741    <h2>
     742      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/>
     743    </h2>
     744    <p>
     745      <xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
    626746    </p>
    627747  </xsl:template>
    628 
    629748</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.