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 438 berkley
        <link rel="stylesheet" type="text/css" href="@html-path@/marine/rowcol.css" />
23 295 berkley
      </head>
24
      <body class="emlbody">
25 304 berkley
        <a name="top" />
26 318 berkley
        <table width="100%">
27
        <tr>
28
          <td align="left" valign="top">
29 400 berkley
            <form action="@html-path@/servlet/marine#browse"
30 318 berkley
                  method="POST">
31 400 berkley
             <input type="hidden" name="action" value="query" />
32 318 berkley
    	       <input type="hidden" name="query" value="" />
33
    	       <input type="hidden" name="qformat" value="html" />
34 400 berkley
             <input type="hidden" name="operator" value="UNION" />
35
             <input type="hidden" name="anyfield" value="%" />
36 420 berkley
             <input type="hidden" name="returnfield"
37
               value="resource/dataset/originator/individualName/surName" />
38
             <input type="hidden" name="returnfield"
39
               value="resource/dataset/originator/individualName/givenName" />
40
             <input type="hidden" name="returnfield"
41
               value="resource/dataset/originator/organizationName" />
42 416 berkley
             <input border="0" type="image"
43
                    src="@image-path@/marine/browsebutton.jpg"
44
                    alt="browse the database"
45
                    size="15" /><br/>
46
             <a href="#beginform" border="0">
47
              <img border="0"
48
                   src="@image-path@/marine/skipbutton.jpg"
49
                   alt="skip the introduction"/>
50
            </a>
51
           </form>
52
    	   </td>
53
         <td align="center" valign="top">
54
            <img src="@image-path@/marine/logo-line.gif" alt="NCEAS Logo" />
55
         </td>
56
         <td align="right" valign="top">
57 400 berkley
            <form action="@html-path@/servlet/marine#browse"
58 318 berkley
                  method="POST">
59 416 berkley
               <font size="2">
60 386 berkley
               Quick Search: <input type="text" name="anyfield" size="10" />
61 416 berkley
               </font>
62 318 berkley
               <input type="hidden" name="action" value="query" />
63
    	       <input type="hidden" name="qformat" value="html" />
64
    	       <input type="hidden" name="operator" value="UNION" />
65 438 berkley
66
             <input type="hidden" name="returnfield"
67
              value="resource/dataset/originator/individualName/surName" />
68
             <input type="hidden" name="returnfield"
69
              value="resource/dataset/originator/individualName/givenName" />
70
            <input type="hidden" name="returnfield"
71
             value="resource/dataset/originator/organizationName" />
72 318 berkley
    	     </form>
73 416 berkley
         </td>
74
    	 </tr>
75
       </table>
76 318 berkley
77
        <hr />
78 416 berkley
        <center><h3>MARINE Query Interface</h3></center>
79 318 berkley
        <font size="2">
80
        <p class="intro">
81
          This page is used to query information for
82 386 berkley
          <a href="http://www.mms.gov/omm/pacific/enviro/mint.htm">MARINE</a>
83
          scientists from
84 318 berkley
          the NCEAS Ecological Metadata Database.  For more information on
85
          this project, please read the
86 386 berkley
          <a href=
87
          "http://www.nceas.ucsb.edu/marinedata/">
88 318 berkley
          proposal abstract</a>.
89
        </p>
90 304 berkley
91 318 berkley
        <p class="intro">
92 386 berkley
           Each step below contains several fields relating to a part of the
93
           dataset.  You may also browse
94
           the entire database by simply clicking the browse link at the top
95
           of the page.
96 318 berkley
           Clicking on the buttons next to each data line will give you more
97 386 berkley
           information about the dataset or allow you to download the entire
98
           dataset.
99
           Please note some fields in the query forms will not be pertinent to
100
           your dataset.
101
           If this is the case, simply leave any field blank to omit it from
102
           the searching.
103 318 berkley
        </p>
104 304 berkley
105 318 berkley
        <p class="intro">
106 386 berkley
           Note that the wildcard character is a percent sign (%).  It may
107
           be used in any
108
           field to denote "any" value.  For example, the query "do%" would
109
           return "document"
110
           or "dog" or "domino" or "dolphin", etc.  Placing a single percent
