1 |
553
|
tao
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
|
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Matt Jones, CHad Berkley
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
|
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
*
|
9 |
|
|
* '$Author$'
|
10 |
|
|
* '$Date$'
|
11 |
|
|
* '$Revision$'
|
12 |
|
|
*
|
13 |
|
|
* This program is free software; you can redistribute it and/or modify
|
14 |
|
|
* it under the terms of the GNU General Public License as published by
|
15 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
16 |
|
|
* (at your option) any later version.
|
17 |
|
|
*
|
18 |
|
|
* This program is distributed in the hope that it will be useful,
|
19 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
|
|
* GNU General Public License for more details.
|
22 |
|
|
*
|
23 |
|
|
* You should have received a copy of the GNU General Public License
|
24 |
|
|
* along with this program; if not, write to the Free Software
|
25 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26 |
|
|
*
|
27 |
|
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
28 |
|
|
* convert an XML file showing the resultset of a query
|
29 |
|
|
* into an HTML format suitable for rendering with modern web browsers.
|
30 |
|
|
-->
|
31 |
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
32 |
|
|
<xsl:output method="html"/>
|
33 |
|
|
<xsl:template match="/">
|
34 |
|
|
<html>
|
35 |
|
|
<head>
|
36 |
|
|
<link rel="stylesheet" type="text/css"
|
37 |
|
|
href="@style-path@/@name@.css" />
|
38 |
|
|
<script language="JavaScript">
|
39 |
|
|
<![CDATA[
|
40 |
|
|
function submitform(action,form_ref) {
|
41 |
|
|
form_ref.action.value=action;
|
42 |
|
|
form_ref.abstractpath.value="";
|
43 |
|
|
form_ref.qformat.value="@name@";
|
44 |
|
|
form_ref.submit();
|
45 |
|
|
}
|
46 |
|
|
function submitform1(action, abstractpath, form_ref) {
|
47 |
|
|
form_ref.action.value=action;
|
48 |
|
|
form_ref.abstractpath.value=abstractpath;
|
49 |
|
|
form_ref.qformat.value="";
|
50 |
|
|
form_ref.submit();
|
51 |
|
|
}
|
52 |
|
|
function submitform2(action, qformat, form_ref) {
|
53 |
|
|
form_ref.action.value=action;
|
54 |
|
|
form_ref.qformat.value=qformat;
|
55 |
|
|
form_ref.abstractpath.value="";
|
56 |
|
|
form_ref.submit();
|
57 |
|
|
}
|
58 |
|
|
]]>
|
59 |
|
|
</script>
|
60 |
|
|
</head>
|
61 |
|
|
|
62 |
|
|
<body>
|
63 |
|
|
<div class="spacing" align="center">
|
64 |
|
|
<table cellspacing="0" width="100%" border="0">
|
65 |
|
|
<tr>
|
66 |
|
|
<td class="header-title">
|
67 |
|
|
<div class="header-title">
|
68 |
|
|
@header-title@
|
69 |
|
|
</div>
|
70 |
|
|
<div class="header-subtitle">
|
71 |
|
|
@header-subtitle@
|
72 |
|
|
</div>
|
73 |
|
|
</td>
|
74 |
|
|
<td class="header-image" rowspan="1">
|
75 |
|
|
<div class="header-image">
|
76 |
|
|
<img class="header" src="@html-path@/@header-image@"
|
77 |
|
|
alt="@header-image-alt@"
|
78 |
|
|
border="0" />
|
79 |
|
|
</div>
|
80 |
|
|
</td>
|
81 |
|
|
</tr>
|
82 |
|
|
<tr>
|
83 |
|
|
<td class="header-menu" colspan="2">
|
84 |
|
|
<div class="header-menu">
|
85 |
|
|
@header-menu@
|
86 |
|
|
</div>
|
87 |
|
|
</td>
|
88 |
|
|
</tr>
|
89 |
|
|
<tr>
|
90 |
|
|
<td class="header-submenu" colspan="2">
|
91 |
|
|
<div class="header-submenu">
|
92 |
|
|
  <!-- that is XML compliant -->
