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

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

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

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

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

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