[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="service-params.xsl"/>
|
---|
| 12 | <xsl:include href="querytools.xsl"/>
|
---|
| 13 | <xsl:include href="berrytools.xsl"/>
|
---|
| 14 |
|
---|
| 15 | <xsl:output method="html"/>
|
---|
| 16 |
|
---|
| 17 | <!-- the main page layout template is here -->
|
---|
| 18 | <xsl:template match="page">
|
---|
| 19 | <html>
|
---|
| 20 | <head>
|
---|
| 21 | <title>
|
---|
| 22 | <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
|
---|
| 23 | <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
|
---|
| 24 | </title>
|
---|
| 25 | <xsl:call-template name="globalStyle"/>
|
---|
| 26 | <xsl:call-template name="pageStyle"/>
|
---|
| 27 | </head>
|
---|
| 28 | <body>
|
---|
| 29 | <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
|
---|
| 30 | <div id="page-wrapper">
|
---|
| 31 | <xsl:call-template name="response" />
|
---|
| 32 | <xsl:call-template name="greenstoneFooter"/>
|
---|
| 33 | </div>
|
---|
| 34 | </body>
|
---|
| 35 | </html>
|
---|
| 36 | </xsl:template>
|
---|
| 37 |
|
---|
| 38 | <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
|
---|
| 39 |
|
---|
| 40 | <xsl:template name="pageTitle">
|
---|
| 41 | <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
|
---|
| 42 | </xsl:template>
|
---|
| 43 |
|
---|
| 44 | <!-- page specific style goes here -->
|
---|
| 45 | <xsl:template name="pageStyle">
|
---|
| 46 | <xsl:if test="$berrybasketswitch = 'on'">
|
---|
| 47 | <xsl:call-template name="berryStyleSheet"/>
|
---|
| 48 | <xsl:call-template name="js-library"/>
|
---|
| 49 | </xsl:if>
|
---|
| 50 | </xsl:template>
|
---|
| 51 |
|
---|
| 52 |
|
---|
| 53 | <xsl:template match="pageResponse">
|
---|
| 54 | <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
|
---|
| 55 | <xsl:variable name="requesttype"><xsl:value-of select="/page/pageRequest/paramList/param[@name='rt']/@value"/></xsl:variable>
|
---|
| 56 | <xsl:call-template name="standardPageBanner">
|
---|
| 57 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 58 | </xsl:call-template>
|
---|
| 59 | <xsl:call-template name="navigationBar">
|
---|
| 60 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 61 | </xsl:call-template>
|
---|
| 62 | <div id="content">
|
---|
| 63 | <xsl:apply-templates select="service">
|
---|
| 64 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 65 | </xsl:apply-templates>
|
---|
| 66 |
|
---|
| 67 | <xsl:if test="$berrybasketswitch = 'on'">
|
---|
| 68 | <xsl:call-template name="berrybasket"/>
|
---|
| 69 | </xsl:if>
|
---|
| 70 | <xsl:if test="contains($requesttype, 'r')">
|
---|
| 71 | <xsl:call-template name="query-response">
|
---|
| 72 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 73 | </xsl:call-template>
|
---|
| 74 | </xsl:if>
|
---|
| 75 |
|
---|
| 76 | </div>
|
---|
| 77 | </xsl:template>
|
---|
| 78 |
|
---|
| 79 |
|
---|
| 80 | <!-- layout the response -->
|
---|
| 81 | <xsl:template name="query-response">
|
---|
| 82 | <xsl:param name="collName"/>
|
---|
| 83 | <xsl:call-template name="dividerBar"><xsl:with-param name='text'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.results')"/></xsl:with-param></xsl:call-template>
|
---|
| 84 |
|
---|
| 85 | <!-- If query term information is available, display it -->
|
---|
| 86 | <xsl:call-template name="termInfo"/>
|
---|
| 87 | <xsl:call-template name="matchDocs"/>
|
---|
| 88 |
|
---|
| 89 | <xsl:if test="documentNodeList">
|
---|
| 90 |
|
---|
| 91 | <!-- next and prev links at top of results-->
|
---|
| 92 | <xsl:call-template name="resultNavigation">
|
---|
| 93 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 94 | </xsl:call-template>
|
---|
| 95 |
|
---|
| 96 | <!-- Display the matching documents -->
|
---|
| 97 | <xsl:call-template name="resultList">
|
---|
| 98 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 99 | </xsl:call-template>
|
---|
| 100 |
|
---|
| 101 | <!-- next and prev links at bottom of page -->
|
---|
| 102 | <xsl:call-template name="resultNavigation">
|
---|
| 103 | <xsl:with-param name="collName" select="$collName"/>
|
---|
| 104 | </xsl:call-template>
|
---|
| 105 | </xsl:if>
|
---|
| 106 | </xsl:template>
|
---|
| 107 |
|
---|
| 108 |
|
---|
| 109 | <xsl:template match="service">
|
---|
| 110 | <xsl:param name="collName"/>
|
---|
| 111 | <xsl:variable name="subaction" select="../pageRequest/@subaction"/>
|
---|
| 112 | <div id="queryform">
|
---|
| 113 | <form name="QueryForm" method="get" action="{$library_name}">
|
---|
| 114 | <input type="hidden" name="a" value="q"/>
|
---|
| 115 | <input type="hidden" name="sa" value="{$subaction}"/>
|
---|
| 116 | <input type="hidden" name="rt" value="rd"/>
|
---|
| 117 | <input type="hidden" name="s" value="{@name}"/>
|
---|
| 118 | <input type="hidden" name="c" value="{$collName}"/>
|
---|
| 119 | <xsl:if test="not(paramList/param[@name='startPage'])">
|
---|
| 120 | <input type="hidden" name="startPage" value="1"/>
|
---|
| 121 | </xsl:if>
|
---|
| 122 | <xsl:apply-templates select="paramList"/>
|
---|
| 123 | <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
|
---|
| 124 | </form>
|
---|
| 125 | </div>
|
---|
| 126 | </xsl:template>
|
---|
| 127 |
|
---|
| 128 | </xsl:stylesheet>
|
---|
| 129 |
|
---|
| 130 |
|
---|
| 131 |
|
---|
| 132 |
|
---|
| 133 |
|
---|
| 134 |
|
---|