Project

General

Profile

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 435 2000-09-05 20:49:28Z 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="abstractpath" 
39
                                  value="resource/%/abstract" />
40
             <input type="hidden" name="returnfield" 
41
               value="resource/dataset/originator/individualName/surName" />
42
             <input type="hidden" name="returnfield" 
43
               value="resource/dataset/originator/individualName/givenName" />
44
             <input type="hidden" name="returnfield" 
45
               value="resource/dataset/originator/organizationName" />
46
             <input border="0" type="image" 
47
                    src="@image-path@/marine/browsebutton.jpg"
48
                    alt="browse the database"
49
                    size="15" /><br/>
50
             <a href="#beginform" border="0">
51
              <img border="0" 
52
                   src="@image-path@/marine/skipbutton.jpg" 
53
                   alt="skip the introduction"/>
54
            </a>
55
           </form>
56
    	   </td>
57
         <td align="center" valign="top">
58
            <img src="@image-path@/marine/logo-line.gif" alt="NCEAS Logo" />
59
         </td>
60
         <td align="right" valign="top">
61
            <form action="@html-path@/servlet/marine#browse"
62
                  method="POST">
63
               <font size="2">
64
               Quick Search: <input type="text" name="anyfield" size="10" />
65
               </font>
66
               <input type="hidden" name="action" value="query" />   
67
    	       <input type="hidden" name="qformat" value="html" />
68
    	       <input type="hidden" name="operator" value="UNION" />
69
             <input type="hidden" name="abstractpath" 
70
                                  value="resource/%/abstract" />
71
      <input type="hidden" name="returnfield" 
72
        value="resource/dataset/originator/individualName/surName" />
73
      <input type="hidden" name="returnfield" 
74
        value="resource/dataset/originator/individualName/givenName" />
75
      <input type="hidden" name="returnfield" 
76
        value="resource/dataset/originator/organizationName" />
77
    	     </form>
78
         </td>
79
    	 </tr>  
80
       </table>
81
        
82
        <hr />
83
        <center><h3>MARINE Query Interface</h3></center>
84
        <font size="2">
85
        <p class="intro">
86
          This page is used to query information for 
87
          <a href="http://www.mms.gov/omm/pacific/enviro/mint.htm">MARINE</a> 
88
          scientists from
89
          the NCEAS Ecological Metadata Database.  For more information on
90
          this project, please read the 
91
          <a href=
92
          "http://www.nceas.ucsb.edu/marinedata/">
93
          proposal abstract</a>.
94
        </p>
95
        
96
        <p class="intro">
97
           Each step below contains several fields relating to a part of the 
98
           dataset.  You may also browse
99
           the entire database by simply clicking the browse link at the top 
100
           of the page.
101
           Clicking on the buttons next to each data line will give you more
102
           information about the dataset or allow you to download the entire 
103
           dataset.  
104
           Please note some fields in the query forms will not be pertinent to
105
           your dataset.  
106
           If this is the case, simply leave any field blank to omit it from 
107
           the searching.  
108
        </p>
109
        
110
        <p class="intro">
111
           Note that the wildcard character is a percent sign (%).  It may 
112
           be used in any
113
           field to denote "any" value.  For example, the query "do%" would 
114
           return "document"
115
           or "dog" or "domino" or "dolphin", etc.  Placing a single percent 
116
           sign in a field
117
           will return any document that contains that field.  Placing a 
118
           percent sign in
119
           the "Any Field" field is equivalent to browsing the database (i.e. 
120
           it will return
121
           every document).  
122
        </p>
123
        </font>
124
        <hr />
125
        <form action="@html-path@/servlet/marine#browse" 
126
              method="POST"> 
127
        <a name="beginform" />  
128
        <table width="100%" border="0">
129
          <tr>
130
             <td valign="bottom" width = "25">
131
        	<img src="@image-path@/marine/step1.jpg" alt="step 1"/>
132
             </td>
133
             <td>
134
               <p>
135
               <b><font size="2">Keywords and Title</font></b><br/>
136
               <font size="2">
137
                 Enter any keywords that might partain to the dataset you 
138
                 are looking for.  
139
                 The "Any Field" text box will search for any field in any 
140
                 document for 
141
                 the text you provide.  The title and alternate title will 
