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 304 2000-07-28 19:00:12Z 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="/xmltodb/lib/rowcol.css" />
25
      </head>
26
      <body class="emlbody">
27
        <a name="top" />
28
        <center><h1>MARINE Query Interface</h1></center>
29
        
30
        <p><h3>You can either <a href="#browse">browse the database</a> or start with 
31
           step 1 below.</h3></p>
32
        
33
        <table width="100%" border="1">
34
          <tr>
35
             <td valign="bottom">
36
        	<img src="http://alpha.nceas.ucsb.edu/xmltodb/lib/marine/step1.png" />
37
        	<p>Enter data about the owner of the dataset.  There may be more than one
38
        	   owner of any given dataset.  Any field(s) left blank will not be used
39
        	   in the search criteria.
40
        	</p>
41
              </td>
42
          </tr>
43
        </table>
44
             
45
      	<form action="http://alpha.nceas.ucsb.edu/servlets/marineServlet#browse" 
46
              method="POST"> 
47
           <table width="100%">
48
             <tr>
49
                <td>First Name:</td>
50
                <td><input type="text" name="given_name" /></td>
51
                <td>Last Name:</td>
52
                <td><input type="text" name="surname" /></td>
53
             </tr>
54
             <tr>
55
             	<td>Organization:</td>
56
             	<td><input type="text" name="organization" /></td>
57
             	<td>Address:</td>
58
             	<td><input type="text" name="deliveryPoint" /></td>
59
             </tr>
60
             <tr>
61
             	<td>City:</td>
62
             	<td><input type="text" name="city" /></td>
63
             	<td>Postal Code:</td>
64
             	<td><input type="text" name="postalCode" /></td>
65
             </tr>
66
             <tr>
67
             	<td>Email Address:</td>
68
             	<td><input type="text" name="electronicMailAddress" /></td>
69
             	<td>Phone:</td>
70
             	<td><input type="text" name="voice" /></td>
71
             </tr>
72
           </table>
73
        
74
        <table width="100%" border="1">
75
          <tr>
76
             <td valign="bottom">
77
        	<img src="http://alpha.nceas.ucsb.edu/xmltodb/lib/marine/step2.png" />
78
        	<p>Enter bibliographic data relevent to the dataset.  
79
        	   Any field(s) left blank will not be used in the search criteria.  
80
        	   Some fields might not be relevent to the dataset for which you are 
81
        	   searching.
82
        	</p>
83
             </td>
84
          </tr>
85
        </table>
86
           
87
        <table width="100%">
88
             <tr>
89
             	<td>Publisher:</td>
90
                <td><input type="text" name="publisher" /></td>
91
                <td>Title:</td>
92
                <td><input type="text" name="title" /></td>
93
             </tr>
94
             <tr>
95
             	<td>Publication Date:</td>
96
             	<td><input type="text" name="pubdate" /></td>
97
             	<td>Alternate Title:</td>
98
             	<td><input type="text" name="alttitle" /></td>
99
             </tr>
100
             <tr>
101
             	<td>Publication Place:</td>
102
             	<td><input type="text" name="pubplace" /></td>
103
             	<td>URL:</td>
104
             	<td><input type="text" name="url" /></td>
105
             </tr>
106
             <tr>
107
             	<td>ISBN:</td>
108
             	<td><input type="text" name="isbn" /></td>
109
             	<td>Geospatial Representation Form:</td>
110
             	<!-- <td><input type="text" name="geoform" /></td> -->
111
             	<td>
112
             	<select name="geoform">
113
             	  <option value="" />
114
             	  <option value="atlas" />Atlas
115
             	  <option value="audio" />Audio
116
             	  <option value="diagram" />Diagram
117
             	  <option value="document" />Document
118
             	  <option value="globe" />Globe
119
             	  <option value="map" />Map
120
             	  <option value="model" />Model
121
             	  <option value="multimediaPresentation" />Multimedia Presentation
122
             	  <option value="profile" />Profiles
123
             	  <option value="rasterDigitalData" />Raster Digital Data
124
             	  <option value="remoteSensingImage" />Remote Sensing Image
125
             	  <option value="section" />Section
126
             	  <option value="spreadsheet" />Spreadsheet
127
             	  <option value="tabularDigialData" />Tabular Digial Data
128
             	  <option value="vectorDigitalData" />Vector Digital Data
129
             	  <option value="video" />Video
130
             	  <option value="view" />View
131
             	</select>
132
             	</td>
