- Timestamp:
- 2009-01-06T14:26:10+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/web/interfaces/default/transform/document.xsl
r18306 r18316 22 22 <xsl:choose> 23 23 <xsl:when test="$bookswitch = 'flashxml' and $a = 'd'"> 24 25 24 <html> 25 <xsl:call-template name="response" /> 26 26 </html> 27 27 </xsl:when> … … 29 29 <xsl:otherwise> 30 30 <html> 31 32 33 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->34 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>35 36 37 38 31 <head> 32 <title> 33 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 34 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 35 </title> 36 <xsl:call-template name="globalStyle"/> 37 <xsl:call-template name="pageStyle"/> 38 </head> 39 39 <body> 40 41 42 43 </div>40 <div id="globalwrapper"> 41 <xsl:call-template name="response" /> 42 <xsl:call-template name="greenstoneFooter"/> 43 </div> 44 44 </body> 45 45 </html> … … 49 49 50 50 51 52 51 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 52 <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable> 53 53 54 54 <xsl:template name="pageTitle"> … … 68 68 </xsl:text> 69 69 </style> 70 71 <!--<xsl:if test="$berryBaskets = 'true'">-->70 <!--TODO: add berry basket switch--> 71 <!--<xsl:if test="$berryBaskets = 'true'">--> 72 72 <xsl:if test="$berrybasketswitch = 'on'"> 73 <xsl:call-template name="berryStyleSheet"/>74 <xsl:call-template name="js-library"/>73 <xsl:call-template name="berryStyleSheet"/> 74 <xsl:call-template name="js-library"/> 75 75 </xsl:if> 76 76 </xsl:template> … … 81 81 <xsl:when test="$bookswitch = 'on' or $bookswitch = 'off'"> 82 82 <xsl:call-template name="standardPageBanner"> 83 83 <xsl:with-param name="collName" select="$collName"/> 84 84 </xsl:call-template> 85 85 <xsl:call-template name="navigationBar"> 86 86 <xsl:with-param name="collName" select="$collName"/> 87 87 </xsl:call-template> 88 88 89 89 <!--<xsl:if test="$berryBaskets = 'true'">--> 90 90 <xsl:if test="$berrybasketswitch = 'on'"> 91 91 <xsl:call-template name="documentBerryBasket"> 92 93 94 95 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"/> 96 96 </xsl:call-template> 97 97 </xsl:if> 98 98 </xsl:when> 99 </xsl:choose>100 101 <!-- display the document -->99 </xsl:choose> 100 101 <!-- display the document --> 102 102 <xsl:if test="$bookswitch != 'flashxml'"> 103 103 <xsl:text disable-output-escaping="yes"><div id="content"></xsl:text> 104 104 </xsl:if> 105 105 <xsl:apply-templates select="document"> … … 107 107 </xsl:apply-templates> 108 108 <xsl:if test="$bookswitch != 'flashxml'"> 109 110 </xsl:if> 111 </xsl:template> 112 109 <xsl:text disable-output-escaping="yes"></div></xsl:text> 110 </xsl:if> 111 </xsl:template> 112 113 113 <xsl:template match="document"> 114 <xsl:param name="collName"/>115 <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>114 <xsl:param name="collName"/> 115 <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable> 116 116 <xsl:choose> 117 117 <xsl:when test="$external != ''"> 118 119 <xsl:with-param name="external" select="$external"/>120 118 <xsl:call-template name="externalPage"> 119 <xsl:with-param name="external" select="$external"/> 120 </xsl:call-template> 121 121 </xsl:when> 122 122 <xsl:otherwise> 123 123 124 <xsl:if test="$bookswitch = 'flashxml'"> 125 <xsl:call-template name="xmldocumentContentPeeling"> 126 <xsl:with-param name="collName" select="$collName"/> 127 </xsl:call-template> 128 </xsl:if> 129 130 <xsl:if test="$bookswitch = 'off'"> 131 <xsl:call-template name="documentHeading"> 132 <xsl:with-param name="collName" select="$collName"/> 133 </xsl:call-template> 134 135 <xsl:call-template name="documentArrows"> 136 <xsl:with-param name="collName" select="$collName"/> 137 </xsl:call-template> 138 <xsl:call-template name="documentContent"> 139 <xsl:with-param name="collName" select="$collName"/> 140 </xsl:call-template> 141 <xsl:call-template name="documentArrows"> 142 <xsl:with-param name="collName" select="$collName"/> 143 </xsl:call-template> 144 </xsl:if> 145 <xsl:if test="$bookswitch = 'on'"> 146 <xsl:call-template name="documentHeading"> 147 <xsl:with-param name="collName" select="$collName"/> 148 </xsl:call-template> 149 <div id="bookdiv"></div> 150 <script type="text/javascript"> 151 <xsl:text disable-output-escaping="yes"> 152 var doc_url = document.URL; 153 doc_url = doc_url.replace(/(&|\?)book=[a-z]+/gi,''); 154 doc_url += '&book=flashxml'; 155 156 // var src_image = "http://kia.cs.waikato.ac.nz:8080/greenstone3/sites/localsite/collect/gs2mgdemo/index/assoc/HASH49aa.dir/cover.jpg" 157 //var doc_url = "/greenstone3/library?a=d&c=gs2mgdemo&d=HASH49aab56062938fbe2ff7f1&dt=hierarchy&p.a=b&p.s=ClassifierBrowse&ed=1"; 158 159 var flash_plug_html = "" 160 flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n'; 161 flash_plug_html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n'; 162 flash_plug_html += ' height="100%" id="Book" swLiveConnect="true" \n'; 163 flash_plug_html += ' width="100%">\n'; 164 flash_plug_html += ' <PARAM name="allowScriptAccess" value="always" />\n'; 165 flash_plug_html += ' <PARAM name="movie" value="Book.swf'; 166 flash_plug_html += '?src_image=' + escape(img_cover); 167 flash_plug_html += '&doc_url=' + escape(doc_url) 168 flash_plug_html += '" />\n'; 169 flash_plug_html += ' <PARAM name="quality" value="high" />\n'; 170 flash_plug_html += ' <PARAM name="bgcolor" value="#FFFFFF" />\n'; 171 flash_plug_html += ' <EMBED align="middle" \n'; 172 flash_plug_html += ' allowScriptAccess="always" swLiveConnect="true" \n'; 173 flash_plug_html += ' bgcolor="#FFFFFF" height="100%" name="Book" \n'; 174 flash_plug_html += ' pluginspage="http://www.macromedia.com/go/getflashplayer" \n'; 175 flash_plug_html += ' quality="high" \n'; 176 flash_plug_html += ' src="Book.swf'; 177 flash_plug_html += '?src_image=' + escape(img_cover); 178 flash_plug_html += '&doc_url=' + escape(doc_url); 179 flash_plug_html += '"\n'; 180 flash_plug_html += ' type="application/x-shockwave-flash" width="100%" />\n'; 181 flash_plug_html += '</OBJECT>\n'; 182 var flash_div = document.getElementById("bookdiv"); 183 flash_div.innerHTML = flash_plug_html; 184 </xsl:text> 185 </script> 186 </xsl:if> 187 </xsl:otherwise> 124 <xsl:if test="$bookswitch = 'flashxml'"> 125 <xsl:call-template name="xmldocumentContentPeeling"> 126 <xsl:with-param name="collName" select="$collName"/> 127 </xsl:call-template> 128 </xsl:if> 129 130 <xsl:if test="$bookswitch = 'off'"> 131 <xsl:call-template name="documentHeading"> 132 <xsl:with-param name="collName" select="$collName"/> 133 </xsl:call-template> 134 135 <xsl:call-template name="documentArrows"> 136 <xsl:with-param name="collName" select="$collName"/> 137 </xsl:call-template> 138 <xsl:call-template name="documentContent"> 139 <xsl:with-param name="collName" select="$collName"/> 140 </xsl:call-template> 141 <xsl:call-template name="documentArrows"> 142 <xsl:with-param name="collName" select="$collName"/> 143 </xsl:call-template> 144 </xsl:if> 145 <xsl:if test="$bookswitch = 'on'"> 146 <xsl:call-template name="documentHeading"> 147 <xsl:with-param name="collName" select="$collName"/> 148 </xsl:call-template> 149 <div id="bookdiv"></div> 150 <script type="text/javascript"> 151 <xsl:text disable-output-escaping="yes"> 152 var doc_url = document.URL; 153 doc_url = doc_url.replace(/(&|\?)book=[a-z]+/gi,''); 154 doc_url += '&book=flashxml'; 155 156 var flash_plug_html = "" 157 flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n'; 158 flash_plug_html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n'; 159 flash_plug_html += ' height="100%" id="Book" swLiveConnect="true" \n'; 160 flash_plug_html += ' width="100%">\n'; 161 flash_plug_html += ' <PARAM name="allowScriptAccess" value="always" />\n'; 162 flash_plug_html += ' <PARAM name="movie" value="Book.swf'; 163 flash_plug_html += '?src_image=' + escape(img_cover); 164 flash_plug_html += '&doc_url=' + escape(doc_url) 165 flash_plug_html += '" />\n'; 166 flash_plug_html += ' <PARAM name="quality" value="high" />\n'; 167 flash_plug_html += ' <PARAM name="bgcolor" value="#FFFFFF" />\n'; 168 flash_plug_html += ' <EMBED align="middle" \n'; 169 flash_plug_html += ' allowScriptAccess="always" swLiveConnect="true" \n'; 170 flash_plug_html += ' bgcolor="#FFFFFF" height="100%" name="Book" \n'; 171 flash_plug_html += ' pluginspage="http://www.macromedia.com/go/getflashplayer" \n'; 172 flash_plug_html += ' quality="high" \n'; 173 flash_plug_html += ' src="Book.swf'; 174 flash_plug_html += '?src_image=' + escape(img_cover); 175 flash_plug_html += '&doc_url=' + escape(doc_url); 176 flash_plug_html += '"\n'; 177 flash_plug_html += ' type="application/x-shockwave-flash" width="100%" />\n'; 178 flash_plug_html += '</OBJECT>\n'; 179 var flash_div = document.getElementById("bookdiv"); 180 flash_div.innerHTML = flash_plug_html; 181 </xsl:text> 182 </script> 183 </xsl:if> 184 </xsl:otherwise> 188 185 </xsl:choose> 189 </xsl:template>186 </xsl:template> 190 187 191 188 <xsl:template name="documentHeading"> … … 197 194 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/> 198 195 <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> 199 <div id="documentheading"> 200 <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> 201 </xsl:call-template></a> 202 <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> 203 </div> 204 205 <div id="docheadwrapper"> 206 <div id="documentinfo"> 196 <div id="documentheading"> 197 <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> 198 </xsl:call-template></a> 199 <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> 200 </div> 207 201 208 <xsl:choose> 209 <xsl:when test="$bookswitch = 'on'"> 210 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 211 <div id="headingimage"> 212 <xsl:call-template name="coverImage"/> 213 </div> 214 </xsl:if> 215 </xsl:when> 216 <xsl:otherwise> 217 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 218 <div id="headingimage"> 219 <xsl:call-template name="coverImage"/> 220 </div> 221 </xsl:if> 222 223 <ul id="docbuttons" > 224 <xsl:call-template name="documentButtons"> 225 <xsl:with-param name="collName" select="$collName"/> 226 </xsl:call-template> 227 </ul> 228 </xsl:otherwise> 229 </xsl:choose> 230 </div> 231 <!--<div><xsl:call-template name="enrichServices"> 232 <xsl:with-param name="collName" select="$collName"/> 233 </xsl:call-template></div>--> 234 <xsl:if test="$bookswitch = 'off'"> 235 <xsl:if test="string($doTOC) != 'false'"> 236 <div id="toc"> 237 <xsl:call-template name="TOC"> 238 <xsl:with-param name="collName" select="$collName"/> 239 </xsl:call-template> 202 <div id="docheadwrapper"> 203 <div id="documentinfo"> 204 205 <xsl:choose> 206 <xsl:when test="$bookswitch = 'on'"> 207 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 208 <div id="headingimage"> 209 <xsl:call-template name="coverImage"/> 210 </div> 211 </xsl:if> 212 </xsl:when> 213 <xsl:otherwise> 214 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 215 <div id="headingimage"> 216 <xsl:call-template name="coverImage"/> 217 </div> 218 </xsl:if> 219 220 <ul id="docbuttons" > 221 <xsl:call-template name="documentButtons"> 222 <xsl:with-param name="collName" select="$collName"/> 223 </xsl:call-template> 224 </ul> 225 </xsl:otherwise> 226 </xsl:choose> 240 227 </div> 241 </xsl:if> 242 </xsl:if> 243 </div> 244 </xsl:template> 228 <!--<div><xsl:call-template name="enrichServices"> 229 <xsl:with-param name="collName" select="$collName"/> 230 </xsl:call-template></div>--> 231 <xsl:if test="$bookswitch = 'off'"> 232 <xsl:if test="string($doTOC) != 'false'"> 233 <div id="toc"> 234 <xsl:call-template name="TOC"> 235 <xsl:with-param name="collName" select="$collName"/> 236 </xsl:call-template> 237 </div> 238 </xsl:if> 239 </xsl:if> 240 </div> 241 </xsl:template> 245 242 246 243 <xsl:template name="coverImage"> 247 <xsl:choose>248 249 250 251 252 253 254 255 256 244 <xsl:choose> 245 <xsl:when test="$bookswitch = 'on'"> 246 <script type="text/javascript"> 247 <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='archivedir']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text> 248 </script> 249 </xsl:when> 250 <xsl:otherwise> 251 <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> 252 </xsl:otherwise> 253 </xsl:choose> 257 254 </xsl:template> 258 255 … … 264 261 <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/> 265 262 266 267 268 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">269 <li>263 264 <!-- expand document --> 265 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'"> 266 <li> 270 267 <xsl:choose><xsl:when test="string($ed)='1'"> 271 272 273 274 275 276 <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>277 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>278 </a>279 280 281 282 283 284 285 268 <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> 269 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/> 270 </a> 271 </xsl:when> 272 <xsl:otherwise> 273 <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> 274 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/> 275 </a> 276 </xsl:otherwise> 277 </xsl:choose> 278 </li> 279 </xsl:if> 280 281 <!-- expand contents --> 282 <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'"> 286 283 <li> 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 284 <xsl:choose><xsl:when test="string($ec)='1'"> 285 <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> 286 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a> 287 </xsl:when> 288 <xsl:otherwise> 289 <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> 290 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/> 291 </a> 292 </xsl:otherwise> 293 </xsl:choose> 294 </li> 295 </xsl:if> 296 297 <!-- detach page --> 298 <xsl:variable name="paramList" select="/page/pageRequest/paramList"/> 299 <li> 300 <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> 301 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/> 302 </a></li> 303 </xsl:template> 307 304 308 305 <xsl:template name="TOC"> … … 321 318 </xsl:choose> 322 319 </xsl:template> 323 320 324 321 <xsl:template name="hierarchicalContents"> 325 322 <xsl:param name="collName"/> … … 335 332 <ul id="tocnodes"> 336 333 <li> 337 338 339 340 341 <xsl:if test="string($oc)!='0'">342 343 <xsl:for-each select="documentNode/documentNode[@nodeID]">344 345 334 <xsl:choose><xsl:when test="string($oc)='0'"> 335 <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> 336 </xsl:when> 337 <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')"/> 338 <xsl:if test="string($oc)!='0'"> 339 <ul class="tocnode"> 340 <xsl:for-each select="documentNode/documentNode[@nodeID]"> 341 <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> 342 </xsl:for-each> 346 343 </ul> 347 344 </xsl:if> 348 345 </li> 349 346 </ul> … … 360 357 <xsl:param name="p.c"/> 361 358 <!-- Display the appropriate image, depending on the node type --> 362 363 364 365 359 <li> 360 <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> 361 <xsl:apply-templates select="." mode="displayNodeIcon"/> 362 </a> 366 363 367 364 <!-- Display associated title, bolded if the node has content --> 368 369 370 371 372 373 374 375 376 <!-- Apply recursively to the children of this node -->377 <xsl:if test="documentNode[@nodeID]">378 379 380 381 382 383 384 385 </xsl:if>365 <xsl:choose> 366 <xsl:when test="nodeContent"> 367 <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span> 368 </xsl:when> 369 <xsl:otherwise> 370 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/> 371 </xsl:otherwise> 372 </xsl:choose> 373 <!-- Apply recursively to the children of this node --> 374 <xsl:if test="documentNode[@nodeID]"> 375 <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]"> 376 <xsl:with-param name="collName" select="$collName"/> 377 <xsl:with-param name="ec" select="$ec"/> 378 <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"/> 379 <!--<xsl:with-param name="depth" select="$depth + 1"/>--> 380 </xsl:apply-templates> 381 </ul> 382 </xsl:if> 386 383 </li> 387 384 </xsl:template> … … 389 386 <!-- default content is to print the title and content of any documentNodes that have nodeContent --> 390 387 <xsl:template name="documentContent"> 391 <div class="documenttext">392 <xsl:choose>393 394 395 <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>396 397 </xsl:choose>398 </div>388 <div class="documenttext"> 389 <xsl:choose> 390 <xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when> 391 <xsl:otherwise> 392 <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/> 393 </xsl:otherwise> 394 </xsl:choose> 395 </div> 399 396 </xsl:template> 400 397 … … 414 411 <xsl:choose> 415 412 <xsl:when test="not(name())"> 416 413 <xsl:value-of select="." disable-output-escaping="yes"/> 417 414 </xsl:when> 418 415 <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise> … … 422 419 423 420 <xsl:template name="xmldocumentContentPeeling"> 424 425 426 427 428 429 430 431 432 433 421 <xsl:choose> 422 <xsl:when test="@docType='simple'"> 423 <xsl:apply-templates select="nodeContent"/> 424 </xsl:when> 425 <xsl:otherwise> 426 <xsl:call-template name="xmlpeelingContents" /> 427 </xsl:otherwise> 428 </xsl:choose> 429 </xsl:template> 430 434 431 <xsl:template name="xmlpeelingContents"> 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 432 <xsl:if test="documentNode"> 433 <xsl:apply-templates select="documentNode" mode="xmlpeeling" /> 434 </xsl:if> 435 </xsl:template> 436 437 <xsl:template match="documentNode" mode="xmlpeeling"> 438 <!-- get title --> 439 <xsl:choose> 440 <xsl:when test="nodeContent"> 441 <xsl:text disable-output-escaping="yes"> 442 <Section> 443 <Description> 444 <Metadata name="Title"> 445 </xsl:text> 446 <xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/> 447 <xsl:text disable-output-escaping="yes"> 448 </Metadata> 449 </Description> 450 </xsl:text> 451 <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/> 452 <xsl:text disable-output-escaping="yes"></Sec></xsl:text> 453 </xsl:when> 454 </xsl:choose> 455 456 <!-- recurse to the children --> 457 <xsl:if test="documentNode"> 458 <xsl:apply-templates select="documentNode" mode="xmlpeeling" /> 459 </xsl:if> 460 461 <!-- end the section --> 462 <xsl:text disable-output-escaping="yes"> 463 </Section> 464 </xsl:text> 465 </xsl:template> 469 466 470 467 <!-- match any file nodes --> … … 495 492 <xsl:variable name="serviceargs"> 496 493 <xsl:for-each select="param">&s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each> 497 </xsl:variable>494 </xsl:variable> 498 495 <a href="{$library_name}?{$actionargs}&c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a> 499 496 </xsl:template> … … 596 593 597 594 <div class="documentarrows"> 598 <xsl:if test="not(string($ed)='1')">599 600 601 602 603 604 605 606 607 </xsl:if>595 <xsl:if test="not(string($ed)='1')"> 596 <xsl:call-template name="documentArrow"> 597 <xsl:with-param name="collName" select="$collName"/> 598 <xsl:with-param name="direction">back</xsl:with-param> 599 </xsl:call-template> 600 <xsl:call-template name="documentArrow"> 601 <xsl:with-param name="collName" select="$collName"/> 602 <xsl:with-param name="direction">forward</xsl:with-param> 603 </xsl:call-template> 604 </xsl:if> 608 605 </div> 609 606 … … 615 612 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/> 616 613 <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>614 <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 615 </xsl:if> 619 616 </xsl:template> 620 617 621 618 <xsl:template name="externalPage"> 622 623 619 <xsl:param name="external"/> 620 <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 621 <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2> 625 622 <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
Note:
See TracChangeset
for help on using the changeset viewer.