Project

General

Profile

1 295 berkley
<?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 304 berkley
  *    File Info: '$Id$'
11 295 berkley
  *
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
  <xsl:output method="html"/>
19
  <xsl:template match="/">
20
    <html>
21
      <head>
22 497 jones
        <link rel="stylesheet" type="text/css" href="@html-path@/style/rowcol.css" />
23 498 jones
        <script language="JavaScript">
24
          <![CDATA[
25
          function submitform(current_action,form_ref) {
26
              form_ref.action.value=current_action;
27
              form_ref.submit();
28
          }
29
          ]]>
30
        </script>
31
32 295 berkley
      </head>
33
      <body class="emlbody">
34 304 berkley
        <a name="top" />
35 318 berkley
        <table width="100%">
36
        <tr>
37
          <td align="left" valign="top">
38 400 berkley
            <form action="@html-path@/servlet/marine#browse"
39 318 berkley
                  method="POST">
40 400 berkley
             <input type="hidden" name="action" value="query" />
41 318 berkley
    	       <input type="hidden" name="query" value="" />
42
    	       <input type="hidden" name="qformat" value="html" />
43 400 berkley
             <input type="hidden" name="operator" value="UNION" />
44
             <input type="hidden" name="anyfield" value="%" />
45 420 berkley
             <input type="hidden" name="returnfield"
46
               value="resource/dataset/originator/individualName/surName" />
47
             <input type="hidden" name="returnfield"
48
               value="resource/dataset/originator/individualName/givenName" />
49
             <input type="hidden" name="returnfield"
50
               value="resource/dataset/originator/organizationName" />
51 469 berkley
             <input type="hidden" name="returnfield"
52 499 jones
               value="eml-dataset/title" />
53
             <input type="hidden" name="returnfield"
54 469 berkley
               value="resource/dataset/title" />
55
             <input type="hidden" name="returnfield"
56
              value="resource/dataset/keywordInfo/keyword" />
57
             <input type="hidden" name="returndoc"
58
             value="-//NCEAS//resource//EN" />
59
             <input type="hidden" name="returndoc"
60
              value="-//NCEAS//eml-dataset//EN" />
61 535 jones
             <input type="hidden" name="site" value="MARINE" />
62 416 berkley
             <input border="0" type="image"
63
                    src="@image-path@/marine/browsebutton.jpg"
64
                    alt="browse the database"
65
                    size="15" /><br/>
66
             <a href="#beginform" border="0">
67
              <img border="0"
68
                   src="@image-path@/marine/skipbutton.jpg"
69
                   alt="skip the introduction"/>
70
            </a>
71
           </form>
72
    	   </td>
73
         <td align="center" valign="top">
74
            <img src="@image-path@/marine/logo-line.gif" alt="NCEAS Logo" />
75
         </td>
76
         <td align="right" valign="top">
77 400 berkley
            <form action="@html-path@/servlet/marine#browse"
78 318 berkley
                  method="POST">
79 416 berkley
               <font size="2">
80 386 berkley
               Quick Search: <input type="text" name="anyfield" size="10" />
81 416 berkley
               </font>
82 318 berkley
               <input type="hidden" name="action" value="query" />
83
    	       <input type="hidden" name="qformat" value="html" />
84
    	       <input type="hidden" name="operator" value="UNION" />
85 438 berkley
86
             <input type="hidden" name="returnfield"
87
              value="resource/dataset/originator/individualName/surName" />
88
             <input type="hidden" name="returnfield"
89
              value="resource/dataset/originator/individualName/givenName" />
90
            <input type="hidden" name="returnfield"
91
             value="resource/dataset/originator/organizationName" />
92 469 berkley
            <input type="hidden" name="returnfield"
93
             value="resource/dataset/title" />
94
            <input type="hidden" name="returnfield"
95 499 jones
             value="eml-dataset/title" />
96
            <input type="hidden" name="returnfield"
