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