Project

General

Profile

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