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