142
                 search for text 
143
                 in the title or alternate title fields of a document only.  
144
                 Fields left 
145
                 blank will not be used in the search criteria.
146
               </font></p>
147
             </td> 
148
          </tr>
149
        </table>
150
        
151
        <table width="100%">
152
             <tr>
153
                <td align="right">Title:</td>
154
                <td>
155
                  <input type="text" name="title" size="30">
156
                  <xsl:attribute name="value">
157
                  <xsl:value-of select="resultset/query/title" />
158
                  </xsl:attribute>
159
                  </input>
160
                </td>
161
                <td align="right">Alternate Title:</td>
162
             	  <td>        
163
                <input type="text" name="alttitle" size="30">
164
             	  <xsl:attribute name="value">
165
                  <xsl:value-of select="resultset/query/alttitle" />
166
                  </xsl:attribute>
167
                  </input>
168
                </td>
169
             </tr>
170
             <tr>
171
              <td align="right">Keywords:</td>
172
                <td>
173
                  <input type="text" name="keyword" size="30">
174
                  <xsl:attribute name="value">
175
                  <xsl:value-of select="resultset/query/keyword" />
176
                  </xsl:attribute>
177
                  </input>
178
                </td>
179
                <td align="right">Any Field:</td>
180
                <td>
181
                  <input type="text" name="anyfield" size="30">
182
                  <xsl:attribute name="value">
183
                  <xsl:value-of select="resultset/query/anyfield" />
184
                  </xsl:attribute>
185
                  </input>
186
                </td>
187
             </tr>
188
        </table>
189
        
190
        <table width="100%" border="0">
191
          <tr>
192
             <td valign="center" align="left" width="25">
193
        	   <img src="@image-path@/marine/step2.jpg" alt="step 2"/>
194
             </td>
195
             <td>
196
             <font size="2"><b>Associated Individual Information</b><br/>
197
        	   Enter data about an owner or someone else who is associated with
198
             the dataset. Any field(s) left blank will not be used
199
        	   in the search criteria.
200
        	   </font>
201
             </td>
202
          </tr>
203
        </table>
204
        <table width="100%">
205
             <tr>
206
                <td align="right">First Name:</td>
207
                <td> 
208
                  <input type="text" name="givenName" size="30">
209
             	  <xsl:attribute name="value">
210
                  <xsl:value-of select="resultset/query/givenName" />
211
                  </xsl:attribute>
212
                  </input>
213
                </td>
214
                <td align="right">Last Name:</td>
215
                <td>
216
                  <input type="text" name="surName" size="30">
217
             	  <xsl:attribute name="value">
218
                  <xsl:value-of select="resultset/query/surName" />
219
                  </xsl:attribute>
220
                  </input>
221
                </td>
222
             </tr>
223
             <tr>
224
             	<td align="right">Organization:</td>
225
             	<td> 
226
             	  <input type="text" name="organizationName" size="30">
227
             	  <xsl:attribute name="value">
228
                  <xsl:value-of select="resultset/query/organizationName" />
229
                  </xsl:attribute>
230
                  </input>
231
                </td>
232
             	<td align="right">Email Address:</td>
233
             	<td> 
234
             	  <input type="text" name="electronicMailAddress" size="30">
235
             	  <xsl:attribute name="value">
236
                  <xsl:value-of select="resultset/query/electronicMailAddress" />
237
                  </xsl:attribute>
238
                  </input>
239
                </td>
240
             </tr>
241
           </table>
242
        <table width="100%" border="0">
243
          <tr>
244
            <td valign="center" align="left" width="25">
245
              <img src="@image-path@/marine/step3.jpg" alt="step 3"/>
246
            </td>
247
            <td>
248
              <p>
249
              <b><font size="2">Query the Database</font></b><br/>
250
              <font size="2">
251
              Click the Query button to submit your query.  The results will be
252
              displayed below under the heading "Results".
253
              </font>
254
              </p>
255
            </td>
256
          </tr>
257
        </table>
258
      <input type="hidden" name="action" value="query" />   
259
    	<input type="hidden" name="qformat" value="html" />
260
    	<input type="hidden" name="operator" value="UNION" />
261
      <input type="hidden" name="returnfield" 
