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 438 2000-09-05 21:01:30Z 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
  <xsl:output method="html"/>
19
  <xsl:template match="/">
20
    <html>
21
      <head>
22
        <link rel="stylesheet" type="text/css" href="@html-path@/marine/rowcol.css" />
23
      </head>
24
      <body class="emlbody">
25
        <a name="top" />
26
        <table width="100%">
27
        <tr>
28
          <td align="left" valign="top">
29
            <form action="@html-path@/servlet/marine#browse"
30
                  method="POST">
31
             <input type="hidden" name="action" value="query" />   
32
    	       <input type="hidden" name="query" value="" />
33
    	       <input type="hidden" name="qformat" value="html" />
34
             <input type="hidden" name="operator" value="UNION" />
35
             <input type="hidden" name="anyfield" value="%" />
36
             <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
             <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
            <form action="@html-path@/servlet/marine#browse"
58
                  method="POST">
59
               <font size="2">
60
               Quick Search: <input type="text" name="anyfield" size="10" />
61
               </font>
62
               <input type="hidden" name="action" value="query" />   
63
    	       <input type="hidden" name="qformat" value="html" />
64
    	       <input type="hidden" name="operator" value="UNION" />
65
             
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
    	     </form>
73
         </td>
74
    	 </tr>  
75
       </table>
76
        
77
        <hr />
78
        <center><h3>MARINE Query Interface</h3></center>
79
        <font size="2">
80
        <p class="intro">
81
          This page is used to query information for 
82
          <a href="http://www.mms.gov/omm/pacific/enviro/mint.htm">MARINE</a> 
83
          scientists from
84
          the NCEAS Ecological Metadata Database.  For more information on
85
          this project, please read the 
86
          <a href=
87
          "http://www.nceas.ucsb.edu/marinedata/">
88
          proposal abstract</a>.
89
        </p>
90
        
91
        <p class="intro">
92
           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
           Clicking on the buttons next to each data line will give you more
97
           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
        </p>
104
        
105
        <p class="intro">
106
           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
           every document).  
117
        </p>
118
        </font>
119
        <hr />
120
        <form action="@html-path@/servlet/marine#browse" 
121
              method="POST"> 
122
        <a name="beginform" />  
123
        <table width="100%" border="0">
124
          <tr>
125
             <td valign="bottom" width = "25">
126
        	<img src="@image-path@/marine/step1.jpg" alt="step 1"/>
127
             </td>
128
             <td>
129
               <p>
130
               <b><font size="2">Keywords and Title</font></b><br/>
131
               <font size="2">
132
                 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
                 blank will not be used in the search criteria.
141
               </font></p>
142
             </td> 
143
          </tr>
144
        </table>
145
        
146
        <table width="100%">
147
             <tr>
148
                <td align="right">Title:</td>
149
                <td>
150
                  <input type="text" name="title" size="30">
151
                  <xsl:attribute name="value">
152
                  <xsl:value-of select="resultset/query/title" />
153
                  </xsl:attribute>
154
                  </input>
155
                </td>
156
                <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
                  </xsl:attribute>
162
                  </input>
163
                </td>
164
             </tr>
165
             <tr>
166
              <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
                  </xsl:attribute>
172
                  </input>
173
                </td>
174
                <td align="right">Any Field:</td>
175
                <td>
176
                  <input type="text" name="anyfield" size="30">
177
                  <xsl:attribute name="value">
178
                  <xsl:value-of select="resultset/query/anyfield" />
179
                  </xsl:attribute>
180
                  </input>
181
                </td>
182
             </tr>
183
        </table>
184
        
185
        <table width="100%" border="0">
186
          <tr>
187
             <td valign="center" align="left" width="25">
188
        	   <img src="@image-path@/marine/step2.jpg" alt="step 2"/>
189
             </td>
190
             <td>
191
             <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
        	   in the search criteria.
195
        	   </font>
196
             </td>
197
          </tr>
198
        </table>
199
        <table width="100%">
