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 386 2000-08-18 22:45:56Z 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
      <script language="JavaScript">
28
        function gotoNceas()
29
        {
30
          window.location="http://www.nceas.ucsb.edu";
31
        }
32
      </script>
33
        <a name="top" />
34
        <table width="100%">
35
        <tr>
36
          <td align="left" valign="top">
37
            <form action="@html-path@/servlet/marine"
38
                  method="POST">
39
               <input type="hidden" name="action" value="query" />   
40
    	       <input type="hidden" name="query" value="" />
41
    	       <input type="hidden" name="qformat" value="html" />
42
               <input type="hidden" name="operator" value="UNION" />
43
               <input type="hidden" name="anyfield" value="%" />
44
               <input type="submit" value="Browse the Database" size="15" />
45
            </form>   
46
          </td>
47
          <td align="center" valign="bottom">
48
            <img src="@html-path@/marine/logo-line.gif" alt="NCEAS Logo" 
49
                 onClick="gotoNceas()" />
50
          </td>
51
          <td align="right" valign="top">
52
            <form action="@html-path@/servlet/marine"
53
                  method="POST">
54
               Quick Search: <input type="text" name="anyfield" size="10" />
55
               <input type="hidden" name="action" value="query" />   
56
    	       <input type="hidden" name="qformat" value="html" />
57
    	       <input type="hidden" name="operator" value="UNION" />
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" 
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="given_name" size="15">
196
             	  <xsl:attribute name="value">
197
                  <xsl:value-of select="resultset/query/given_name" />
198
                  </xsl:attribute>
199
                  </input>
200
                </td>
201
                <td>Last Name:</td>
202
                <td> <!-- <input type="text" name="surname" /> -->
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
        
250
        <input type="submit" value="Query" />
251
        <input type="reset" value="Clear Form" />
252
        
253
        </form>
254
             
255
  <a name="browse" />
256
	<font size="3"><xsl:number value="count(resultset/document)" /> documents 
257
  found.</font>
258
	<!-- This tests to see if there are returned documents,
259
	     if there are not then don't show the query results
260
	-->
261
	<xsl:if test="count(resultset/document) &gt; 0">
262
	
263
	<center>
264
          <u><h2>Results</h2></u>
265
        </center>
266
        
267
        <form action="@html-path@/servlet/marine" method="POST">
268
        <input type="hidden" name="action" value="getdocument"/>
269
                
270
        <table width="100%">
271
        <tr class="rowodd">
272
        <th>&nbsp;</th>
273
        <th><xsl:text>Title</xsl:text></th>
274
        <th><xsl:text>Owner</xsl:text></th>
275
        <th><xsl:text>Organization</xsl:text></th>
276
        <th><xsl:text>Creation Date</xsl:text></th>
277
        <th><xsl:text>Last Updated</xsl:text></th>
278
        </tr>
279

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

    
292
          <td>
293
              <input border="0" type="image">
294
                <xsl:attribute name="src">
295
                  <xsl:choose>
296
                    <xsl:when test="position() 
297
                         mod 2 = 1">@html-path@/marine/whiteMenu.jpg</xsl:when>
298
                    <xsl:when test="position() 
299
                         mod 2 = 0">@html-path@/marine/blueMenu.jpg</xsl:when>
300
                  </xsl:choose>
301
                </xsl:attribute>
302
                <xsl:attribute name="name">
303
                  <xsl:value-of select="./docid"/>
304
                </xsl:attribute>
305
              </input>
306
          </td>
307
          <td><xsl:value-of select="./doctitle"/>
308
              
309
              <xsl:text>&nbsp;</xsl:text>
310
          </td>
311
  <!--        <td><xsl:value-of select="./givenName" />
312
              <xsl:text>&nbsp;</xsl:text>
313
              <xsl:value-of select="./surName" />
314
              <xsl:text>&nbsp;</xsl:text>
315
          </td>
316
          <td><xsl:value-of select="./organizationName" />
317
              <xsl:text>&nbsp;</xsl:text>
318
          </td>
319
          <td>
320
              <xsl:value-of select="./date_created" />
321
              <xsl:text>&nbsp;</xsl:text>
322
          </td>
323
          <td>
324
              <xsl:value-of select="./date_updated" /> 
325
              <xsl:text>&nbsp;</xsl:text>
326
          </td> -->
327
          </tr>
328
        </xsl:for-each>
329
        </table>
330
        </form>
331

    
332
        <h3><a href="#top">New Query</a></h3>
333
        
334
        </xsl:if>
335
        
336
      </body>
337
    </html>
338
  </xsl:template>
339

    
340
</xsl:stylesheet>
(7-7/23)