Changeset 25370 for main/trunk/greenstone3/web/interfaces
- Timestamp:
- 2012-04-12T15:13:27+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/document.xsl
r23972 r25370 1 1 <?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"> 11 3 <!-- style includes global params interface_name, library_name --> 12 4 <xsl:include href="style.xsl"/> 13 5 <xsl:include href="service-params.xsl"/> 14 6 <xsl:include href="berrytools.xsl"/> 15 16 7 <xsl:output method="html"/> 17 18 8 <!-- the main page layout template is here --> 19 9 <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> 24 17 <xsl:when test="$bookswitch = 'flashxml' and $a = 'd'"> 25 26 <xsl:call-template name="response"/>18 <html> 19 <xsl:call-template name="response"/> 27 20 </html> 28 21 </xsl:when> 29 30 <xsl:otherwise> 22 <xsl:otherwise> 31 23 <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> 40 33 <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> 46 41 </body> 47 42 </html> … … 49 44 </xsl:choose> 50 45 </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> 56 52 <xsl:template name="pageTitle"> 57 53 <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> 61 59 <!-- this is hard coded for GATE, should somehow do it dynamically--> 62 60 <xsl:template name="pageStyle"> … … 70 68 </xsl:text> 71 69 </style> 72 73 70 <!--TODO: add berry basket switch--> 74 71 <!--<xsl:if test="$berryBaskets = 'true'">--> 75 72 <xsl:if test="$berrybasketswitch = 'on'"> 76 <xsl:call-template name="berryStyleSheet"/> 73 <xsl:call-template name="berryStyleSheet"/> 77 74 <xsl:call-template name="js-library"/> 78 75 </xsl:if> 79 76 </xsl:template> 80 81 77 <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> 83 81 <xsl:choose> 84 82 <xsl:when test="$bookswitch = 'on' or $bookswitch = 'off'"> 85 83 <xsl:call-template name="standardPageBanner"> 86 84 <xsl:with-param name="collName" select="$collName"/> 87 85 </xsl:call-template> 88 86 <xsl:call-template name="navigationBar"> 89 87 <xsl:with-param name="collName" select="$collName"/> 90 88 </xsl:call-template> 91 92 89 <!--<xsl:if test="$berryBaskets = 'true'">--> 93 90 <xsl:if test="$berrybasketswitch = 'on'"> 94 91 <xsl:call-template name="documentBerryBasket"> 95 96 97 98 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"/> 99 96 </xsl:call-template> 100 97 </xsl:if> 101 98 </xsl:when> 102 </xsl:choose> 103 99 </xsl:choose> 104 100 <!-- display the document --> 105 101 <xsl:if test="$bookswitch != 'flashxml'"> … … 113 109 </xsl:if> 114 110 </xsl:template> 115 116 111 <xsl:template match="document"> 117 112 <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> 119 116 <xsl:choose> 120 117 <xsl:when test="$external != ''"> 121 122 123 118 <xsl:call-template name="externalPage"> 119 <xsl:with-param name="external" select="$external"/> 120 </xsl:call-template> 124 121 </xsl:when> 125 122 <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"> 140 136 var doc_url = document.URL; 141 137 doc_url = doc_url.replace(/(&|\?)book=[a-z]+/gi,''); … … 168 164 flash_div.innerHTML = flash_plug_html; 169 165 </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> 188 183 </xsl:otherwise> 189 184 </xsl:choose> 190 185 </xsl:template> 191 192 186 <xsl:template name="documentHeading"> 193 187 <xsl:param name="collName"/> … … 197 191 <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/> 198 192 <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> 200 203 <div id="documentheading"> 201 <a href="{$library_name}?a={$p.a}&sa={$p.sa}&s={$p.s}&c={$p.c}&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}&sa={$p.sa}&s={$p.s}&c={$p.c}&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> 204 219 </div> 205 206 220 <div id="docheadwrapper"> 207 221 <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> 231 243 </div> 232 244 <!--<div><xsl:call-template name="enrichServices"> … … 234 246 </xsl:call-template></div>--> 235 247 <xsl:if test="$bookswitch = 'off'"> 236 237 238 239 240 241 242 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> 244 256 </div> 245 257 </xsl:template> 246 247 258 <xsl:template name="coverImage"> 248 259 <xsl:choose> 249 260 <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> 253 262 </xsl:when> 254 263 <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> 256 267 </xsl:otherwise> 257 268 </xsl:choose> 258 269 </xsl:template> 259 260 270 <xsl:template name="documentButtons"> 261 271 <xsl:param name="collName"/> … … 264 274 <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/> 265 275 <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/> 266 267 268 276 <!-- expand document --> 269 277 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'"> 270 278 <li> 271 <xsl:choose><xsl:when test="string($ed)='1'"> 272 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&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&d={$docID}&c={$collName}&sib={$sib}&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&d={$docID}&c={$collName}&sib={$sib}&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&d={$docID}&c={$collName}&sib={$sib}&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> 282 297 </li> 283 </xsl:if> 284 298 </xsl:if> 285 299 <!-- expand contents --> 286 300 <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'"> 287 301 <li> 288 <xsl:choose><xsl:when test="string($ec)='1'"> 289 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&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&d={$docID}&c={$collName}&sib={$sib}&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&d={$docID}&c={$collName}&sib={$sib}&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&d={$docID}&c={$collName}&sib={$sib}&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> 298 320 </li> 299 321 </xsl:if> 300 301 322 <!-- detach page --> 302 323 <xsl:variable name="paramList" select="/page/pageRequest/paramList"/> 303 324 <li> 304 <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&d=<xsl:value-of select="$docID"/>&c=<xsl:value-of select="$collName"/>&sib=<xsl:value-of select="$sib"/>&dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&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&d=<xsl:value-of select="$docID"/>&c=<xsl:value-of select="$collName"/>&sib=<xsl:value-of select="$sib"/>&dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&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> 309 334 <xsl:template name="TOC"> 310 335 <xsl:param name="collName"/> 311 336 <xsl:choose> 312 337 <xsl:when test="@docType='hierarchy'"> 313 314 315 338 <xsl:call-template name="hierarchicalContents"> 339 <xsl:with-param name="collName" select="$collName"/> 340 </xsl:call-template> 316 341 </xsl:when> 317 342 <xsl:when test="@docType='paged'"> 318 319 320 343 <xsl:call-template name="pagedContents"> 344 <xsl:with-param name="collName" select="$collName"/> 345 </xsl:call-template> 321 346 </xsl:when> 322 347 </xsl:choose> 323 348 </xsl:template> 324 325 349 <xsl:template name="hierarchicalContents"> 326 350 <xsl:param name="collName"/> … … 332 356 <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/> 333 357 <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> 335 368 <xsl:if test="documentNode[@nodeID]"> 336 369 <ul id="tocnodes"> 337 <li> 338 <xsl:choose><xsl:when test="string($oc)='0'"> 339 <a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=1&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&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&c={$collName}&d={$d}&sib={$sib}&oc=0&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&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&c={$collName}&d={$d}&sib={$sib}&oc=1&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&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&c={$collName}&d={$d}&sib={$sib}&oc=0&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&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> 347 404 </ul> 348 349 </li> 405 </xsl:if> 406 </li> 350 407 </ul> 351 408 </xsl:if> 352 409 </xsl:template> 353 354 410 <!-- each icon-title pair is a row in a table. children go in a table in another row --> 355 411 <xsl:template match="documentNode"> … … 362 418 <!-- Display the appropriate image, depending on the node type --> 363 419 <li> 364 <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&c=<xsl:value-of select='$collName'/>&d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&sib=1<xsl:if test="string($ec) = '1'">&ec=1</xsl:if>&p.a=<xsl:value-of select="$p.a"/>&p.sa=<xsl:value-of select="$p.sa"/>&p.s=<xsl:value-of select="$p.s"/>&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&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="@nodeID"/><xsl:if test="documentNode">.pr</xsl:if>&sib=1<xsl:if test="string($ec) = '1'">&ec=1</xsl:if>&p.a=<xsl:value-of select="$p.a"/>&p.sa=<xsl:value-of select="$p.sa"/>&p.s=<xsl:value-of select="$p.s"/>&p.c=<xsl:value-of select="$p.c"/></xsl:attribute> 422 <xsl:apply-templates select="." mode="displayNodeIcon"/> 366 423 </a> 367 368 424 <!-- Display associated title, bolded if the node has content --> 369 425 <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> 376 434 </xsl:choose> 377 435 <!-- Apply recursively to the children of this node --> 378 436 <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> 386 448 </xsl:if> 387 449 </li> 388 450 </xsl:template> 389 390 451 <!-- default content is to print the title and content of any documentNodes that have nodeContent --> 391 452 <xsl:template name="documentContent"> 392 <div class="documenttext"> 453 <div class="documenttext"> 393 454 <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> 398 461 </xsl:choose> 399 462 </div> 400 463 </xsl:template> 401 402 464 <xsl:template match="documentNode" mode="content"> 403 465 <xsl:if test="nodeContent"> 404 466 <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> 406 470 </xsl:if> 407 471 <xsl:apply-templates select="nodeContent"/> 408 472 </xsl:if> 409 473 </xsl:template> 410 411 474 <!-- the actual text/content --> 412 475 <xsl:template match="nodeContent"> … … 414 477 <xsl:for-each select="node()"> 415 478 <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> 420 485 </xsl:choose> 421 486 </xsl:for-each> 422 487 </xsl:template> 423 424 488 <xsl:template name="xmldocumentContentPeeling"> 425 489 <xsl:choose> 426 490 <xsl:when test="@docType='simple'"> 427 491 <xsl:apply-templates select="nodeContent"/> 428 492 </xsl:when> 429 493 <xsl:otherwise> 430 <xsl:call-template name="xmlpeelingContents"/>494 <xsl:call-template name="xmlpeelingContents"/> 431 495 </xsl:otherwise> 432 496 </xsl:choose> 433 497 </xsl:template> 434 435 498 <xsl:template name="xmlpeelingContents"> 436 499 <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"> 445 507 <Section> 446 508 <Description> 447 509 <Metadata name="Title"> 448 510 </xsl:text> 449 450 511 <xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/> 512 <xsl:text disable-output-escaping="yes"> 451 513 </Metadata> 452 514 </Description> 453 515 </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"> 465 525 </Section> 466 526 </xsl:text> 467 </xsl:if> 468 </xsl:template> 469 527 </xsl:if> 528 </xsl:template> 470 529 <!-- match any file nodes --> 471 530 <xsl:template match="file"> … … 473 532 <xsl:choose> 474 533 <xsl:when test="util:isImage(@mimeType)"> 475 534 <img src="{$httpPath}/{@href}"/> 476 535 </xsl:when> 477 536 <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> 479 540 </xsl:otherwise> 480 541 </xsl:choose> 481 542 </xsl:template> 482 483 543 <!-- match any link nodes --> 484 544 <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"/> 486 546 <xsl:variable name="actionargs"> 487 547 <xsl:choose> 488 489 490 548 <xsl:when test="@type='document'">a=d</xsl:when> 549 <xsl:when test="@type='query'">a=q&s=<xsl:value-of select="@service"/>&rt=rd</xsl:when> 550 <xsl:otherwise> 491 551 p 492 552 </xsl:otherwise> … … 496 556 <xsl:for-each select="param">&s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each> 497 557 </xsl:variable> 498 <a href="{$library_name}?{$actionargs}&c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a> 499 </xsl:template> 500 558 <a href="{$library_name}?{$actionargs}&c={$collName}{$serviceargs}"> 559 <xsl:value-of disable-output-escaping="yes" select="."/> 560 </a> 561 </xsl:template> 501 562 <!-- match any annotations and make them span elements --> 502 563 <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> 506 568 <!-- paged naviagtion : INCOMPLETE!!--> 507 569 <xsl:template name="pagedContents"> … … 512 574 <table> 513 575 <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"> 517 580 </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&c={$collName}&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&c={$collName}&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&c={$collName}&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&c={$collName}&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&c={$collName}&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&c={$collName}&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> 544 621 </xsl:choose> 545 622 <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> 555 636 </tr> 556 637 </table> 557 638 </xsl:template> 558 559 639 <xsl:template name="enrichServices"> 560 640 <xsl:param name="collName"/> … … 562 642 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/> 563 643 <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="sib"]"> 656 <input type="hidden" name="sib"> 657 <xsl:attribute name="value"> 658 <xsl:value-of select="$request-params/param[@name="sib"]/@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="p.a"]"/> 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="p.sa"]"/> 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="p.s"]"/> 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> 582 687 </table> 583 688 </xsl:for-each> 584 689 </xsl:template> 585 586 690 <xsl:template match="paramList" mode="hidden"> 587 691 <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> 589 694 </xsl:text> 590 695 </xsl:for-each> 591 696 </xsl:template> 592 593 697 <xsl:template name="documentArrows"> 594 698 <xsl:param name="collName"/> 595 699 <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/> 596 597 700 <div class="documentarrows"> 598 701 <xsl:if test="not(string($ed)='1')"> 599 600 601 602 603 604 605 606 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> 607 710 </xsl:if> 608 711 </div> 609 610 </xsl:template> 611 712 </xsl:template> 612 713 <xsl:template name="documentArrow"> 613 714 <xsl:param name="collName"/> 614 715 <xsl:param name="direction"/> 615 716 <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&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&sib=1&p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&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="dt"]/@value != "simple""> 718 <a> 719 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&sib=1&p.s=<xsl:value-of select="$request-params/param[@name="p.s"]/@value"/>&p.sa=<xsl:value-of select="$request-params/param[@name="p.sa"]/@value"/>&p.a=<xsl:value-of select="$request-params/param[@name="p.a"]/@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> 621 731 <xsl:template name="externalPage"> 622 732 <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"/> 626 746 </p> 627 747 </xsl:template> 628 629 748 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.