97 469 berkley
             value="resource/dataset/keywordInfo/keyword" />
98
            <input type="hidden" name="returndoc"
99
             value="-//NCEAS//resource//EN" />
100
            <input type="hidden" name="returndoc"
101
             value="-//NCEAS//eml-dataset//EN" />
102 535 jones
            <input type="hidden" name="site" value="MARINE" />
103 318 berkley
    	     </form>
104 416 berkley
         </td>
105
    	 </tr>
106
       </table>
107 318 berkley
108
        <hr />
109 499 jones
        <center><h3>MARINE Database Search</h3></center>
110 318 berkley
        <font size="2">
111
        <p class="intro">
112 469 berkley
          This page is a search tool for
113 386 berkley
          <a href="http://www.mms.gov/omm/pacific/enviro/mint.htm">MARINE</a>
114 469 berkley
          scientists to retrieve information from
115 318 berkley
          the NCEAS Ecological Metadata Database.  For more information on
116
          this project, please read the
117 386 berkley
          <a href=
118
          "http://www.nceas.ucsb.edu/marinedata/">
119 318 berkley
          proposal abstract</a>.
120
        </p>
121 304 berkley
122 318 berkley
        <p class="intro">
123 386 berkley
           Each step below contains several fields relating to a part of the
124
           dataset.  You may also browse
125
           the entire database by simply clicking the browse link at the top
126
           of the page.
127 318 berkley
           Clicking on the buttons next to each data line will give you more
128 386 berkley
           information about the dataset or allow you to download the entire
129
           dataset.
130 469 berkley
           Please note some fields in the search forms will not be pertinent to
131 386 berkley
           your dataset.
132
           If this is the case, simply leave any field blank to omit it from
133
           the searching.
134 318 berkley
        </p>
135 304 berkley
136 318 berkley
        <p class="intro">
137 386 berkley
           Note that the wildcard character is a percent sign (%).  It may
138
           be used in any
139 469 berkley
           field to denote "any" value.  For example, the search "do%" would
140 386 berkley
           return "document"
141
           or "dog" or "domino" or "dolphin", etc.  Placing a single percent
142
           sign in a field
143
           will return any document that contains that field.  Placing a
144
           percent sign in
145
           the "Any Field" field is equivalent to browsing the database (i.e.
146
           it will return
147 318 berkley
           every document).
148
        </p>
149
        </font>
150 416 berkley
        <hr />
151 400 berkley
        <form action="@html-path@/servlet/marine#browse"
152 298 berkley
              method="POST">
153 416 berkley
        <a name="beginform" />
154
        <table width="100%" border="0">
155 304 berkley
          <tr>
156 318 berkley
             <td valign="bottom" width = "25">
157 416 berkley
        	<img src="@image-path@/marine/step1.jpg" alt="step 1"/>
158 304 berkley
             </td>
159 318 berkley
             <td>
160
               <p>
161 416 berkley
               <b><font size="2">Keywords and Title</font></b><br/>
162 318 berkley
               <font size="2">
163 386 berkley
                 Enter any keywords that might partain to the dataset you
164
                 are looking for.
165
                 The "Any Field" text box will search for any field in any
166
                 document for
167
                 the text you provide.  The title and alternate title will
168
                 search for text
169
                 in the title or alternate title fields of a document only.
170
                 Fields left
171 318 berkley
                 blank will not be used in the search criteria.
172
               </font></p>
173
             </td>
174 304 berkley
          </tr>
175
        </table>
176 318 berkley
177 304 berkley
        <table width="100%">
178 298 berkley
             <tr>
179 416 berkley
                <td align="right">Title:</td>
180 318 berkley
                <td>
181 416 berkley
                  <input type="text" name="title" size="30">
182 318 berkley
                  <xsl:attribute name="value">
183
                  <xsl:value-of select="resultset/query/title" />
184
                  </xsl:attribute>