133
             </tr>
134
             <tr>
135
             	<td>ISSN:</td>
136
             	<td><input type="text" name="issn" /></td>
137
             	<td></td>
138
             	<td></td>
139
             </tr>
140
             <tr>
141
             	<td>Editor:</td>
142
             	<td><input type="text" name="editor" /></td>
143
             	<td></td>
144
             	<td></td>
145
             </tr>
146
             <tr>
147
             	<td>Edition:</td>
148
             	<td><input type="text" name="edition" /></td>
149
             	<td></td>
150
             	<td></td>
151
             </tr>
152
             <tr>
153
             	<td>Volume:</td>
154
             	<td><input type="text" name="volume" /></td>
155
             	<td></td>
156
             	<td></td>
157
             </tr>
158
        </table>
159

    
160
        <table width="100%" border="1">
161
          <tr>
162
             <td valign="bottom">
163
        	<img src="http://alpha.nceas.ucsb.edu/xmltodb/lib/marine/step3.png" />
164
        	<p>Enter any keywords that might partain to the dataset you are looking 
165
        	   for.  The "Any Field" text box will search any field in any document
166
        	   for the text you provide.
167
        	   Field(s) left blank will not be used in the search criteria.  
168
        	</p>
169
             </td>
170
          </tr>
171
        </table>
172
           
173
        <table width="100%">
174
             <tr>
175
             	<td>Keywords:</td>
176
                <td><input type="text" name="keyword" /></td>
177
                <td>Any Field:</td>
178
                <td><input type="text" name="anyfield" /></td>
179
             </tr>
180
        </table>
181
           
182
        <table width="100%" border="1">
183
          <tr>
184
             <td valign="bottom">
185
        	<img src="http://alpha.nceas.ucsb.edu/xmltodb/lib/marine/step4.png" />
186
        	<p>Click the Query button to submit your query.  The results will be
187
        	   displayed below under the heading "Query Results".
188
        	</p>
189
             </td>
190
          </tr>
191
        </table>
192
        <input type="hidden" name="action" value="squery" />   
193
    	<input type="hidden" name="query" value="" />
194
    	<input type="hidden" name="qformat" value="html" />
195
    	<input type="hidden" name="operator" value="UNION" />
196
        
197
        <input type="submit" value="Query" /><input type="reset" value="Clear Form" />
198
        
199
        </form>
200
             
201
        <a name="browse" />
202
	
203
	<center>
204
          <u><h2>Results</h2></u>
205
        </center>
206
        
207
        <form action="/servlets/marineServlet" method="POST">
208
        <input type="hidden" name="action" value="getdocument"/>
209

    
210
        <table width="100%">
211
        <tr class="rowodd">
212
        <th>&nbsp;</th>
213
        <th><xsl:text>Title</xsl:text></th>
214
        <th><xsl:text>Resource Name</xsl:text></th>
215
        </tr>
216

    
217
        <xsl:for-each select="resultset/document">
218
          <tr valign="top">
219
            <xsl:attribute name="class">
220
              <xsl:choose>
221
                <xsl:when test="position() mod 2 = 1">rowwhite</xsl:when>
222
                <xsl:when test="position() mod 2 = 0">rowlight</xsl:when>
223
              </xsl:choose>
224
            </xsl:attribute>
225

    
226
          <td>
227
              <input border="0" type="image">
228
                <xsl:attribute name="src">
229
                  <xsl:choose>
230
                    <xsl:when test="position() 
231
                         mod 2 = 1">/xmltodb/images/bttns-white.png</xsl:when>
232
                    <xsl:when test="position() 
233
                         mod 2 = 0">/xmltodb/images/bttns-blue.jpg</xsl:when>
234
                  </xsl:choose>
235
                </xsl:attribute>
236
                <xsl:attribute name="name">
237
                  <xsl:value-of select="./docid"/>
238
                </xsl:attribute>
239
              </input>
240
          </td>
241
          <td><xsl:value-of select="./doctitle"/>
242
              <xsl:text>&nbsp;</xsl:text>
243
         </td>
244
          <td>
245
              <xsl:value-of select="./docname"/> 
246
              <xsl:text> </xsl:text>
247
          </td>
248
          </tr>
249
        </xsl:for-each>
250
        </table>
251
        </form>
252

    
253
        <h3><a href="#top">New Query</a></h3>
254
        
255
      </body>
256
    </html>
257
  </xsl:template>
258

    
259
</xsl:stylesheet>
(3-3/12)