200
             <tr>
201
                <td align="right">First Name:</td>
202
                <td> 
203
                  <input type="text" name="givenName" size="30">
204
             	  <xsl:attribute name="value">
205
                  <xsl:value-of select="resultset/query/givenName" />
206
                  </xsl:attribute>
207
                  </input>
208
                </td>
209
                <td align="right">Last Name:</td>
210
                <td>
211
                  <input type="text" name="surName" size="30">
212
             	  <xsl:attribute name="value">
213
                  <xsl:value-of select="resultset/query/surName" />
214
                  </xsl:attribute>
215
                  </input>
216
                </td>
217
             </tr>
218
             <tr>
219
             	<td align="right">Organization:</td>
220
             	<td> 
221
             	  <input type="text" name="organizationName" size="30">
222
             	  <xsl:attribute name="value">
223
                  <xsl:value-of select="resultset/query/organizationName" />
224
                  </xsl:attribute>
225
                  </input>
226
                </td>
227
             	<td align="right">Email Address:</td>
228
             	<td> 
229
             	  <input type="text" name="electronicMailAddress" size="30">
230
             	  <xsl:attribute name="value">
231
                  <xsl:value-of select="resultset/query/electronicMailAddress" />
232
                  </xsl:attribute>
233
                  </input>
234
                </td>
235
             </tr>
236
           </table>
237
        <table width="100%" border="0">
238
          <tr>
239
            <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
          </tr>
252
        </table>
253
      <input type="hidden" name="action" value="query" />   
254
    	<input type="hidden" name="qformat" value="html" />
255
    	<input type="hidden" name="operator" value="UNION" />
256
      <input type="hidden" name="returnfield" 
257
             value="resource/dataset/originator/individualName/surName" />
258
      <input type="hidden" name="returnfield" 
259
            value="resource/dataset/originator/individualName/givenName" />
260
      <input type="hidden" name="returnfield" 
261
            value="resource/dataset/originator/organizationName" />
262
      <input type="submit" value="Query" />
263
      <input type="reset" value="Clear Form" />
264
        
265
    </form>
266
             
267
    <a name="browse" />
268
	  <font size="2"><xsl:number value="count(resultset/document)" /> documents 
269
     found.</font>
270
	  <!-- This tests to see if there are returned documents,
271
	       if there are not then don't show the query results -->
272
	  <xsl:if test="count(resultset/document) &gt; 0">
273
	    <center>
274
        <u><h2>Results</h2></u>
275
      </center>
276
      <form action="@html-path@/servlet/marine" method="POST">
277
      <!-- abstractpath tells the servlet where the abstract is in the 
278
           document.  The % sign is used because the path could be
279
           resource/literature or resource/dataset. -->
280
        <input type="hidden" name="abstractpath" value="resource/%/abstract" />
281
        <input type="hidden" name="action" value="getdocument"/>
282
          
283
        <table width="100%">
284
          <tr class="rowodd">
285
           <th>&nbsp;</th>
286
           <th><font size="2"><xsl:text>Title</xsl:text></font></th>
287
           <th><font size="2"><xsl:text>Contacts</xsl:text></font></th>
288
           <th><font size="2"><xsl:text>Organization</xsl:text></font></th>
289
           <th><font size="2"><xsl:text>Creation Date</xsl:text></font></th>
290
           <th><font size="2"><xsl:text>Last Updated</xsl:text></font></th>
291
          </tr>
292

    
293
	
294
	      <font size="2">
295
        <xsl:for-each select="resultset/document">
296
          <xsl:sort select="doctitle"/>
297
          <tr valign="top">
298
            <xsl:attribute name="class">
299
              <xsl:choose>
300
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
301
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
302
              </xsl:choose>
303
            </xsl:attribute>
304

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

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

    
358
        <h3><a href="#top">New Query</a></h3>
359
        
360
        </xsl:if>
361
        
362
      </body>
363
    </html>
364
  </xsl:template>
365

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