1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* marine.xsl
|
4
|
*
|
5
|
* Authors: Matt Jones, Chad Berkley
|
6
|
* Copyright: 2000 Regents of the University of California and the
|
7
|
* National Center for Ecological Analysis and Synthesis
|
8
|
* For Details: http://www.nceas.ucsb.edu/
|
9
|
* Created: 2000 July 20
|
10
|
* File Info: '$Id: marine.xsl 420 2000-08-29 20:58:07Z berkley $'
|
11
|
*
|
12
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
13
|
* convert an XML file showing the resultset of a query
|
14
|
* into an HTML format suitable for rendering with modern web browsers.
|
15
|
* This stylesheet formats .
|
16
|
-->
|
17
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
18
|
|
19
|
<xsl:output method="html"/>
|
20
|
|
21
|
<xsl:template match="/">
|
22
|
<html>
|
23
|
<head>
|
24
|
<link rel="stylesheet" type="text/css" href="@html-path@/marine/rowcol.css" />
|
25
|
</head>
|
26
|
<body class="emlbody">
|
27
|
<a name="top" />
|
28
|
<table width="100%">
|
29
|
<tr>
|
30
|
<td align="left" valign="top">
|
31
|
<form action="@html-path@/servlet/marine#browse"
|
32
|
method="POST">
|
33
|
<input type="hidden" name="action" value="query" />
|
34
|
<input type="hidden" name="query" value="" />
|
35
|
<input type="hidden" name="qformat" value="html" />
|
36
|
<input type="hidden" name="operator" value="UNION" />
|
37
|
<input type="hidden" name="anyfield" value="%" />
|
38
|
<input type="hidden" name="returnfield"
|
39
|
value="resource/dataset/originator/individualName/surName" />
|
40
|
<input type="hidden" name="returnfield"
|
41
|
value="resource/dataset/originator/individualName/givenName" />
|
42
|
<input type="hidden" name="returnfield"
|
43
|
value="resource/dataset/originator/organizationName" />
|
44
|
<input border="0" type="image"
|
45
|
src="@image-path@/marine/browsebutton.jpg"
|
46
|
alt="browse the database"
|
47
|
size="15" /><br/>
|
48
|
<a href="#beginform" border="0">
|
49
|
<img border="0"
|
50
|
src="@image-path@/marine/skipbutton.jpg"
|
51
|
alt="skip the introduction"/>
|
52
|
</a>
|
53
|
</form>
|
54
|
</td>
|
55
|
<td align="center" valign="top">
|
56
|
<img src="@image-path@/marine/logo-line.gif" alt="NCEAS Logo" />
|
57
|
</td>
|
58
|
<td align="right" valign="top">
|
59
|
<form action="@html-path@/servlet/marine#browse"
|
60
|
method="POST">
|
61
|
<font size="2">
|
62
|
Quick Search: <input type="text" name="anyfield" size="10" />
|
63
|
</font>
|
64
|
<input type="hidden" name="action" value="query" />
|
65
|
<input type="hidden" name="qformat" value="html" />
|
66
|
<input type="hidden" name="operator" value="UNION" />
|
67
|
<input type="hidden" name="returnfield"
|
68
|
value="resource/dataset/originator/individualName/surName" />
|
69
|
<input type="hidden" name="returnfield"
|
70
|
value="resource/dataset/originator/individualName/givenName" />
|
71
|
<input type="hidden" name="returnfield"
|
72
|
value="resource/dataset/originator/organizationName" />
|
73
|
</form>
|
74
|
</td>
|
75
|
</tr>
|
76
|
</table>
|
77
|
|
78
|
<hr />
|
79
|
<center><h3>MARINE Query Interface</h3></center>
|
80
|
<font size="2">
|
81
|
<p class="intro">
|
82
|
This page is used to query information for
|
83
|
<a href="http://www.mms.gov/omm/pacific/enviro/mint.htm">MARINE</a>
|
84
|
scientists from
|
85
|
the NCEAS Ecological Metadata Database. For more information on
|
86
|
this project, please read the
|
87
|
<a href=
|
88
|
"http://www.nceas.ucsb.edu/marinedata/">
|
89
|
proposal abstract</a>.
|
90
|
</p>
|
91
|
|
92
|
<p class="intro">
|
93
|
Each step below contains several fields relating to a part of the
|
94
|
dataset. You may also browse
|
95
|
the entire database by simply clicking the browse link at the top
|
96
|
of the page.
|
97
|
Clicking on the buttons next to each data line will give you more
|
98
|
information about the dataset or allow you to download the entire
|
99
|
dataset.
|
100
|
Please note some fields in the query forms will not be pertinent to
|
101
|
your dataset.
|
102
|
If this is the case, simply leave any field blank to omit it from
|
103
|
the searching.
|
104
|
</p>
|
105
|
|
106
|
<p class="intro">
|
107
|
Note that the wildcard character is a percent sign (%). It may
|
108
|
be used in any
|
109
|
field to denote "any" value. For example, the query "do%" would
|
110
|
return "document"
|
111
|
or "dog" or "domino" or "dolphin", etc. Placing a single percent
|
112
|
sign in a field
|
113
|
will return any document that contains that field. Placing a
|
114
|
percent sign in
|
115
|
the "Any Field" field is equivalent to browsing the database (i.e.
|
116
|
it will return
|
117
|
every document).
|
118
|
</p>
|
119
|
</font>
|
120
|
<hr />
|
121
|
<form action="@html-path@/servlet/marine#browse"
|
122
|
method="POST">
|
123
|
<a name="beginform" />
|
124
|
<table width="100%" border="0">
|
125
|
<tr>
|
126
|
<td valign="bottom" width = "25">
|
127
|
<img src="@image-path@/marine/step1.jpg" alt="step 1"/>
|
128
|
</td>
|
129
|
<td>
|
130
|
<p>
|
131
|
<b><font size="2">Keywords and Title</font></b><br/>
|
132
|
<font size="2">
|
133
|
Enter any keywords that might partain to the dataset you
|
134
|
are looking for.
|
135
|
The "Any Field" text box will search for any field in any
|
136
|
document for
|
137
|
the text you provide. The title and alternate title will
|
138
|
search for text
|
139
|
in the title or alternate title fields of a document only.
|
140
|
Fields left
|
141
|
blank will not be used in the search criteria.
|
142
|
</font></p>
|
143
|
</td>
|
144
|
</tr>
|
145
|
</table>
|
146
|
|
147
|
<table width="100%">
|
148
|
<tr>
|
149
|
<td align="right">Title:</td>
|
150
|
<td>
|
151
|
<input type="text" name="title" size="30">
|
152
|
<xsl:attribute name="value">
|
153
|
<xsl:value-of select="resultset/query/title" />
|
154
|
</xsl:attribute>
|
155
|
</input>
|
156
|
</td>
|
157
|
<td align="right">Alternate Title:</td>
|
158
|
<td>
|
159
|
<input type="text" name="alttitle" size="30">
|
160
|
<xsl:attribute name="value">
|
161
|
<xsl:value-of select="resultset/query/alttitle" />
|
162
|
</xsl:attribute>
|
163
|
</input>
|
164
|
</td>
|
165
|
</tr>
|
166
|
<tr>
|
167
|
<td align="right">Keywords:</td>
|
168
|
<td>
|
169
|
<input type="text" name="keyword" size="30">
|
170
|
<xsl:attribute name="value">
|
171
|
<xsl:value-of select="resultset/query/keyword" />
|
172
|
</xsl:attribute>
|
173
|
</input>
|
174
|
</td>
|
175
|
<td align="right">Any Field:</td>
|
176
|
<td>
|
177
|
<input type="text" name="anyfield" size="30">
|
178
|
<xsl:attribute name="value">
|
179
|
<xsl:value-of select="resultset/query/anyfield" />
|
180
|
</xsl:attribute>
|
181
|
</input>
|
182
|
</td>
|
183
|
</tr>
|
184
|
</table>
|
185
|
|
186
|
<table width="100%" border="0">
|
187
|
<tr>
|
188
|
<td valign="center" align="left" width="25">
|
189
|
<img src="@image-path@/marine/step2.jpg" alt="step 2"/>
|
190
|
</td>
|
191
|
<td>
|
192
|
<font size="2"><b>Associated Individual Information</b><br/>
|
193
|
Enter data about an owner or someone else who is associated with
|
194
|
the dataset. Any field(s) left blank will not be used
|
195
|
in the search criteria.
|
196
|
</font>
|
197
|
</td>
|
198
|
</tr>
|
199
|
</table>
|
200
|
<table width="100%">
|
201
|
<tr>
|
202
|
<td align="right">First Name:</td>
|
203
|
<td>
|
204
|
<input type="text" name="givenName" size="30">
|
205
|
<xsl:attribute name="value">
|
206
|
<xsl:value-of select="resultset/query/givenName" />
|
207
|
</xsl:attribute>
|
208
|
</input>
|
209
|
</td>
|
210
|
<td align="right">Last Name:</td>
|
211
|
<td>
|
212
|
<input type="text" name="surName" size="30">
|
213
|
<xsl:attribute name="value">
|
214
|
<xsl:value-of select="resultset/query/surName" />
|
215
|
</xsl:attribute>
|
216
|
</input>
|
217
|
</td>
|
218
|
</tr>
|
219
|
<tr>
|
220
|
<td align="right">Organization:</td>
|
221
|
<td>
|
222
|
<input type="text" name="organizationName" size="30">
|
223
|
<xsl:attribute name="value">
|
224
|
<xsl:value-of select="resultset/query/organizationName" />
|
225
|
</xsl:attribute>
|
226
|
</input>
|
227
|
</td>
|
228
|
<td align="right">Email Address:</td>
|
229
|
<td>
|
230
|
<input type="text" name="electronicMailAddress" size="30">
|
231
|
<xsl:attribute name="value">
|
232
|
<xsl:value-of select="resultset/query/electronicMailAddress" />
|
233
|
</xsl:attribute>
|
234
|
</input>
|
235
|
</td>
|
236
|
</tr>
|
237
|
</table>
|
238
|
<table width="100%" border="0">
|
239
|
<tr>
|
240
|
<td valign="center" align="left" width="25">
|
241
|
<img src="@image-path@/marine/step3.jpg" alt="step 3"/>
|
242
|
</td>
|
243
|
<td>
|
244
|
<p>
|
245
|
<b><font size="2">Query the Database</font></b><br/>
|
246
|
<font size="2">
|
247
|
Click the Query button to submit your query. The results will be
|
248
|
displayed below under the heading "Results".
|
249
|
</font>
|
250
|
</p>
|
251
|
</td>
|
252
|
</tr>
|
253
|
</table>
|
254
|
<input type="hidden" name="action" value="query" />
|
255
|
<input type="hidden" name="qformat" value="html" />
|
256
|
<input type="hidden" name="operator" value="UNION" />
|
257
|
<input type="hidden" name="returnfield"
|
258
|
value="resource/dataset/originator/individualName/surName" />
|
259
|
<input type="hidden" name="returnfield"
|
260
|
value="resource/dataset/originator/individualName/givenName" />
|
261
|
<input type="hidden" name="returnfield"
|
262
|
value="resource/dataset/originator/organizationName" />
|
263
|
|
264
|
<input type="submit" value="Query" />
|
265
|
<input type="reset" value="Clear Form" />
|
266
|
|
267
|
</form>
|
268
|
|
269
|
<a name="browse" />
|
270
|
<font size="2"><xsl:number value="count(resultset/document)" /> documents
|
271
|
found.</font>
|
272
|
<!-- This tests to see if there are returned documents,
|
273
|
if there are not then don't show the query results -->
|
274
|
<xsl:if test="count(resultset/document) > 0">
|
275
|
|
276
|
<center>
|
277
|
<u><h2>Results</h2></u>
|
278
|
</center>
|
279
|
|
280
|
<form action="@html-path@/servlet/marine" method="POST">
|
281
|
<input type="hidden" name="action" value="getdocument"/>
|
282
|
|
283
|
<table width="100%">
|
284
|
<tr class="rowodd">
|
285
|
<th> </th>
|
286
|
<th><font size="2"><xsl:text>Title</xsl:text></font></th>
|
287
|
<th><font size="2"><xsl:text>Contacts</xsl:text></font></th>
|
288
|
<th><font size="2"><xsl:text>Organization</xsl:text></font></th>
|
289
|
<th><font size="2"><xsl:text>Creation Date</xsl:text></font></th>
|
290
|
<th><font size="2"><xsl:text>Last Updated</xsl:text></font></th>
|
291
|
</tr>
|
292
|
|
293
|
|
294
|
<font size="2">
|
295
|
<xsl:for-each select="resultset/document">
|
296
|
<xsl:sort select="doctitle"/>
|
297
|
<tr valign="top">
|
298
|
<xsl:attribute name="class">
|
299
|
<xsl:choose>
|
300
|
<xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
|
301
|
<xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
|
302
|
</xsl:choose>
|
303
|
</xsl:attribute>
|
304
|
|
305
|
<td>
|
306
|
<input border="0" type="image">
|
307
|
<xsl:attribute name="src">
|
308
|
<xsl:choose>
|
309
|
<xsl:when test="position()
|
310
|
mod 2 = 1">@image-path@/marine/whiteMenu.jpg</xsl:when>
|
311
|
<xsl:when test="position()
|
312
|
mod 2 = 0">@image-path@/marine/blueMenu.jpg</xsl:when>
|
313
|
</xsl:choose>
|
314
|
</xsl:attribute>
|
315
|
<xsl:attribute name="name">
|
316
|
<xsl:value-of select="./docid"/>
|
317
|
</xsl:attribute>
|
318
|
</input>
|
319
|
</td>
|
320
|
<td><font size="2"><xsl:value-of select="./doctitle"/></font>
|
321
|
<xsl:text> </xsl:text>
|
322
|
</td>
|
323
|
<td>
|
324
|
<font size="2"><xsl:value-of select="./givenName" /></font>
|
325
|
<xsl:text> </xsl:text>
|
326
|
|
327
|
<font size="2"><xsl:value-of select="./surName" /></font>
|
328
|
<xsl:text> </xsl:text>
|
329
|
</td>
|
330
|
<td>
|
331
|
<font size="2"><xsl:value-of select="./organizationName" /></font>
|
332
|
<xsl:text> </xsl:text>
|
333
|
</td>
|
334
|
|
335
|
<td>
|
336
|
<font size="2"><xsl:value-of select="./createdate" /></font>
|
337
|
<font size="2"><xsl:text> </xsl:text></font>
|
338
|
</td>
|
339
|
<td>
|
340
|
<font size="2"><xsl:value-of select="./updatedate" /></font>
|
341
|
<xsl:text> </xsl:text>
|
342
|
</td>
|
343
|
</tr>
|
344
|
</xsl:for-each>
|
345
|
</font>
|
346
|
</table>
|
347
|
</form>
|
348
|
|
349
|
<h3><a href="#top">New Query</a></h3>
|
350
|
|
351
|
</xsl:if>
|
352
|
|
353
|
</body>
|
354
|
</html>
|
355
|
</xsl:template>
|
356
|
|
357
|
</xsl:stylesheet>
|