|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
* '$RCSfile$'
|
|
4 |
* Authors: Matt Jones, CHad Berkley
|
|
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$'
|
|
10 |
* '$Date$'
|
|
11 |
* '$Revision$'
|
|
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 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
32 |
<xsl:output method="html" />
|
|
33 |
|
|
34 |
<xsl:template match="/" mode="addSearchBox">
|
|
35 |
|
|
36 |
<script language="JavaScript">
|
|
37 |
<![CDATA[
|
|
38 |
|
|
39 |
function allowSearch(formObj) {
|
|
40 |
|
|
41 |
var canSearch = true;
|
|
42 |
var searchString = trim(formObj.elements["anyfield"].value);
|
|
43 |
if (searchString=="") {
|
|
44 |
if (confirm("Show *all* data in the KNB?\n(this may take some time!)")) {
|
|
45 |
formObj.elements["anyfield"].value = "%";
|
|
46 |
canSearch = true;
|
|
47 |
} else {
|
|
48 |
formObj.elements["anyfield"].focus();
|
|
49 |
canSearch = false;
|
|
50 |
}
|
|
51 |
}
|
|
52 |
return canSearch;
|
|
53 |
}
|
|
54 |
|
|
55 |
function trim(stringToTrim) {
|
|
56 |
|
|
57 |
return stringToTrim.replace(/^\s*/, '').replace(/\s*$/,'');
|
|
58 |
}
|
|
59 |
]]>
|
|
60 |
</script>
|
|
61 |
|
|
62 |
<table width="740" border="0" cellspacing="0" cellpadding="0" align="center">
|
|
63 |
<tr>
|
|
64 |
<td width="10" align="right" valign="top">
|
|
65 |
<img
|
|
66 |
src="http://anacapa.nceas.ucsb.edu:8080/brooke/images/panelhead_bg_lcorner.gif"
|
|
67 |
width="10" height="21" />
|
|
68 |
</td>
|
|
69 |
|
|
70 |
<td width="720" class="sectionheader">search for data on the
|
|
71 |
KNB</td>
|
|
72 |
|
|
73 |
<td width="10" align="left" valign="top">
|
|
74 |
<img
|
|
75 |
src="http://anacapa.nceas.ucsb.edu:8080/brooke/images/panelhead_bg_rcorner.gif"
|
|
76 |
width="10" height="21" />
|
|
77 |
</td>
|
|
78 |
</tr>
|
|
79 |
|
|
80 |
<tr>
|
|
81 |
<td colspan="3">
|
|
82 |
<table width="740" border="0" cellpadding="0" cellspacing="0"
|
|
83 |
class="subpanel">
|
|
84 |
<tr>
|
|
85 |
<td colspan="2">
|
|
86 |
</td>
|
|
87 |
</tr>
|
|
88 |
|
|
89 |
<tr valign="baseline">
|
|
90 |
<td colspan="2">
|
|
91 |
<form action="servlet/metacat" method="post"
|
|
92 |
target="_self" onSubmit="return allowSearch(this);">
|
|
93 |
<input type="hidden" name="action" value="query" />
|
|
94 |
|
|
95 |
<input type="hidden" name="qformat" value="knb" />
|
|
96 |
|
|
97 |
<input type="hidden" name="operator" value="UNION" />
|
|
98 |
|
|
99 |
<input type="hidden" name="returnfield"
|
|
100 |
value="originator/individualName/surName" />
|
|
101 |
|
|
102 |
<input type="hidden" name="returnfield"
|
|
103 |
value="originator/individualName/givenName" />
|
|
104 |
|
|
105 |
<input type="hidden" name="returnfield"
|
|
106 |
value="originator/organizationName" />
|
|
107 |
|
|
108 |
<input type="hidden" name="returnfield"
|
|
109 |
value="creator/individualName/surName" />
|
|
110 |
|
|
111 |
<input type="hidden" name="returnfield"
|
|
112 |
value="creator/organizationName" />
|
|
113 |
|
|
114 |
<input type="hidden" name="returnfield"
|
|
115 |
value="dataset/title" />
|
|
116 |
|
|
117 |
<input type="hidden" name="returnfield"
|
|
118 |
value="keyword" />
|
|
119 |
|
|
120 |
<input type="hidden" name="returndoctype"
|
|
121 |
value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
|
|
122 |
|
|
123 |
<input type="hidden" name="returndoctype"
|
|
124 |
value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
|
|
125 |
|
|
126 |
<input type="hidden" name="returndoctype"
|
|
127 |
value="eml://ecoinformatics.org/eml-2.0.0" />
|
|
128 |
|
|
129 |
<input type="hidden" name="returndoctype"
|
|
130 |
value="-//NCEAS//eml-dataset-2.0//EN" />
|
|
131 |
|
|
132 |
<input type="hidden" name="returndoctype"
|
|
133 |
value="-//NCEAS//resource//EN" />
|
|
134 |
|
|
135 |
<table width="100%" border="0" cellpadding="5"
|
|
136 |
cellspacing="0">
|
|
137 |
<tr>
|
|
138 |
<td width="94" rowspan="2" align="left"
|
|
139 |
valign="top">
|
|
140 |
<img
|
|
141 |
src="http://anacapa.nceas.ucsb.edu:8080/brooke/images/search.jpg"
|
|
142 |
width="94" height="80" />
|
|
143 |
</td>
|
|
144 |
|
|
145 |
<td colspan="2" valign="middle"
|
|
146 |
class="text_example">
|
|
147 |
<p>Enter a search phrase (e.g. biodiversity) to
|
|
148 |
search for data sets in the KNB, or click
|
|
149 |
"advanced search" to enter more-detailed search
|
|
150 |
criteria, or simply browse by category using the
|
|
151 |
links below.</p>
|
|
152 |
</td>
|
|
153 |
</tr>
|
|
154 |
|
|
155 |
<tr valign="middle">
|
|
156 |
<td align="right" class="searchcat">
|
|
157 |
<input type="text" name="anyfield" size="30"
|
|
158 |
maxlength="200" />
|
|
159 |
</td>
|
|
160 |
|
|
161 |
<td width="365" align="left" class="searchcat">
|
|
162 |
<input type="submit" value="Search KNB" />
|
|
163 |
|
|
164 |
  
