[23972] | 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 | extension-element-prefixes="java util"
|
---|
| 7 | exclude-result-prefixes="java util">
|
---|
| 8 |
|
---|
| 9 | <!-- style includes global params interface_name, library_name -->
|
---|
| 10 | <xsl:include href="style.xsl"/>
|
---|
| 11 | <xsl:include href="classifiertools.xsl"/>
|
---|
| 12 | <xsl:include href="berrytools.xsl"/>
|
---|
| 13 |
|
---|
| 14 | <xsl:output method="html"/>
|
---|
| 15 |
|
---|
| 16 | <!-- the main page layout template is here -->
|
---|
| 17 | <xsl:template match="page">
|
---|
| 18 | <html>
|
---|
| 19 | <head>
|
---|
| 20 | <title>
|
---|
| 21 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
| 22 | <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
|
---|
| 23 | </title>
|
---|
| 24 | <xsl:call-template name="globalStyle"/>
|
---|
| 25 | <xsl:call-template name="pageStyle"/>
|
---|
| 26 | </head>
|
---|
| 27 | <body>
|
---|
| 28 | <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
|
---|
| 29 | <div id="page-wrapper">
|
---|
| 30 | <xsl:call-template name="response" />
|
---|
| 31 | <xsl:call-template name="greenstoneFooter"/>
|
---|
| 32 | </div>
|
---|
| 33 | </body>
|
---|
| 34 | </html>
|
---|
| 35 | </xsl:template>
|
---|
| 36 |
|
---|
| 37 | <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
|
---|
| 38 |
|
---|
| 39 | <xsl:template name="pageTitle">
|
---|
| 40 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
| 41 | </xsl:template>
|
---|
| 42 |
|
---|
| 43 | <!-- page specific style goes here -->
|
---|
| 44 | <xsl:template name="pageStyle">
|
---|
| 45 | <xsl:if test="$berrybasketswitch = 'on'">
|
---|
| 46 | <xsl:call-template name="berryStyleSheet"/>
|
---|
| 47 | <xsl:call-template name="js-library"/>
|
---|
| 48 | </xsl:if>
|
---|
| 49 | </xsl:template>
|
---|
| 50 |
|
---|
| 51 |
|
---|
| 52 | <xsl:template match="pageResponse">
|
---|
| 53 | <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
|
---|
| 54 | <xsl:variable name="serviceName"><xsl:value-of select="service/@name"/></xsl:variable>
|
---|
| 55 | <xsl:call-template name="standardPageBanner">
|
---|
| 56 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 57 | </xsl:call-template>
|
---|
| 58 |
|
---|
| 59 | <xsl:call-template name="navigationBar">
|
---|
| 60 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 61 | </xsl:call-template>
|
---|
| 62 |
|
---|
| 63 | <!-- Sam's div code -->
|
---|
| 64 |
|
---|
| 65 | <!-- <xsl:if test="/page/pageRequest[@name='output']='debug'"> -->
|
---|
| 66 |
|
---|
| 67 | <xsl:variable name="fmt">
|
---|
| 68 | <xsl:call-template name="xml-to-string">
|
---|
| 69 | <xsl:with-param name="node-set" select="//format[@type='browse']"/>
|
---|
| 70 | </xsl:call-template>
|
---|
| 71 | </xsl:variable>
|
---|
| 72 |
|
---|
| 73 | <!-- <xsl:variable name="tok" select="fn:tokenize($fmt,'/s+')"/> -->
|
---|
| 74 |
|
---|
[24115] | 75 | <!--<div id="format">
|
---|
[23972] | 76 | <p>
|
---|
| 77 | <b>Format string here</b>
|
---|
| 78 | <i>
|
---|
[24115] | 79 | <xsl:value-of select="$fmt"/>-->
|
---|
[23972] | 80 | <!-- <xsl:value-of select="$tok"/> -->
|
---|
[24115] | 81 | <!--</i>
|
---|
[23972] | 82 | </p>
|
---|
[24115] | 83 | </div>-->
|
---|
[23972] | 84 | <!-- </xsl:if> -->
|
---|
| 85 |
|
---|
| 86 |
|
---|
| 87 | <div id="content">
|
---|
| 88 | <xsl:apply-templates select="service/classifierList">
|
---|
| 89 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 90 | <xsl:with-param name="serviceName" select="$serviceName"/>
|
---|
| 91 | </xsl:apply-templates>
|
---|
| 92 |
|
---|
| 93 | <xsl:if test="$berrybasketswitch = 'on'">
|
---|
| 94 | <xsl:call-template name="berrybasket" />
|
---|
| 95 | </xsl:if>
|
---|
| 96 | <xsl:apply-templates select="classifier">
|
---|
| 97 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 98 | <xsl:with-param name="serviceName" select="$serviceName"/>
|
---|
| 99 | </xsl:apply-templates>
|
---|
| 100 | </div>
|
---|
| 101 | </xsl:template>
|
---|
| 102 |
|
---|
| 103 | <xsl:template match="classifierList">
|
---|
| 104 | <xsl:param name="collName"/>
|
---|
| 105 | <xsl:param name="serviceName"/>
|
---|
| 106 | <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/>
|
---|
| 107 | <ul id="classifierlist">
|
---|
| 108 | <xsl:for-each select="classifier">
|
---|
| 109 | <xsl:choose>
|
---|
| 110 | <xsl:when test="@name=$selected">
|
---|
| 111 | <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li>
|
---|
| 112 | </xsl:when>
|
---|
| 113 | <xsl:otherwise>
|
---|
| 114 | <li><a href="{$library_name}?a=b&rt=r&s={$serviceName}&c={$collName}&cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose>
|
---|
| 115 |
|
---|
| 116 | </xsl:for-each>
|
---|
| 117 | </ul>
|
---|
| 118 | </xsl:template>
|
---|
| 119 |
|
---|
| 120 | </xsl:stylesheet>
|
---|
| 121 |
|
---|
| 122 |
|
---|
| 123 |
|
---|
| 124 |
|
---|
| 125 |
|
---|
| 126 |
|
---|