[4047] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <xsl:stylesheet version="1.0"
|
---|
[4712] | 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"
|
---|
[9874] | 6 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
[4712] | 7 | extension-element-prefixes="java util"
|
---|
[5690] | 8 | exclude-result-prefixes="java util gsf">
|
---|
[4047] | 9 |
|
---|
[4712] | 10 | <xsl:include href="style.xsl"/>
|
---|
| 11 | <xsl:include href="service-params.xsl"/>
|
---|
[12015] | 12 | <xsl:include href="berrytools.xsl"/>
|
---|
| 13 |
|
---|
[4712] | 14 | <xsl:output method="html"/>
|
---|
[12152] | 15 | <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
|
---|
[4877] | 16 |
|
---|
[8526] | 17 | <xsl:template name="pageTitle">
|
---|
[4712] | 18 | <xsl:variable name="docID" select="/page/pageResponse/document/@selectedNode"/>
|
---|
[8526] | 19 | <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>
|
---|
[4047] | 20 | </xsl:template>
|
---|
| 21 |
|
---|
[4253] | 22 | <!-- this is hard coded for GATE, should somehow do it dynamically-->
|
---|
[8526] | 23 | <xsl:template name="pageStyle">
|
---|
[4047] | 24 | <style type="text/css">
|
---|
| 25 | <xsl:text disable-output-escaping="yes">
|
---|
| 26 | span.Location { display:inline; color : red }
|
---|
| 27 | span.Person { display:inline; color : green }
|
---|
| 28 | span.Organization { display:inline; color : yellow }
|
---|
| 29 | span.Date { display:inline; color : blue }
|
---|
[4288] | 30 | span.query_term {display: inline; background-color : yellow }
|
---|
[4047] | 31 | </xsl:text>
|
---|
| 32 | </style>
|
---|
[12015] | 33 | <!--TODO: add berry basket switch-->
|
---|
[12152] | 34 | <!--<xsl:if test="$berryBaskets = 'true'">-->
|
---|
| 35 | <xsl:if test="$berrybasketswitch = 'on'">
|
---|
[12015] | 36 | <xsl:call-template name="berryStyleSheet"/>
|
---|
| 37 | <xsl:call-template name="js-library"/>
|
---|
[12152] | 38 | </xsl:if>
|
---|
[4047] | 39 | </xsl:template>
|
---|
[4253] | 40 |
|
---|
[4047] | 41 | <xsl:template match="pageResponse">
|
---|
[4712] | 42 | <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
|
---|
[5690] | 43 | <xsl:call-template name="standardPageBanner">
|
---|
| 44 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 45 | </xsl:call-template>
|
---|
[5123] | 46 | <xsl:call-template name="navigationBar">
|
---|
[5119] | 47 | <xsl:with-param name="collName" select="$collName"/>
|
---|
[12015] | 48 | </xsl:call-template>
|
---|
[12152] | 49 |
|
---|
| 50 | <!--<xsl:if test="$berryBaskets = 'true'">-->
|
---|
| 51 | <xsl:if test="$berrybasketswitch = 'on'">
|
---|
[12015] | 52 | <xsl:call-template name="documentBerryBasket">
|
---|
| 53 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 54 | <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/>
|
---|
| 55 | <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
|
---|
| 56 | <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/>
|
---|
| 57 | </xsl:call-template>
|
---|
[12152] | 58 | </xsl:if>
|
---|
[13267] | 59 |
|
---|
[12152] | 60 | <!-- display the document -->
|
---|
[13505] | 61 | <div id="content">
|
---|
[5690] | 62 | <xsl:apply-templates select="document">
|
---|
| 63 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 64 | </xsl:apply-templates>
|
---|
[13267] | 65 | </div>
|
---|
[4253] | 66 | </xsl:template>
|
---|
| 67 |
|
---|
[4712] | 68 | <xsl:template match="document">
|
---|
[13267] | 69 | <xsl:param name="collName"/>
|
---|
| 70 |
|
---|
[4712] | 71 | <xsl:call-template name="documentHeading">
|
---|
| 72 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 73 | </xsl:call-template>
|
---|
[13267] | 74 |
|
---|
[11281] | 75 | <xsl:call-template name="documentArrows">
|
---|
| 76 | <xsl:with-param name="collName" select="$collName"/>
|
---|
[13267] | 77 | </xsl:call-template>
|
---|
[4712] | 78 | <xsl:call-template name="documentContent">
|
---|
| 79 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 80 | </xsl:call-template>
|
---|
[11281] | 81 | <xsl:call-template name="documentArrows">
|
---|
| 82 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 83 | </xsl:call-template>
|
---|
[13267] | 84 | </xsl:template>
|
---|
[4047] | 85 |
|
---|
[4712] | 86 | <xsl:template name="documentHeading">
|
---|
| 87 | <xsl:param name="collName"/>
|
---|
[5690] | 88 | <xsl:variable name="doCoverImage" select="/page/pageResponse/format/gsf:option[@name='coverImages']/@value"/>
|
---|
[8006] | 89 | <xsl:variable name="doTOC" select="/page/pageResponse/format/gsf:option[@name='documentTOC']/@value"/>
|
---|
[5690] | 90 | <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
|
---|
| 91 | <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
|
---|
| 92 | <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
|
---|
[9008] | 93 | <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>
|
---|
[13505] | 94 | <div id="documentheading">
|
---|
[9874] | 95 | <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">Close this book and return to search/browse</xsl:with-param>
|
---|
[13267] | 96 | </xsl:call-template></a>
|
---|
| 97 | <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>
|
---|
| 98 | </div>
|
---|
| 99 |
|
---|
[13831] | 100 | <div id="docheadwrapper">
|
---|
[13505] | 101 | <div id="documentinfo">
|
---|
[13831] | 102 | <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
|
---|
[13505] | 103 | <div id="headingimage">
|
---|
[13831] | 104 | <xsl:call-template name="coverImage"/>
|
---|
| 105 | </div>
|
---|
| 106 | </xsl:if>
|
---|
[13267] | 107 |
|
---|
[13505] | 108 | <ul id="docbuttons" >
|
---|
[13267] | 109 | <xsl:call-template name="documentButtons">
|
---|
| 110 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 111 | </xsl:call-template>
|
---|
[13505] | 112 | </ul>
|
---|
| 113 | </div>
|
---|
[13267] | 114 | <!--<div><xsl:call-template name="enrichServices">
|
---|
| 115 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 116 | </xsl:call-template></div>-->
|
---|
| 117 | <xsl:if test="string($doTOC) != 'false'">
|
---|
[13505] | 118 | <div id="toc">
|
---|
[13267] | 119 | <xsl:call-template name="TOC">
|
---|
| 120 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 121 | </xsl:call-template>
|
---|
| 122 | </div>
|
---|
| 123 | </xsl:if>
|
---|
| 124 |
|
---|
[13831] | 125 | </div>
|
---|
[13267] | 126 | </xsl:template>
|
---|
[5690] | 127 |
|
---|
[4712] | 128 | <xsl:template name="coverImage">
|
---|
| 129 | <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>
|
---|
| 130 | </xsl:template>
|
---|
[4047] | 131 |
|
---|
[5690] | 132 | <xsl:template name="documentButtons">
|
---|
| 133 | <xsl:param name="collName"/>
|
---|
| 134 | <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
|
---|
| 135 | <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
|
---|
| 136 | <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
|
---|
[5695] | 137 | <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/>
|
---|
[8508] | 138 |
|
---|
[13267] | 139 |
|
---|
[6373] | 140 | <!-- expand document -->
|
---|
| 141 | <!-- this doesn't work with MG so comment it out for now -->
|
---|
[7632] | 142 |
|
---|
[13267] | 143 | <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">
|
---|
[13505] | 144 | <li>
|
---|
| 145 | <xsl:choose><xsl:when test="string($ed)='1'">
|
---|
[13267] | 146 | <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>
|
---|
| 147 | <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
|
---|
[5690] | 148 | </a>
|
---|
| 149 | </xsl:when>
|
---|
| 150 | <xsl:otherwise>
|
---|
[13267] | 151 | <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>
|
---|
| 152 | <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
|
---|
[5690] | 153 | </a>
|
---|
| 154 | </xsl:otherwise>
|
---|
| 155 | </xsl:choose>
|
---|
[13505] | 156 | </li>
|
---|
[6373] | 157 | </xsl:if>
|
---|
[7632] | 158 |
|
---|
[6373] | 159 | <!-- expand contents -->
|
---|
[8508] | 160 | <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
|
---|
[13505] | 161 | <li>
|
---|
| 162 | <xsl:choose><xsl:when test="string($ec)='1'">
|
---|
[13267] | 163 | <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>
|
---|
[13580] | 164 | <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a>
|
---|
[5690] | 165 | </xsl:when>
|
---|
| 166 | <xsl:otherwise>
|
---|
[13267] | 167 | <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>
|
---|
| 168 | <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/>
|
---|
[5690] | 169 | </a>
|
---|
| 170 | </xsl:otherwise>
|
---|
| 171 | </xsl:choose>
|
---|
[13505] | 172 | </li>
|
---|
[6242] | 173 | </xsl:if>
|
---|
[13267] | 174 |
|
---|
[6373] | 175 | <!-- detach page -->
|
---|
[5704] | 176 | <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
|
---|
[13505] | 177 | <li>
|
---|
[13267] | 178 | <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>
|
---|
| 179 | <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
|
---|
[13505] | 180 | </a></li>
|
---|
[13267] | 181 | </xsl:template>
|
---|
[5690] | 182 |
|
---|
[4712] | 183 | <xsl:template name="TOC">
|
---|
[4253] | 184 | <xsl:param name="collName"/>
|
---|
[4712] | 185 | <xsl:choose>
|
---|
[4900] | 186 | <xsl:when test="@docType='hierarchy'">
|
---|
[4712] | 187 | <xsl:call-template name="hierarchicalContents">
|
---|
| 188 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 189 | </xsl:call-template>
|
---|
| 190 | </xsl:when>
|
---|
[4900] | 191 | <xsl:when test="@docType='paged'">
|
---|
[4712] | 192 | <xsl:call-template name="pagedContents">
|
---|
| 193 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 194 | </xsl:call-template>
|
---|
| 195 | </xsl:when>
|
---|
| 196 | </xsl:choose>
|
---|
[4253] | 197 | </xsl:template>
|
---|
[5690] | 198 |
|
---|
[4712] | 199 | <xsl:template name="hierarchicalContents">
|
---|
[4253] | 200 | <xsl:param name="collName"/>
|
---|
[5690] | 201 | <xsl:variable name="oc" select="/page/pageRequest/paramList/param[@name='oc']/@value"/>
|
---|
| 202 | <xsl:variable name="d" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
|
---|
| 203 | <xsl:variable name="sib" select="/page/pageRequest/paramList/param[@name='sib']/@value"/>
|
---|
[5699] | 204 | <xsl:variable name="ec" select="/page/pageRequest/paramList/param[@name='ec']/@value"/>
|
---|
[11017] | 205 | <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
|
---|
| 206 | <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
|
---|
| 207 | <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
|
---|
| 208 | <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>
|
---|
[5690] | 209 | <xsl:if test="documentNode[@nodeID]">
|
---|
[13505] | 210 | <ul id="tocnodes">
|
---|
| 211 | <li>
|
---|
[5690] | 212 | <xsl:choose><xsl:when test="string($oc)='0'">
|
---|
| 213 | <a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=1"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title">open the table of contents</xsl:with-param></xsl:call-template></a>
|
---|
| 214 | </xsl:when>
|
---|
[13505] | 215 | <xsl:otherwise><a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=0"><xsl:call-template name="openfolderimg"><xsl:with-param name="title">close the table of contents</xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose>Table of Contents
|
---|
[5690] | 216 | <xsl:if test="string($oc)!='0'">
|
---|
[13505] | 217 | <ul class="tocnode">
|
---|
[13267] | 218 | <xsl:for-each select="documentNode/documentNode[@nodeID]">
|
---|
[11017] | 219 | <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>
|
---|
[5690] | 220 | </xsl:for-each>
|
---|
[13505] | 221 | </ul>
|
---|
[13267] | 222 | </xsl:if>
|
---|
[13505] | 223 | </li>
|
---|
| 224 | </ul>
|
---|
[5690] | 225 | </xsl:if>
|
---|
[4253] | 226 | </xsl:template>
|
---|
| 227 |
|
---|
[5690] | 228 | <!-- each icon-title pair is a row in a table. children go in a table in another row -->
|
---|
[4253] | 229 | <xsl:template match="documentNode">
|
---|
| 230 | <xsl:param name="collName"/>
|
---|
[5701] | 231 | <xsl:param name="ec"/>
|
---|
[11017] | 232 | <xsl:param name="p.a"/>
|
---|
| 233 | <xsl:param name="p.s"/>
|
---|
| 234 | <xsl:param name="p.sa"/>
|
---|
| 235 | <xsl:param name="p.c"/>
|
---|
[5690] | 236 | <!-- Display the appropriate image, depending on the node type -->
|
---|
[13505] | 237 | <li>
|
---|
[11281] | 238 | <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>
|
---|
[5690] | 239 | <xsl:apply-templates select="." mode="displayNodeIcon"/>
|
---|
| 240 | </a>
|
---|
| 241 |
|
---|
| 242 | <!-- Display associated title, bolded if the node has content -->
|
---|
| 243 | <xsl:choose>
|
---|
[13548] | 244 | <xsl:when test="nodeContent">
|
---|
| 245 | <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
|
---|
[5690] | 246 | </xsl:when>
|
---|
| 247 | <xsl:otherwise>
|
---|
| 248 | <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
|
---|
| 249 | </xsl:otherwise>
|
---|
| 250 | </xsl:choose>
|
---|
[4253] | 251 | <!-- Apply recursively to the children of this node -->
|
---|
[5690] | 252 | <xsl:if test="documentNode[@nodeID]">
|
---|
[13505] | 253 | <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
|
---|
[5690] | 254 | <xsl:with-param name="collName" select="$collName"/>
|
---|
[5701] | 255 | <xsl:with-param name="ec" select="$ec"/>
|
---|
[11017] | 256 | <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"/>
|
---|
[5690] | 257 | <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
|
---|
| 258 | </xsl:apply-templates>
|
---|
[13505] | 259 | </ul>
|
---|
[13267] | 260 | </xsl:if>
|
---|
[13505] | 261 | </li>
|
---|
[4253] | 262 | </xsl:template>
|
---|
| 263 |
|
---|
[7760] | 264 | <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
|
---|
[4712] | 265 | <xsl:template name="documentContent">
|
---|
[13267] | 266 | <div class="documenttext">
|
---|
[8436] | 267 | <xsl:choose>
|
---|
| 268 | <xsl:when test="@docType='simple'">
|
---|
| 269 | <xsl:apply-templates select="nodeContent"/>
|
---|
| 270 | </xsl:when>
|
---|
| 271 | <xsl:otherwise>
|
---|
| 272 | <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
|
---|
| 273 | </xsl:otherwise>
|
---|
| 274 | </xsl:choose>
|
---|
[13267] | 275 | </div>
|
---|
[4712] | 276 | </xsl:template>
|
---|
| 277 |
|
---|
[7760] | 278 | <xsl:template match="documentNode" mode="content">
|
---|
| 279 | <xsl:if test="nodeContent">
|
---|
| 280 | <xsl:if test="metadataList/metadata[@name='Title']">
|
---|
| 281 | <h3><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></h3>
|
---|
| 282 | </xsl:if>
|
---|
| 283 | <xsl:apply-templates select="nodeContent"/>
|
---|
| 284 | </xsl:if>
|
---|
| 285 | </xsl:template>
|
---|
[4047] | 286 |
|
---|
[4712] | 287 | <!-- the actual text/content -->
|
---|
| 288 | <xsl:template match="nodeContent">
|
---|
| 289 | <p/>
|
---|
[5690] | 290 | <xsl:for-each select="node()">
|
---|
| 291 | <xsl:choose>
|
---|
| 292 | <xsl:when test="not(name())"><xsl:value-of select="." disable-output-escaping="yes"/></xsl:when>
|
---|
| 293 | <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
---|
| 294 | </xsl:choose>
|
---|
| 295 | </xsl:for-each>
|
---|
[4712] | 296 | </xsl:template>
|
---|
[5119] | 297 |
|
---|
[8526] | 298 | <!-- match any file nodes -->
|
---|
| 299 | <xsl:template match="file">
|
---|
| 300 | <xsl:variable name="httpPath" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
|
---|
| 301 | <xsl:choose>
|
---|
| 302 | <xsl:when test="util:isImage(@mimeType)">
|
---|
| 303 | <img src="{$httpPath}/{@href}"/>
|
---|
| 304 | </xsl:when>
|
---|
| 305 | <xsl:otherwise>
|
---|
| 306 | <a href="{$httpPath}/{@href}"><xsl:value-of select="@href"/></a>
|
---|
| 307 | </xsl:otherwise>
|
---|
| 308 | </xsl:choose>
|
---|
| 309 | </xsl:template>
|
---|
| 310 |
|
---|
[5119] | 311 | <!-- match any link nodes -->
|
---|
| 312 | <xsl:template match="link">
|
---|
| 313 | <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
|
---|
| 314 | <xsl:variable name="actionargs">
|
---|
| 315 | <xsl:choose>
|
---|
| 316 | <xsl:when test="@type='document'">a=d</xsl:when>
|
---|
[9874] | 317 | <xsl:when test="@type='query'">a=q&s=<xsl:value-of select="@service"/>&rt=rd</xsl:when>
|
---|
[5119] | 318 | <xsl:otherwise>
|
---|
| 319 | p
|
---|
| 320 | </xsl:otherwise>
|
---|
| 321 | </xsl:choose>
|
---|
| 322 | </xsl:variable>
|
---|
| 323 | <xsl:variable name="serviceargs">
|
---|
| 324 | <xsl:for-each select="param">&s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
|
---|
| 325 | </xsl:variable>
|
---|
| 326 | <a href="{$library_name}?{$actionargs}&c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
|
---|
| 327 | </xsl:template>
|
---|
[4712] | 328 |
|
---|
| 329 | <!-- match any annotations and make them span elements -->
|
---|
| 330 | <xsl:template match="annotation">
|
---|
| 331 | <span class="{@type}"><xsl:value-of disable-output-escaping="yes" select="."/></span>
|
---|
| 332 | </xsl:template>
|
---|
[5690] | 333 |
|
---|
[4712] | 334 | <!-- paged naviagtion : INCOMPLETE!!-->
|
---|
| 335 | <xsl:template name="pagedContents">
|
---|
[4047] | 336 | <xsl:param name="collName"/>
|
---|
[4712] | 337 | <xsl:variable name="pos" select="nodeStructureInfo/info[@name='siblingPosition']/@value"/>
|
---|
| 338 | <xsl:variable name="length" select="nodeStructureInfo/info[@name='numSiblings']/@value"/>
|
---|
| 339 | <xsl:variable name="children" select="nodeStructureInfo/info[@name='numChildren']/@value"/>
|
---|
| 340 | <table>
|
---|
| 341 | <xsl:choose>
|
---|
| 342 | <xsl:when test="$pos=-1"><!-- a doc -->
|
---|
| 343 | <tr valign="top">
|
---|
| 344 | <td align="left">
|
---|
| 345 | </td>
|
---|
| 346 | <td align="center"><center>
|
---|
[4877] | 347 | <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.pages', $children)"/></b>
|
---|
[4712] | 348 | </center></td>
|
---|
| 349 | <td align="right">
|
---|
[5431] | 350 | <a href="{$library_name}?a=d&c={$collName}&d={@selectedNode}.fc"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
|
---|
[4712] | 351 | </td>
|
---|
| 352 | </tr>
|
---|
| 353 | </xsl:when>
|
---|
| 354 |
|
---|
| 355 | <xsl:otherwise> <!-- an internal node -->
|
---|
| 356 | <tr valign="top">
|
---|
| 357 | <td align="left">
|
---|
| 358 | <xsl:if test=" not ( $pos = 1 )">
|
---|
[5431] | 359 | <a href="{$library_name}?a=d&c={$collName}&d={@selectedNode}.ps"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
|
---|
[4712] | 360 | </xsl:if>
|
---|
| 361 | </td>
|
---|
| 362 | <td align="center"><center>
|
---|
[4877] | 363 | <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.pageof', concat($pos, ';', $length))"/></b>
|
---|
[4712] | 364 | </center></td>
|
---|
| 365 | <td align="right">
|
---|
| 366 | <xsl:if test=" not($pos = $length)">
|
---|
[5431] | 367 | <a href="{$library_name}?a=d&c={$collName}&d={@selectedNode}.ns"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
|
---|
[4712] | 368 | </xsl:if>
|
---|
| 369 | </td>
|
---|
| 370 | </tr>
|
---|
| 371 | </xsl:otherwise>
|
---|
| 372 | </xsl:choose>
|
---|
| 373 | <tr valign="middle">
|
---|
[4877] | 374 | <td align='center' valign='top' colspan='3'>
|
---|
[5381] | 375 | <form name="GotoForm" method="get" action="{$library_name}">
|
---|
[4877] | 376 | <input type='hidden' name='a' value='d'/>
|
---|
| 377 | <input type='hidden' name='c' value='{$collName}'/>
|
---|
| 378 | <input type='hidden' name='d' value='{@selectedNode}'/>
|
---|
| 379 | <input type="text" name="gp" size="3" maxlength="4"/>
|
---|
| 380 | <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'document.gotopage')"/></xsl:attribute></input>
|
---|
| 381 | </form>
|
---|
[4712] | 382 | </td>
|
---|
| 383 | </tr>
|
---|
| 384 | </table>
|
---|
| 385 | </xsl:template>
|
---|
| 386 |
|
---|
| 387 | <xsl:template name="enrichServices">
|
---|
| 388 | <xsl:param name="collName"/>
|
---|
| 389 | <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
|
---|
[6373] | 390 | <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
|
---|
[4712] | 391 | <xsl:for-each select="../serviceList/service">
|
---|
| 392 | <table border='1' cellspacing='0'>
|
---|
| 393 | <tr><td>
|
---|
[4900] | 394 | <p /><xsl:value-of select="displayItem[@name='name']"/><p/>
|
---|
[5381] | 395 | <form name="EnrichForm" method="get" action="{$library_name}">
|
---|
[4712] | 396 | <xsl:apply-templates select="paramList"/>
|
---|
| 397 | <input type='hidden' name='a' value='d'/>
|
---|
| 398 | <input type='hidden' name='d' value='{$docID}'/>
|
---|
| 399 | <input type='hidden' name='c' value='{$collName}'/>
|
---|
[6373] | 400 | <xsl:if test='$request-params/param[@name="sib"]'>
|
---|
| 401 | <input type='hidden' name='sib'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="sib"]/@value'/></xsl:attribute></input></xsl:if>
|
---|
[4253] | 402 | <input type='hidden' name='s' value='{@name}'/>
|
---|
[6373] | 403 | <input type='hidden' name='p.a'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.a"]'/></xsl:attribute></input>
|
---|
| 404 | <input type='hidden' name='p.sa'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.sa"]'/></xsl:attribute></input>
|
---|
| 405 | <input type='hidden' name='p.s'><xsl:attribute name='value'><xsl:value-of select='$request-params/param[@name="p.s"]'/></xsl:attribute></input>
|
---|
| 406 | <input type='hidden' name='end' value='1'/>
|
---|
[4900] | 407 | <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
|
---|
[4712] | 408 | </form>
|
---|
| 409 | </td></tr>
|
---|
| 410 | </table>
|
---|
[4047] | 411 | </xsl:for-each>
|
---|
| 412 | </xsl:template>
|
---|
| 413 |
|
---|
| 414 | <xsl:template match="paramList" mode="hidden">
|
---|
| 415 | <xsl:for-each select="param">
|
---|
| 416 | <input type='hidden' name='{@name}' value='{@value}'/><xsl:text>
|
---|
[4712] | 417 | </xsl:text>
|
---|
[4047] | 418 | </xsl:for-each>
|
---|
| 419 | </xsl:template>
|
---|
[4712] | 420 |
|
---|
[11281] | 421 | <xsl:template name="documentArrows">
|
---|
| 422 | <xsl:param name="collName"/>
|
---|
[13267] | 423 | <div class="documentarrows">
|
---|
| 424 | <xsl:call-template name="documentArrow">
|
---|
| 425 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 426 | <xsl:with-param name="direction">back</xsl:with-param>
|
---|
| 427 | </xsl:call-template>
|
---|
[11281] | 428 | <xsl:call-template name="documentArrow">
|
---|
| 429 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 430 | <xsl:with-param name="direction">forward</xsl:with-param>
|
---|
| 431 | </xsl:call-template>
|
---|
[13267] | 432 | </div>
|
---|
| 433 |
|
---|
[11281] | 434 | </xsl:template>
|
---|
| 435 |
|
---|
| 436 | <xsl:template name="documentArrow">
|
---|
| 437 | <xsl:param name="collName"/>
|
---|
| 438 | <xsl:param name="direction"/>
|
---|
| 439 | <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
|
---|
[13580] | 440 | <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'>
|
---|
[13267] | 441 | <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>
|
---|
[13580] | 442 | </xsl:if>
|
---|
[11281] | 443 | </xsl:template>
|
---|
[4047] | 444 | </xsl:stylesheet>
|
---|
| 445 |
|
---|
| 446 |
|
---|
| 447 |
|
---|
| 448 |
|
---|