1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
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 | xmlns:gslib="http://www.greenstone.org/skinning"
|
---|
7 | xmlns:gsvar="http://www.greenstone.org/skinning-var"
|
---|
8 | xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
|
---|
9 | extension-element-prefixes="java util"
|
---|
10 | exclude-result-prefixes="java util gsf">
|
---|
11 |
|
---|
12 |
|
---|
13 |
|
---|
14 | <xsl:template name="queryPage">
|
---|
15 | <xsl:for-each select="pageResponse/service">
|
---|
16 | <xsl:variable name="form_action"><xsl:value-of select="$library_name"/>/<xsl:if test="$collName">collection/<xsl:value-of select="$collName"/>/</xsl:if>search/<xsl:value-of select="@name"/></xsl:variable>
|
---|
17 | <form name="QueryForm" method="get" action="{$form_action}">
|
---|
18 | <div>
|
---|
19 | <input type="hidden" name="a" value="q"/>
|
---|
20 | <input type="hidden" name="sa">
|
---|
21 | <xsl:attribute name="value">
|
---|
22 | <xsl:value-of select="/page/pageRequest/@subaction"/>
|
---|
23 | </xsl:attribute>
|
---|
24 | </input>
|
---|
25 | <input type="hidden" name="rt" value="rd"/>
|
---|
26 |
|
---|
27 | <xsl:variable name="ns">s1.</xsl:variable>
|
---|
28 | <xsl:choose>
|
---|
29 | <xsl:when test="/page/pageResponse/hierarchy and paramList/param[@name ='collection']">
|
---|
30 | <xsl:call-template name="CCSParams"> <!-- cross coll search -->
|
---|
31 | <xsl:with-param name="ns" select="$ns" />
|
---|
32 | </xsl:call-template>
|
---|
33 | </xsl:when>
|
---|
34 | <xsl:otherwise>
|
---|
35 | <xsl:for-each select="paramList/param">
|
---|
36 | <xsl:if test="not(@name='sortBy') and not(@name='reverseSort')">
|
---|
37 | <xsl:choose>
|
---|
38 | <xsl:when test="@type='multi'">
|
---|
39 | <xsl:apply-templates select=".">
|
---|
40 | <xsl:with-param name="ns" select="$ns"/>
|
---|
41 | </xsl:apply-templates>
|
---|
42 | </xsl:when>
|
---|
43 | <xsl:otherwise>
|
---|
44 | <xsl:call-template name="param-display">
|
---|
45 | <xsl:with-param name="ns" select="$ns"/>
|
---|
46 | </xsl:call-template>
|
---|
47 | </xsl:otherwise>
|
---|
48 | </xsl:choose>
|
---|
49 | </xsl:if>
|
---|
50 | </xsl:for-each>
|
---|
51 | </xsl:otherwise>
|
---|
52 | </xsl:choose>
|
---|
53 | <br/>
|
---|
54 | <input type="submit">
|
---|
55 | <xsl:attribute name="value">
|
---|
56 | <xsl:value-of select="displayItem[@name='submit']"/>
|
---|
57 | </xsl:attribute>
|
---|
58 | </input>
|
---|
59 | </div>
|
---|
60 | </form>
|
---|
61 | </xsl:for-each>
|
---|
62 | </xsl:template>
|
---|
63 |
|
---|
64 | </xsl:stylesheet>
|
---|