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