1 |
4285
|
daigle
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
|
|
* '$RCSfile: searchbox.xsl,v $'
|
4 |
|
|
* Authors: Chris Jones
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
*
|
9 |
|
|
* '$Author: cjones $'
|
10 |
|
|
* '$Date: 2004/10/05 23:50:46 $'
|
11 |
|
|
* '$Revision: 1.1 $'
|
12 |
|
|
*
|
13 |
|
|
* This program is free software; you can redistribute it and/or modify
|
14 |
|
|
* it under the terms of the GNU General Public License as published by
|
15 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
16 |
|
|
* (at your option) any later version.
|
17 |
|
|
*
|
18 |
|
|
* This program is distributed in the hope that it will be useful,
|
19 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
|
|
* GNU General Public License for more details.
|
22 |
|
|
*
|
23 |
|
|
* You should have received a copy of the GNU General Public License
|
24 |
|
|
* along with this program; if not, write to the Free Software
|
25 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26 |
|
|
*
|
27 |
|
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
28 |
|
|
* convert an XML file showing the resultset of a query
|
29 |
|
|
* into an HTML format suitable for rendering with modern web browsers.
|
30 |
|
|
-->
|
31 |
|
|
<xsl:stylesheet
|
32 |
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
33 |
|
|
xmlns:url="http://www.jclark.com/xt/java/java.net.URLEncoder" exclude-result-prefixes="url">
|
34 |
4348
|
daigle
|
|
35 |
|
|
<!-- This parameter gets overidden by the chosen default qformat -->
|
36 |
|
|
<xsl:param name="qformat">default</xsl:param>
|
37 |
|
|
<xsl:param name="servletURL"/>
|
38 |
4285
|
daigle
|
|
39 |
|
|
<xsl:output method="html" encoding="iso-8859-1" indent="yes" standalone="yes"
|
40 |
|
|
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
41 |
|
|
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
|
42 |
|
|
|
43 |
|
|
<xsl:template name="searchbox">
|
44 |
|
|
<!-- begin search form area -->
|
45 |
|
|
<xsl:comment>begin the search form area</xsl:comment>
|
46 |
|
|
<div id="search-box">
|
47 |
|
|
<table class="group group_border">
|
48 |
|
|
<tr>
|
49 |
|
|
<th>
|
50 |
|
|
Show all Datasets:
|
51 |
|
|
</th>
|
52 |
|
|
<th>
|
53 |
|
|
Search by Keyword:
|
54 |
|
|
</th>
|
55 |
|
|
</tr>
|
56 |
|
|
<tr>
|
57 |
|
|
<td>
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
<xsl:variable name="my_query"><![CDATA[<?xml version="1.0"?>
|
63 |
|
|
<pathquery version="1.2">
|
64 |
5710
|
leinfelder
|
<returndoctype>eml://ecoinformatics.org/eml-2.1.1</returndoctype>
|
65 |
4505
|
daigle
|
<returndoctype>eml://ecoinformatics.org/eml-2.1.0</returndoctype>
|
66 |
4285
|
daigle
|
<returndoctype>eml://ecoinformatics.org/eml-2.0.1</returndoctype>
|
67 |
|
|
<returndoctype>eml://ecoinformatics.org/eml-2.0.0</returndoctype>
|
68 |
|
|
<returnfield>eml/dataset/title</returnfield>
|
69 |
|
|
<returnfield>eml/dataset/dataTable/entityName</returnfield>
|
70 |
|
|
<returnfield>eml/dataset/creator/individualName/surName</returnfield>
|
71 |
|
|
<returnfield>eml/dataset/creator/organizationName</returnfield>
|
72 |
|
|
<returnfield>eml/dataset/dataTable/physical/distribution/online/url</returnfield>
|
73 |
|
|
<querygroup operator="INTERSECT">
|
74 |
|
|
<queryterm casesensitive="false" searchmode="starts-with">
|
75 |
|
|
<value>SBCLTER:</value>
|
76 |
|
|
<pathexpr>eml/dataset/title</pathexpr>
|
77 |
|
|
</queryterm>
|
78 |
|
|
<queryterm casesensitive="false" searchmode="equals">
|
79 |
|
|
<value>public</value>
|
80 |
|
|
<pathexpr>eml/dataset/access/allow/principal</pathexpr>
|
81 |
|
|
</queryterm>
|
82 |
|
|
</querygroup>
|
83 |
|
|
</pathquery>]]> <!-- end of cdata query -->
|
84 |
|
|
</xsl:variable>
|
85 |
|
|
<xsl:if test="function-available('url:encode')">
|
86 |
4348
|
daigle
|
<a href="{$servletURL}?action=squery&qformat=sbclter&query={url:encode($my_query)}">
|
87 |
4285
|
daigle
|
<xsl:text>All SBCLTER Data Packages </xsl:text>
|
88 |
|
|
</a>
|
89 |
|
|
</xsl:if>
|
90 |
|
|
</td>
|
91 |
|
|
<td>
|
92 |
|
|
<em>Keyword Search not yet available</em>
|
93 |
|
|
</td>
|
94 |
|
|
</tr>
|
95 |
|
|
</table>
|
96 |
|
|
</div>
|
97 |
|
|
<xsl:comment>end the search form area</xsl:comment>
|
98 |
|
|
<!-- end search form area -->
|
99 |
|
|
|
100 |
|
|
</xsl:template>
|
101 |
|
|
|
102 |
|
|
</xsl:stylesheet>
|