|
93 |
|
|
</div>
|
94 |
|
|
</td>
|
95 |
|
|
</tr>
|
96 |
|
|
</table>
|
97 |
|
|
</div>
|
98 |
|
|
|
99 |
|
|
<table width="760" border="0" cellspacing="0" cellpadding="0">
|
100 |
|
|
<tr><td colspan="4"><hr /></td></tr>
|
101 |
|
|
<tr><td colspan="2"><br /><b>View MARINE Datasets</b></td>
|
102 |
|
|
<td colspan="2"><br />
|
103 |
|
|
<form action="@html-path@/servlet/metacat" method="POST">
|
104 |
|
|
<input type="hidden" name="operator" value="INTERSECT" />
|
105 |
|
|
Refine data search:
|
106 |
|
|
<input type="text" name="anyfield" size="14">
|
107 |
|
|
<xsl:attribute name="value">
|
108 |
|
|
<xsl:value-of
|
109 |
|
|
select="resultset/query/pathquery/querygroup/queryterm/value" />
|
110 |
|
|
</xsl:attribute>
|
111 |
|
|
</input>
|
112 |
|
|
<input type="hidden" name="originator/organizationName"
|
113 |
|
|
value="MARINE"/>
|
114 |
|
|
<input type="hidden" name="action" value="query" />
|
115 |
|
|
<input type="hidden" name="qformat" value="@name@" />
|
116 |
|
|
<input type="hidden" name="operator" value="UNION" />
|
117 |
|
|
|
118 |
|
|
<input type="hidden" name="returnfield"
|
119 |
|
|
value="originator/individualName/surName" />
|
120 |
|
|
<input type="hidden" name="returnfield"
|
121 |
|
|
value="originator/individualName/givenName" />
|
122 |
|
|
<input type="hidden" name="returnfield"
|
123 |
|
|
value="originator/organizationName" />
|
124 |
|
|
<input type="hidden" name="returnfield"
|
125 |
|
|
value="title" />
|
126 |
|
|
<input type="hidden" name="returnfield"
|
127 |
|
|
value="keyword" />
|
128 |
|
|
<input type="hidden" name="returndoctype"
|
129 |
|
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
|
130 |
|
|
<input type="hidden" name="returndoctype"
|
131 |
|
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
|
132 |
|
|
<input type="hidden" name="returndoctype"
|
133 |
|
|
value="-//NCEAS//resource//EN" />
|
134 |
|
|
<input type="hidden" name="returndoctype"
|
135 |
|
|
value="-//NCEAS//eml-dataset//EN" />
|
136 |
|
|
</form>
|
137 |
|
|
</td>
|
138 |
|
|
</tr>
|
139 |
|
|
</table>
|
140 |
|
|
|
141 |
|
|
<p><xsl:number value="count(resultset/document)" /> data sets found.</p>
|
142 |
|
|
<!-- This tests to see if there are returned documents,
|
143 |
|
|
if there are not then don't show the query results -->
|
144 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
145 |
|
|
<table width="760">
|
146 |
|
|
<tr>
|
147 |
|
|
<th class="tablehead">Title</th>
|
148 |
|
|
<th class="tablehead">Contacts</th>
|
149 |
|
|
<th class="tablehead">Organization</th>
|
150 |
|
|
<th class="tablehead">Keywords</th>
|
151 |
|
|
</tr>
|
152 |
|
|
|
153 |
|
|
<xsl:for-each select="resultset/document">
|
154 |
|
|
<xsl:sort select="title"/>
|
155 |
|
|
<tr valign="top">
|
156 |
|
|
<xsl:attribute name="class">
|
157 |
|
|
<xsl:choose>
|
158 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
159 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
160 |
|
|
</xsl:choose>
|
161 |
|
|
</xsl:attribute>
|
162 |
|
|
|
163 |
|
|
<td>
|
164 |
|
|
<xsl:value-of select="./param[@name='title']"/>
|
165 |
|
|
<br/>
|
166 |
|
|
<p>
|
167 |
|
|
|
168 |
|
|
<form action="@html-path@/servlet/metacat" method="POST">
|
169 |
|
|
<xsl:attribute name="name">
|
170 |
|
|
<xsl:value-of select="translate(./docid,'.','')"/>
|
171 |
|
|
</xsl:attribute>
|
172 |
|
|
<!-- abstractpath tells the servlet where the abstract is in
|
173 |
|
|
the document. The % sign is used because the path could
|
174 |
|
|
be resource/literature or resource/dataset. -->
|
175 |
|
|
<!-- specified down IN javascript:submitform1('read',abstractpath,docid) -->
|
176 |
|
|
<input type="hidden" name="abstractpath" />
|
177 |
|
|
<!-- specified down IN javascript:submitform2('read','zip',docid) -->
|
178 |
|
|
<input type="hidden" name="qformat" value="@name@"/>
|
179 |
|
|
<input type="hidden" name="action" value="read"/>
|
180 |
|
|
<input type="hidden" name="docid">
|
181 |
|
|
<xsl:attribute name="value">
|
182 |
|
|
<xsl:value-of select="./docid"/>
|
183 |
|
|
</xsl:attribute>
|
184 |
|
|
</input>
|
185 |
|
|
<xsl:for-each select="./relation">
|
186 |
|
|
<input type="hidden" name="docid">
|
187 |
|
|
<xsl:attribute name="value" >
|
188 |
|
|
<xsl:value-of select="./relationdoc" />
|
189 |
|
|
</xsl:attribute>
|
190 |
|
|
</input>
|
191 |
|
|
</xsl:for-each>
|
192 |
|
|
|
193 |
|
|
<a>
|
194 |
|
|
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '.', '')"/>)</xsl:attribute>
|
195 |
|
|
Detailed Dataset Information
|
196 |
|
|
</a><br />
|
197 |
|
|
</form>
|
198 |
|
|
</p>
|
199 |
|
|
</td>
|
200 |
|
|
<td>
|
201 |
|
|
<xsl:for-each select="./param[@name='originator/individualName/surName']" >
|
202 |
|
|
<xsl:value-of select="." />
|
203 |
|
|
<br/>
|
204 |
|
|
|
205 |
|
|
</xsl:for-each>
|
206 |
|
|
<xsl:text> </xsl:text>
|
207 |
|
|
</td>
|
208 |
|
|
<td>
|
209 |
|
|
<xsl:value-of select=
|
210 |
|
|
"./param[@name='originator/organizationName']"/>
|
211 |
|
|
<xsl:text> </xsl:text>
|
212 |
|
|
</td>
|
213 |
|
|
|
214 |
|
|
<td>
|
215 |
|
|
<xsl:for-each
|
216 |
|
|
select="./param[@name='keyword']">
|
217 |
|
|
<xsl:value-of select="." />
|
218 |
|
|
<br/>
|
219 |
|
|
</xsl:for-each>
|
220 |
|
|
<xsl:text> </xsl:text>
|
221 |
|
|
</td>
|
222 |
|
|
</tr>
|
223 |
|
|
|
224 |
|
|
</xsl:for-each>
|
225 |
|
|
</table>
|
226 |
|
|
|
227 |
|
|
</xsl:if>
|
228 |
|
|
</body>
|
229 |
|
|
</html>
|
230 |
|
|
</xsl:template>
|
231 |
|
|
|
232 |
|
|
</xsl:stylesheet>
|