111
           sign in a field
112
           will return any document that contains that field.  Placing a
113
           percent sign in
114
           the "Any Field" field is equivalent to browsing the database (i.e.
115
           it will return
116 318 berkley
           every document).
117
        </p>
118
        </font>
119 416 berkley
        <hr />
120 400 berkley
        <form action="@html-path@/servlet/marine#browse"
121 298 berkley
              method="POST">
122 416 berkley
        <a name="beginform" />
123
        <table width="100%" border="0">
124 304 berkley
          <tr>
125 318 berkley
             <td valign="bottom" width = "25">
126 416 berkley
        	<img src="@image-path@/marine/step1.jpg" alt="step 1"/>
127 304 berkley
             </td>
128 318 berkley
             <td>
129
               <p>
130 416 berkley
               <b><font size="2">Keywords and Title</font></b><br/>
131 318 berkley
               <font size="2">
132 386 berkley
                 Enter any keywords that might partain to the dataset you
133
                 are looking for.
134
                 The "Any Field" text box will search for any field in any
135
                 document for
136
                 the text you provide.  The title and alternate title will
137
                 search for text
138
                 in the title or alternate title fields of a document only.
139
                 Fields left
140 318 berkley
                 blank will not be used in the search criteria.
141
               </font></p>
142
             </td>
143 304 berkley
          </tr>
144
        </table>
145 318 berkley
146 304 berkley
        <table width="100%">
147 298 berkley
             <tr>
148 416 berkley
                <td align="right">Title:</td>
149 318 berkley
                <td>
150 416 berkley
                  <input type="text" name="title" size="30">
151 318 berkley
                  <xsl:attribute name="value">
152
                  <xsl:value-of select="resultset/query/title" />
153
                  </xsl:attribute>
154
                  </input>
155
                </td>
156 416 berkley
                <td align="right">Alternate Title:</td>
157
             	  <td>
158
                <input type="text" name="alttitle" size="30">
159
             	  <xsl:attribute name="value">
160
                  <xsl:value-of select="resultset/query/alttitle" />
161 318 berkley
                  </xsl:attribute>
162
                  </input>
163
                </td>
164 298 berkley
             </tr>
165 304 berkley
             <tr>
166 416 berkley
              <td align="right">Keywords:</td>
167
                <td>
168
                  <input type="text" name="keyword" size="30">
169
                  <xsl:attribute name="value">
170
                  <xsl:value-of select="resultset/query/keyword" />
171 318 berkley
                  </xsl:attribute>
172
                  </input>
173
                </td>
174 416 berkley
                <td align="right">Any Field:</td>
175 318 berkley
                <td>
176 416 berkley
                  <input type="text" name="anyfield" size="30">
177 318 berkley
                  <xsl:attribute name="value">
178 416 berkley
                  <xsl:value-of select="resultset/query/anyfield" />
179 318 berkley
                  </xsl:attribute>
180
                  </input>
181
                </td>
182 304 berkley
             </tr>
183
        </table>
184 318 berkley
185 416 berkley
        <table width="100%" border="0">
186 304 berkley
          <tr>
187 416 berkley
             <td valign="center" align="left" width="25">
188
        	   <img src="@image-path@/marine/step2.jpg" alt="step 2"/>
189 318 berkley
             </td>
190
             <td>
191 416 berkley
             <font size="2"><b>Associated Individual Information</b><br/>
192
        	   Enter data about an owner or someone else who is associated with
193
             the dataset. Any field(s) left blank will not be used
194 318 berkley
        	   in the search criteria.
195
        	   </font>
196 304 berkley
             </td>
197
          </tr>
198
        </table>
199
        <table width="100%">
200
             <tr>
201 416 berkley
                <td align="right">First Name:</td>
202 318 berkley
                <td>
203 416 berkley
                  <input type="text" name="givenName" size="30">
204 318 berkley
             	  <xsl:attribute name="value">
205 404 berkley
                  <xsl:value-of select="resultset/query/givenName" />
206 318 berkley
                  </xsl:attribute>
207
                  </input>
208
                </td>
209 416 berkley
                <td align="right">Last Name:</td>
210 406 berkley
                <td>
