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

    
282
	
283
	      <font size="2">
284
        <xsl:for-each select="resultset/document">
285
          <xsl:sort select="doctitle"/>
286
          <tr valign="top">
287
            <xsl:attribute name="class">
288
              <xsl:choose>
289
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
290
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
291
              </xsl:choose>
292
            </xsl:attribute>
293

    
294
          <td>
295
              <input border="0" type="image">
296
                <xsl:attribute name="src">
297
                  <xsl:choose>
298
                    <xsl:when test="position() 
299
                         mod 2 = 1">@html-path@/marine/whiteMenu.jpg</xsl:when>
300
                    <xsl:when test="position() 
301
                         mod 2 = 0">@html-path@/marine/blueMenu.jpg</xsl:when>
302
                  </xsl:choose>
303
                </xsl:attribute>
304
                <xsl:attribute name="name">
305
                  <xsl:value-of select="./docid"/>
306
                </xsl:attribute>
307
              </input>
308
          </td>
309
          <td><xsl:value-of select="./doctitle"/>
310
              
311
              <xsl:text>&nbsp;</xsl:text>
312
          </td>
313
          <td>
314
              <xsl:value-of select="./givenName" /> 
315
              <xsl:text>&nbsp;</xsl:text>
316

    
317
              <xsl:value-of select="./surName" />
318
              <xsl:text>&nbsp;</xsl:text>
319
          </td>
320
          <td><xsl:value-of select="./organizationName" />
321
              <xsl:text>&nbsp;</xsl:text>
322
          </td>
323
  
324
          <td>
325
              <xsl:value-of select="./createdate" />
326
              <xsl:text>&nbsp;</xsl:text>
327
          </td>
328
          <td>
329
              <xsl:value-of select="./updatedate" /> 
330
              <xsl:text>&nbsp;</xsl:text>
331
          </td>
332
          </tr>
333
        </xsl:for-each>
334
        </font>
335
        </table>
336
        </form>
337

    
338
        <h3><a href="#top">New Query</a></h3>
339
        
340
        </xsl:if>
341
        
342
      </body>
343
    </html>
344
  </xsl:template>
345

    
346
</xsl:stylesheet>
(6-6/22)