185
                  </input>
186
                </td>
187 416 berkley
                <td align="right">Alternate Title:</td>
188
             	  <td>
189
                <input type="text" name="alttitle" size="30">
190
             	  <xsl:attribute name="value">
191
                  <xsl:value-of select="resultset/query/alttitle" />
192 318 berkley
                  </xsl:attribute>
193
                  </input>
194
                </td>
195 298 berkley
             </tr>
196 304 berkley
             <tr>
197 416 berkley
              <td align="right">Keywords:</td>
198
                <td>
199
                  <input type="text" name="keyword" size="30">
200
                  <xsl:attribute name="value">
201
                  <xsl:value-of select="resultset/query/keyword" />
202 318 berkley
                  </xsl:attribute>
203
                  </input>
204
                </td>
205 416 berkley
                <td align="right">Any Field:</td>
206 318 berkley
                <td>
207 416 berkley
                  <input type="text" name="anyfield" size="30">
208 318 berkley
                  <xsl:attribute name="value">
209 416 berkley
                  <xsl:value-of select="resultset/query/anyfield" />
210 318 berkley
                  </xsl:attribute>
211
                  </input>
212
                </td>
213 304 berkley
             </tr>
214
        </table>
215 318 berkley
216 416 berkley
        <table width="100%" border="0">
217 304 berkley
          <tr>
218 416 berkley
             <td valign="center" align="left" width="25">
219
        	   <img src="@image-path@/marine/step2.jpg" alt="step 2"/>
220 318 berkley
             </td>
221
             <td>
222 416 berkley
             <font size="2"><b>Associated Individual Information</b><br/>
223
        	   Enter data about an owner or someone else who is associated with
224
             the dataset. Any field(s) left blank will not be used
225 318 berkley
        	   in the search criteria.
226
        	   </font>
227 304 berkley
             </td>
228
          </tr>
229
        </table>
230
        <table width="100%">
231
             <tr>
232 416 berkley
                <td align="right">First Name:</td>
233 318 berkley
                <td>
234 416 berkley
                  <input type="text" name="givenName" size="30">
235 318 berkley
             	  <xsl:attribute name="value">
236 404 berkley
                  <xsl:value-of select="resultset/query/givenName" />
237 318 berkley
                  </xsl:attribute>
238
                  </input>
239
                </td>
240 416 berkley
                <td align="right">Last Name:</td>
241 406 berkley
                <td>
242 416 berkley
                  <input type="text" name="surName" size="30">
243 318 berkley
             	  <xsl:attribute name="value">
244 404 berkley
                  <xsl:value-of select="resultset/query/surName" />
245 318 berkley
                  </xsl:attribute>
246
                  </input>
247
                </td>
248 304 berkley
             </tr>
249 318 berkley
             <tr>
250 416 berkley
             	<td align="right">Organization:</td>
251 318 berkley
             	<td>
252 416 berkley
             	  <input type="text" name="organizationName" size="30">
253 318 berkley
             	  <xsl:attribute name="value">
254
                  <xsl:value-of select="resultset/query/organizationName" />
255
                  </xsl:attribute>
256
                  </input>
257
                </td>
258 416 berkley
             	<td align="right">Email Address:</td>
259 318 berkley
             	<td>
260 416 berkley
             	  <input type="text" name="electronicMailAddress" size="30">
261 318 berkley
             	  <xsl:attribute name="value">
262
                  <xsl:value-of select="resultset/query/electronicMailAddress" />
263
                  </xsl:attribute>
264
                  </input>
265
                </td>
266
             </tr>
267
           </table>
268 416 berkley
        <table width="100%" border="0">
269 304 berkley
          <tr>
270 416 berkley
            <td valign="center" align="left" width="25">
271
              <img src="@image-path@/marine/step3.jpg" alt="step 3"/>
272
            </td>
273
            <td>
274
              <p>