|
|
165 |
<a href="/brooke/advancedsearch.html">» advanced
|
|
166 |
search «</a>
|
|
167 |
</td>
|
|
168 |
</tr>
|
|
169 |
</table>
|
|
170 |
</form>
|
|
171 |
</td>
|
|
172 |
</tr>
|
|
173 |
|
|
174 |
<tr>
|
|
175 |
<td width="375" class="searchcat">category1</td>
|
|
176 |
|
|
177 |
<td width="365" class="searchcat">category2</td>
|
|
178 |
</tr>
|
|
179 |
|
|
180 |
<tr>
|
|
181 |
<td width="375" class="searchsubcat">
|
|
182 |
<a href="#" class="searchsubcat">subcat1,</a> <a
|
|
183 |
href="#" class="searchsubcat">subcat2,</a> <a
|
|
184 |
href="#" class="searchsubcat">subcat3,</a> <a
|
|
185 |
href="#" class="searchsubcat">subcat4,</a> <a
|
|
186 |
href="#" class="searchsubcat">subcat5,</a> <a
|
|
187 |
href="#" class="searchsubcat">subcat6</a>
|
|
188 |
</td>
|
|
189 |
|
|
190 |
<td width="365" class="searchsubcat">
|
|
191 |
<a href="#" class="searchsubcat">subcat1,</a> <a
|
|
192 |
href="#" class="searchsubcat">subcat2,</a> <a
|
|
193 |
href="#" class="searchsubcat">subcat3,</a> <a
|
|
194 |
href="#" class="searchsubcat">subcat4,</a> <a
|
|
195 |
href="#" class="searchsubcat">subcat5,</a> <a
|
|
196 |
href="#" class="searchsubcat">subcat6</a>
|
|
197 |
</td>
|
|
198 |
</tr>
|
|
199 |
|
|
200 |
<tr>
|
|
201 |
<td width="375"> </td>
|
|
202 |
|
|
203 |
<td width="365"> </td>
|
|
204 |
</tr>
|
|
205 |
|
|
206 |
<tr>
|
|
207 |
<td width="375" class="searchcat">category3</td>
|
|
208 |
|
|
209 |
<td width="365" class="searchcat">category4</td>
|
|
210 |
</tr>
|
|
211 |
|
|
212 |
<tr>
|
|
213 |
<td width="375" class="searchsubcat">
|
|
214 |
<a href="#" class="searchsubcat">subcat1,</a> <a
|
|
215 |
href="#" class="searchsubcat">subcat2,</a> <a
|
|
216 |
href="#" class="searchsubcat">subcat3,</a> <a
|
|
217 |
href="#" class="searchsubcat">subcat4,</a> <a
|
|
218 |
href="#" class="searchsubcat">subcat5,</a> <a
|
|
219 |
href="#" class="searchsubcat">subcat6</a>
|
|
220 |
</td>
|
|
221 |
|
|
222 |
<td width="365" class="searchsubcat">
|
|
223 |
<a href="#" class="searchsubcat">subcat1,</a> <a
|
|
224 |
href="#" class="searchsubcat">subcat2,</a> <a
|
|
225 |
href="#" class="searchsubcat">subcat3,</a> <a
|
|
226 |
href="#" class="searchsubcat">subcat4,</a> <a
|
|
227 |
href="#" class="searchsubcat">subcat5,</a> <a
|
|
228 |
href="#" class="searchsubcat">subcat6</a>
|
|
229 |
</td>
|
|
230 |
</tr>
|
|
231 |
|
|
232 |
<tr>
|
|
233 |
<td width="375"> </td>
|
|
234 |
|
|
235 |
<td width="365"> </td>
|
|
236 |
</tr>
|
|
237 |
|
|
238 |
<tr>
|
|
239 |
<td width="375" class="searchcat">category5</td>
|
|
240 |
|
|
241 |
<td width="365" class="searchcat">category6</td>
|
|
242 |
</tr>
|
|
243 |
|
|
244 |
<tr>
|
|
245 |
<td width="375" class="searchsubcat">
|
|
246 |
<a href="#" class="searchsubcat">subcat1,</a> <a
|
|
247 |
href="#" class="searchsubcat">subcat2,</a> <a
|
|
248 |
href="#" class="searchsubcat">subcat3,</a> <a
|
|
249 |
href="#" class="searchsubcat">subcat4,</a> <a
|
|
250 |
href="#" class="searchsubcat">subcat5,</a> <a
|
|
251 |
href="#" class="searchsubcat">subcat6</a>
|
|
252 |
</td>
|
|
253 |
|
|
254 |
<td width="365" class="searchsubcat">
|
|
255 |
<a href="#" class="searchsubcat">subcat1,</a> <a
|
|
256 |
href="#" class="searchsubcat">subcat2,</a> <a
|
|
257 |
href="#" class="searchsubcat">subcat3,</a> <a
|
|
258 |
href="#" class="searchsubcat">subcat4,</a> <a
|
|
259 |
href="#" class="searchsubcat">subcat5,</a> <a
|
|
260 |
href="#" class="searchsubcat">subcat6</a>
|
|
261 |
</td>
|
|
262 |
</tr>
|
|
263 |
|
|
264 |
<tr>
|
|
265 |
<td width="375"> </td>
|
|
266 |
|
|
267 |
<td width="365"> </td>
|
|
268 |
</tr>
|
|
269 |
</table>
|
|
270 |
</td>
|
|
271 |
</tr>
|
|
272 |
</table>
|
|
273 |
</xsl:template>
|
|
274 |
|
|
275 |
</xsl:stylesheet>
|
|
276 |
|
|
277 |
|
0 |
278 |
|
new include files for metacat web pages - header and search box. Still need to remove hard-coded context uris