211 416 berkley
                  <input type="text" name="surName" size="30">
212 318 berkley
             	  <xsl:attribute name="value">
213 404 berkley
                  <xsl:value-of select="resultset/query/surName" />
214 318 berkley
                  </xsl:attribute>
215
                  </input>
216
                </td>
217 304 berkley
             </tr>
218 318 berkley
             <tr>
219 416 berkley
             	<td align="right">Organization:</td>
220 318 berkley
             	<td>
221 416 berkley
             	  <input type="text" name="organizationName" size="30">
222 318 berkley
             	  <xsl:attribute name="value">
223
                  <xsl:value-of select="resultset/query/organizationName" />
224
                  </xsl:attribute>
225
                  </input>
226
                </td>
227 416 berkley
             	<td align="right">Email Address:</td>
228 318 berkley
             	<td>
229 416 berkley
             	  <input type="text" name="electronicMailAddress" size="30">
230 318 berkley
             	  <xsl:attribute name="value">
231
                  <xsl:value-of select="resultset/query/electronicMailAddress" />
232
                  </xsl:attribute>
233
                  </input>
234
                </td>
235
             </tr>
236
           </table>
237 416 berkley
        <table width="100%" border="0">
238 304 berkley
          <tr>
239 416 berkley
            <td valign="center" align="left" width="25">
240
              <img src="@image-path@/marine/step3.jpg" alt="step 3"/>
241
            </td>
242
            <td>
243
              <p>
244
              <b><font size="2">Query the Database</font></b><br/>
245
              <font size="2">
246
              Click the Query button to submit your query.  The results will be
247
              displayed below under the heading "Results".
248
              </font>
249
              </p>
250
            </td>
251 304 berkley
          </tr>
252
        </table>
253 400 berkley
      <input type="hidden" name="action" value="query" />
254 304 berkley
    	<input type="hidden" name="qformat" value="html" />
255
    	<input type="hidden" name="operator" value="UNION" />
256 420 berkley
      <input type="hidden" name="returnfield"
257 422 berkley
             value="resource/dataset/originator/individualName/surName" />
258 420 berkley
      <input type="hidden" name="returnfield"
259 422 berkley
            value="resource/dataset/originator/individualName/givenName" />
260 420 berkley
      <input type="hidden" name="returnfield"
261 422 berkley
            value="resource/dataset/originator/organizationName" />
262 455 berkley
      <input type="hidden" name="returnfield"
263
            value="resource/dataset/keywordInfo/keyword" />
264 422 berkley
      <input type="submit" value="Query" />
265
      <input type="reset" value="Clear Form" />
266 304 berkley
267 422 berkley
    </form>
268 304 berkley
269 438 berkley
    <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) &gt; 0">
275
	    <center>
276
        <u><h2>Results</h2></u>
277
      </center>
278
279 295 berkley
        <table width="100%">
280 438 berkley
          <tr class="rowodd">
281
           <th>&nbsp;</th>
282
           <th><font size="2"><xsl:text>Title</xsl:text></font></th>
283
           <th><font size="2"><xsl:text>Contacts</xsl:text></font></th>
284
           <th><font size="2"><xsl:text>Organization</xsl:text></font></th>
285 455 berkley
           <th><font size="2"><xsl:text>Keywords</xsl:text></font></th>
286
           <th><font size="2"><xsl:text>Related Documents</xsl:text></font></th>
287 438 berkley
          </tr>
288 295 berkley
289 318 berkley
290 406 berkley
	      <font size="2">
291 456 berkley
        <xsl:for-each select="resultset/document[doctype = 'resource']">
292 318 berkley
          <xsl:sort select="doctitle"/>
293 295 berkley
          <tr valign="top">
294
            <xsl:attribute name="class">
295
              <xsl:choose>
296
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
297
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
298
              </xsl:choose>
299
            </xsl:attribute>
300
301
          <td>
302 455 berkley
            <form action="@html-path@/servlet/marine" method="POST">
303
            <!-- abstractpath tells the servlet where the abstract is in the
304
                 document.  The % sign is used because the path could be
305
                 resource/literature or resource/dataset. -->