275 469 berkley
              <b><font size="2">Search the Database</font></b><br/>
276 416 berkley
              <font size="2">
277 469 berkley
              Click the Search button to submit your search.  The results will be
278 416 berkley
              displayed below under the heading "Results".
279
              </font>
280
              </p>
281
            </td>
282 304 berkley
          </tr>
283
        </table>
284 400 berkley
      <input type="hidden" name="action" value="query" />
285 304 berkley
    	<input type="hidden" name="qformat" value="html" />
286
    	<input type="hidden" name="operator" value="UNION" />
287 420 berkley
      <input type="hidden" name="returnfield"
288 422 berkley
             value="resource/dataset/originator/individualName/surName" />
289 420 berkley
      <input type="hidden" name="returnfield"
290 422 berkley
            value="resource/dataset/originator/individualName/givenName" />
291 420 berkley
      <input type="hidden" name="returnfield"
292 422 berkley
            value="resource/dataset/originator/organizationName" />
293 455 berkley
      <input type="hidden" name="returnfield"
294 469 berkley
             value="resource/dataset/title" />
295
      <input type="hidden" name="returnfield"
296 499 jones
             value="eml-dataset/title" />
297
      <input type="hidden" name="returnfield"
298 469 berkley
             value="resource/dataset/keywordInfo/keyword" />
299
      <input type="hidden" name="returndoc"
300
             value="-//NCEAS//resource//EN" />
301
      <input type="hidden" name="returndoc"
302
             value="-//NCEAS//eml-dataset//EN" />
303 535 jones
      <input type="hidden" name="site" value="MARINE" />
304 469 berkley
      <input type="submit" value="Search" />
305 422 berkley
      <input type="reset" value="Clear Form" />
306 304 berkley
307 422 berkley
    </form>
308 304 berkley
309 438 berkley
    <a name="browse" />
310
	  <font size="2"><xsl:number value="count(resultset/document)" /> documents
311
     found.</font>
312
	  <!-- This tests to see if there are returned documents,
313
	       if there are not then don't show the query results -->
314
	  <xsl:if test="count(resultset/document) &gt; 0">
315
	    <center>
316
        <u><h2>Results</h2></u>
317
      </center>
318
319 295 berkley
        <table width="100%">
320 497 jones
          <tr>
321 499 jones
           <th class="sectionhead"><font size="2">Title</font></th>
322
           <th class="sectionhead"><font size="2">Action</font></th>
323
           <th class="sectionhead"><font size="2">Related Documents</font></th>
324
           <th class="sectionhead"><font size="2">Contacts</font></th>
325
           <th class="sectionhead"><font size="2">Organization</font></th>
326
           <th class="sectionhead"><font size="2">Keywords</font></th>
327 438 berkley
          </tr>
328 406 berkley
	      <font size="2">
329 469 berkley
330
        <!--<xsl:for-each select="resultset/document[doctype = 'resource']">-->
331
        <xsl:for-each select="resultset/document">
332 318 berkley
          <xsl:sort select="doctitle"/>
333 295 berkley
          <tr valign="top">
334
            <xsl:attribute name="class">
335
              <xsl:choose>
336 497 jones
                <xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
337
                <xsl:when test="position() mod 2 = 0">roweven</xsl:when>
338 295 berkley
              </xsl:choose>
339
            </xsl:attribute>
340
341
          <td>
342 499 jones
            <font size="3">
343
              <xsl:value-of select="./param[@name='resource/dataset/title']"/>
344
              <xsl:value-of select="./param[@name='eml-dataset/title']"/>
345
              <br/>
346
            </font>
347
            <p><pre>Document ID: <xsl:value-of select="./docid"/></pre></p>
348
          </td>
349
          <td>
350 455 berkley
            <form action="@html-path@/servlet/marine" method="POST">
351 498 jones
              <xsl:attribute name="name">
352 535 jones
                <xsl:value-of select="translate(./docid,'.','')"/>
