source: trunk/gsdl3/web/interfaces/default/transform/query.xsl@ 4869

Last change on this file since 4869 was 4869, checked in by kjdon, 21 years ago

basicuery has been renamed query

  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
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
14 <xsl:output method="html"/>
15
16 <xsl:template name="pageHead">
17 <head>
18 <title>
19 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
20 </title>
21 </head>
22 </xsl:template>
23
24 <xsl:template match="pageResponse">
25 <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
26 <center>
27 <xsl:call-template name="collectionPageBanner">
28 <xsl:with-param name="collName" select="$collName"/>
29 </xsl:call-template>
30 <xsl:apply-templates select="service">
31 <xsl:with-param name="collName" select="$collName"/>
32 </xsl:apply-templates>
33 </center>
34
35 <xsl:if test="documentNodeList">
36 <xsl:call-template name="query-response">
37 <xsl:with-param name="collName" select="$collName"/>
38 </xsl:call-template>
39 </xsl:if>
40 <xsl:call-template name="greenBar"/>
41 </xsl:template>
42
43
44 <!-- layout the response -->
45 <xsl:template name="query-response">
46 <xsl:param name="collName"/>
47 <xsl:call-template name="greenBarResults"/>
48
49 <!-- If query term information is available, display it -->
50 <br/>
51 <xsl:call-template name="termInfo"/>
52 <xsl:call-template name="matchDocs"/>
53
54 <!-- next and prev links at top of results-->
55 <xsl:call-template name="resultNavigation"/>
56 <!-- Display the matching documents -->
57 <xsl:call-template name="resultList">
58 <xsl:with-param name="collName" select="$collName"/>
59 </xsl:call-template>
60 <!-- next and prev links at bottom of page -->
61 <xsl:call-template name="resultNavigation"/>
62 </xsl:template>
63
64
65 <xsl:template match="service">
66 <xsl:param name="collName"/>
67 <xsl:variable name="subaction" select="../pageRequest/@subaction"/>
68 <h3><xsl:value-of select="display/name"/></h3><p/>
69 <form name="QueryForm" method="get" action="/gsdl3/{$library_name}">
70 <input type="hidden" name="a" value="q"/>
71 <input type="hidden" name="sa" value="{$subaction}"/>
72 <input type="hidden" name="rt" value="r"/>
73 <input type="hidden" name="s" value="{@name}"/>
74 <input type="hidden" name="c" value="{$collName}"/>
75 <input type="hidden" name="hn" value="1"/>
76 <xsl:apply-templates select="paramList"/>
77 <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input>
78 </form>
79 </xsl:template>
80
81</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.