306
            <input type="hidden" name="abstractpath" value="resource/%/abstract" />
307
            <input type="hidden" name="action" value="getdocument"/>
308 456 berkley
            <xsl:for-each select="./relation">
309
              <input type="hidden" name="relation">
310
                <xsl:attribute name="value" >
311
                  <xsl:value-of select="./relationdoc" />
312
                </xsl:attribute>
313
              </input>
314
            </xsl:for-each>
315 295 berkley
              <input border="0" type="image">
316
                <xsl:attribute name="src">
317
                  <xsl:choose>
318
                    <xsl:when test="position()
319 416 berkley
                         mod 2 = 1">@image-path@/marine/whiteMenu.jpg</xsl:when>
320 295 berkley
                    <xsl:when test="position()
321 416 berkley
                         mod 2 = 0">@image-path@/marine/blueMenu.jpg</xsl:when>
322 295 berkley
                  </xsl:choose>
323
                </xsl:attribute>
324
                <xsl:attribute name="name">
325
                  <xsl:value-of select="./docid"/>
326
                </xsl:attribute>
327
              </input>
328 455 berkley
              </form>
329 295 berkley
          </td>
330 416 berkley
          <td><font size="2"><xsl:value-of select="./doctitle"/></font>
331 295 berkley
              <xsl:text>&nbsp;</xsl:text>
332 318 berkley
          </td>
333 400 berkley
          <td>
334 456 berkley
          <xsl:for-each
335
               select="./param[@name='resource/dataset/originator/individualName/surName']" >
336 455 berkley
              <font size="2">
337
              <xsl:value-of
338 456 berkley
                select="." />
339 455 berkley
              </font>
340 456 berkley
              <xsl:text>&nbsp;</xsl:text><br/>
341 400 berkley
342 456 berkley
      <!--        <font size="2">
343 455 berkley
              <xsl:value-of
344
                select="./param[@name='resource/dataset/originator/individualName/surName']" />
345
              </font><br/>
346 456 berkley
      -->
347
            </xsl:for-each>
348 318 berkley
          </td>
349 416 berkley
          <td>
350 422 berkley
              <font size="2">
351
              <xsl:value-of
352
                select="./param[@name='resource/dataset/originator/organizationName']" />
353
              </font>
354 318 berkley
              <xsl:text>&nbsp;</xsl:text>
355
          </td>
356 400 berkley
357 295 berkley
          <td>
358 455 berkley
           <xsl:for-each
359
            select="./param[@name='resource/dataset/keywordInfo/keyword']" >
360
              <font size="2">
361
              <xsl:value-of
362
               select="." />
363
               <br/>
364
              </font>
365
            </xsl:for-each>
366
            <xsl:text>&nbsp;</xsl:text>
367 295 berkley
          </td>
368 455 berkley
369 318 berkley
          <td>
370 455 berkley
            <xsl:if test="count(./relation) &gt; 0">
371
              <form action="@html-path@/servlet/marine" method="POST">
372
              <input type="hidden" name="action" value="getrelateddocument"/>
373
              <input type="hidden" name="qformat" value="xml" />
374
              <xsl:for-each select="./relation">
375
              <font size="2">
376
              <input type="radio" name="url">
377
              <!--<xsl:attribute name="name" >
378
                <xsl:value-of select="./../docid" />
379
              </xsl:attribute> -->
380
              <xsl:attribute name="value" >
381
                <xsl:value-of select="./relationdoc" />
382
              </xsl:attribute>
383
              &nbsp;<xsl:value-of select="./relationdoc" />
384
              </input>
385
              </font>
386
              <br/>
387
             </xsl:for-each>
388
             <input type="submit" value="Get" />
389
             </form>
390
            </xsl:if>
391
            <xsl:text>&nbsp;</xsl:text>
392 406 berkley
          </td>
393 455 berkley
394 295 berkley
          </tr>
395
        </xsl:for-each>
396 406 berkley
        </font>
397 295 berkley
        </table>
398
399 304 berkley
        <h3><a href="#top">New Query</a></h3>
400 318 berkley
        </xsl:if>
401
402 295 berkley
      </body>
403
    </html>
404
  </xsl:template>
405
406
</xsl:stylesheet>