353 498 jones
              </xsl:attribute>
354 455 berkley
            <!-- abstractpath tells the servlet where the abstract is in the
355
                 document.  The % sign is used because the path could be
356
                 resource/literature or resource/dataset. -->
357 499 jones
            <input type="hidden" name="abstractpath"
358
                   value="resource/%/abstract" />
359 566 jones
            <input type="hidden" name="action" value="read"/>
360 498 jones
            <input type="hidden" name="docid">
361
              <xsl:attribute name="value">
362
                <xsl:value-of select="./docid"/>
363
              </xsl:attribute>
364
            </input>
365 456 berkley
            <xsl:for-each select="./relation">
366
              <input type="hidden" name="relation">
367
                <xsl:attribute name="value" >
368
                  <xsl:value-of select="./relationdoc" />
369
                </xsl:attribute>
370
              </input>
371
            </xsl:for-each>
372 498 jones
373 499 jones
            <font size="2">
374 498 jones
            <a>
375 566 jones
              <xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '.', '')"/>)</xsl:attribute>
376 498 jones
               Dataset Information
377
            </a><br />
378
            <a>
379 535 jones
              <xsl:attribute name="href">javascript:submitform('getabstract',document.<xsl:value-of select="translate(./docid,'.','')"/>)</xsl:attribute>
380 498 jones
              View Abstract
381
            </a><br />
382
            <a>
383 535 jones
              <xsl:attribute name="href">javascript:submitform('getdatadoc',document.<xsl:value-of select="translate(./docid,'.','')"/>)</xsl:attribute>
384 498 jones
               Download Data and Metadata
385
            </a><br />
386 499 jones
            </font>
387 498 jones
            </form>
388 295 berkley
          </td>
389 477 berkley
          <td>
390
            <xsl:if test="count(./relation) &gt; 0">
391
              <xsl:for-each select="./relation">
392
                <a>
393 482 berkley
                  <xsl:if test="starts-with(./relationdoc, 'http')">
394
                    <xsl:attribute name="href">
395
                      <xsl:value-of select="./relationdoc" />
396
                    </xsl:attribute>
397 488 berkley
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-variable//EN'">
398
                      <font size="2">Variable Information</font>
399
                    </xsl:if>
400
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-file//EN'">
401
                      <font size="2">File Information</font>
402
                    </xsl:if>
403
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-access//EN'">
404
                      <font size="2">Access Information</font>
405
                    </xsl:if>
406
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-context//EN'">
407
                      <font size="2">Context Information</font>
408
                    </xsl:if>
409
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-software//EN'">
410
                      <font size="2">Software Information</font>
411
                    </xsl:if>
412
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-status//EN'">
413
                      <font size="2">Status Information</font>
414
                    </xsl:if>
415
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-supplement//EN'">
416
                      <font size="2">Supplemental Information</font>
417
                    </xsl:if>
418
                    <!-- If the doctype is null, this file is assumed to
419
                         be a data file
420
                     -->
421
                    <xsl:if test="./relationdoctype = 'null'">
422
                      <font size="2">Data File</font>
423
                    </xsl:if>
424 482 berkley
                  </xsl:if>
425
                  <xsl:if test="starts-with(./relationdoc, 'metacat')">
426
                    <xsl:attribute name="href">
427 566 jones
                      <xsl:text>http://dev.nceas.ucsb.edu@html-path@/servlet/marine/?action=read&amp;qformat=html&amp;docid=</xsl:text>
428 482 berkley
                      <xsl:value-of select="./relationdoc" />
429
                    </xsl:attribute>
430 488 berkley
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-variable//EN'">
431
                      <font size="2">Variable Information</font>
432
                    </xsl:if>
433
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-file//EN'">
434
                      <font size="2">File Information</font>
435
                    </xsl:if>
436
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-access//EN'">
437
                      <font size="2">Access Information</font>