262
             value="resource/dataset/originator/individualName/surName" />
263
      <input type="hidden" name="returnfield" 
264
            value="resource/dataset/originator/individualName/givenName" />
265
      <input type="hidden" name="returnfield" 
266
            value="resource/dataset/originator/organizationName" />
267
      <input type="hidden" name="abstractpath" value="resource/%/abstract" />
268
        
269
      <input type="submit" value="Query" />
270
      <input type="reset" value="Clear Form" />
271
        
272
    </form>
273
             
274
  <a name="browse" />
275
	<font size="2"><xsl:number value="count(resultset/document)" /> documents 
276
  found.</font>
277
	<!-- This tests to see if there are returned documents,
278
	     if there are not then don't show the query results -->
279
	<xsl:if test="count(resultset/document) &gt; 0">
280
	
281
	<center>
282
          <u><h2>Results</h2></u>
283
        </center>
284
        
285
        <form action="@html-path@/servlet/marine" method="POST">
286
        <input type="hidden" name="abstractpath" value="resource/%/abstract" />
287
        <input type="hidden" name="action" value="getdocument"/>
288
                
289
        <table width="100%">
290
        <tr class="rowodd">
291
        <th>&nbsp;</th>
292
        <th><font size="2"><xsl:text>Title</xsl:text></font></th>
293
        <th><font size="2"><xsl:text>Contacts</xsl:text></font></th>
294
        <th><font size="2"><xsl:text>Organization</xsl:text></font></th>
295
        <th><font size="2"><xsl:text>Creation Date</xsl:text></font></th>
296
        <th><font size="2"><xsl:text>Last Updated</xsl:text></font></th>
297
        </tr>
298

    
299
	
300
	      <font size="2">
301
        <xsl:for-each select="resultset/document">
302
          <xsl:sort select="doctitle"/>
303
          <tr valign="top">
304
            <xsl:attribute name="class">
305
              <xsl:choose>
306
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
307
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
308
              </xsl:choose>
309
            </xsl:attribute>
310

    
311
          <td>
312
              <input border="0" type="image">
313
                <xsl:attribute name="src">
314
                  <xsl:choose>
315
                    <xsl:when test="position() 
316
                         mod 2 = 1">@image-path@/marine/whiteMenu.jpg</xsl:when>
317
                    <xsl:when test="position() 
318
                         mod 2 = 0">@image-path@/marine/blueMenu.jpg</xsl:when>
319
                  </xsl:choose>
320
                </xsl:attribute>
321
                <xsl:attribute name="name">
322
                  <xsl:value-of select="./docid"/>
323
                </xsl:attribute>
324
              </input>
325
          </td>
326
          <td><font size="2"><xsl:value-of select="./doctitle"/></font>
327
              <xsl:text>&nbsp;</xsl:text>
328
          </td>
329
          <td>
330
            <font size="2">
331
            <xsl:value-of 
332
              select="./param[@name='resource/dataset/originator/individualName/givenName']" />
333
            </font> 
334
            <xsl:text>&nbsp;</xsl:text>
335

    
336
            <font size="2">
337
            <xsl:value-of 
338
              select="./param[@name='resource/dataset/originator/individualName/surName']" />
339
            </font>
340
            <xsl:text>&nbsp;</xsl:text>
341
          </td>
342
          <td>
343
              <font size="2">
344
              <xsl:value-of 
345
                select="./param[@name='resource/dataset/originator/organizationName']" />
346
              </font>
347
              <xsl:text>&nbsp;</xsl:text>
348
          </td>
349
  
350
          <td>
351
              <font size="2"><xsl:value-of select="./createdate" /></font>
352
              <font size="2"><xsl:text>&nbsp;</xsl:text></font>
353
          </td>
354
          <td>
355
              <font size="2"><xsl:value-of select="./updatedate" /></font> 
356
              <xsl:text>&nbsp;</xsl:text>
357
          </td>
358
          </tr>
359
        </xsl:for-each>
360
        </font>
361
        </table>
362
        </form>
363

    
364
        <h3><a href="#top">New Query</a></h3>
365
        
366
        </xsl:if>
367
        
368
      </body>
369
    </html>
370
  </xsl:template>
371

    
372
</xsl:stylesheet>
(8-8/28)