438
                    </xsl:if>
439
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-context//EN'">
440
                      <font size="2">Context Information</font>
441
                    </xsl:if>
442
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-software//EN'">
443
                      <font size="2">Software Information</font>
444
                    </xsl:if>
445
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-status//EN'">
446
                      <font size="2">Status Information</font>
447
                    </xsl:if>
448
                    <xsl:if test="./relationdoctype = '-//NCEAS//eml-supplement//EN'">
449
                      <font size="2">Supplemental Information</font>
450
                    </xsl:if>
451
                    <!-- If the doctype is null, this file is assumed to
452
                         be a data file
453
                     -->
454
                    <xsl:if test="./relationdoctype = 'null'">
455
                      <font size="2">Data File</font>
456
                    </xsl:if>
457 482 berkley
                  </xsl:if>
458 477 berkley
                </a>
459
                <br/>
460 487 berkley
              </xsl:for-each>
461 477 berkley
            </xsl:if>
462 318 berkley
          </td>
463 400 berkley
          <td>
464 477 berkley
            <xsl:for-each
465 456 berkley
               select="./param[@name='resource/dataset/originator/individualName/surName']" >
466 455 berkley
              <font size="2">
467
              <xsl:value-of
468 456 berkley
                select="." />
469 455 berkley
              </font>
470 469 berkley
              <br/>
471 400 berkley
472 456 berkley
      <!--        <font size="2">
473 455 berkley
              <xsl:value-of
474
                select="./param[@name='resource/dataset/originator/individualName/surName']" />
475
              </font><br/>
476 456 berkley
      -->
477 477 berkley
            </xsl:for-each>
478
            <xsl:text>&nbsp;</xsl:text>
479 318 berkley
          </td>
480 416 berkley
          <td>
481 422 berkley
              <font size="2">
482
              <xsl:value-of
483
                select="./param[@name='resource/dataset/originator/organizationName']" />
484
              </font>
485 318 berkley
              <xsl:text>&nbsp;</xsl:text>
486
          </td>
487 400 berkley
488 295 berkley
          <td>
489 455 berkley
           <xsl:for-each
490
            select="./param[@name='resource/dataset/keywordInfo/keyword']" >
491
              <font size="2">
492
              <xsl:value-of
493
               select="." />
494
               <br/>
495
              </font>
496
            </xsl:for-each>
497
            <xsl:text>&nbsp;</xsl:text>
498 295 berkley
          </td>
499 477 berkley
          <!--
500 318 berkley
          <td>
501 469 berkley
            <xsl:text>&nbsp;</xsl:text>
502 455 berkley
            <xsl:if test="count(./relation) &gt; 0">
503
              <form action="@html-path@/servlet/marine" method="POST">
504 566 jones
              <input type="hidden" name="action" value="read"/>
505 455 berkley
              <input type="hidden" name="qformat" value="xml" />
506
              <xsl:for-each select="./relation">
507 469 berkley
                <font size="2">
508 566 jones
                <input type="radio" name="docid">
509 469 berkley
                <xsl:attribute name="value" >
510
                  <xsl:value-of select="./relationdoc" />
511
                </xsl:attribute>
512 455 berkley
                <xsl:value-of select="./relationdoc" />
513 469 berkley
                </input>
514
                </font>
515
                <br/>
516 455 berkley
             </xsl:for-each>
517
             <input type="submit" value="Get" />
518
             </form>
519
            </xsl:if>
520 406 berkley
          </td>
521 477 berkley
          -->
522 295 berkley
          </tr>
523
        </xsl:for-each>
524 406 berkley
        </font>
525 295 berkley
        </table>
526
527 469 berkley
        <h3><a href="#top">New Search</a></h3>
528 318 berkley
        </xsl:if>
529
530 295 berkley
      </body>
531
    </html>
532
  </xsl:template>
533
534
</xsl:stylesheet>