1 |
51
|
jones
|
<?xml version="1.0"?>
|
2 |
|
|
<!--
|
3 |
666
|
jones
|
* '$RCSfile$'
|
4 |
|
|
* Authors: Matt Jones, CHad Berkley
|
5 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
6 |
51
|
jones
|
* National Center for Ecological Analysis and Synthesis
|
7 |
|
|
* For Details: http://www.nceas.ucsb.edu/
|
8 |
|
|
*
|
9 |
666
|
jones
|
* '$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 |
51
|
jones
|
* 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 |
505
|
jones
|
<link rel="stylesheet" type="text/css"
|
37 |
827
|
jones
|
href="@style-path@/default.css" />
|
38 |
505
|
jones
|
<script language="JavaScript">
|
39 |
|
|
<![CDATA[
|
40 |
737
|
bojilova
|
function submitform(action,form_ref) {
|
41 |
|
|
form_ref.action.value=action;
|
42 |
|
|
form_ref.abstractpath.value="";
|
43 |
833
|
jones
|
form_ref.qformat.value="knb";
|
44 |
505
|
jones
|
form_ref.submit();
|
45 |
|
|
}
|
46 |
737
|
bojilova
|
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 |
505
|
jones
|
]]>
|
59 |
|
|
</script>
|
60 |
51
|
jones
|
</head>
|
61 |
505
|
jones
|
|
62 |
|
|
<body>
|
63 |
|
|
<table width="100%">
|
64 |
506
|
jones
|
<tr>
|
65 |
591
|
berkley
|
<td rowspan="2"><img src="@web-base-url@/images/KNBLogo.gif"/></td>
|
66 |
506
|
jones
|
<td colspan="7"><div class="title">Biocomplexity Data Search</div>
|
67 |
|
|
</td>
|
68 |
|
|
</tr>
|
69 |
|
|
<tr>
|
70 |
|
|
<td><a href="@web-base-url@" class="toollink"> KNB </a></td>
|
71 |
|
|
<td><a href="@web-base-url@/data.html" class="toollink">
|
72 |
|
|
Data </a></td>
|
73 |
|
|
<td><a href="@web-base-url@/people.html" class="toollink">
|
74 |
|
|
People </a></td>
|
75 |
|
|
<td><a href="@web-base-url@/informatics" class="toollink">
|
76 |
|
|
Informatics </a></td>
|
77 |
|
|
<td><a href="@web-base-url@/biodiversity" class="toollink">
|
78 |
|
|
Biodiversity </a></td>
|
79 |
|
|
<td><a href="@web-base-url@/education" class="toollink">
|
80 |
|
|
Education </a></td>
|
81 |
|
|
<td><a href="@web-base-url@/software" class="toollink">
|
82 |
|
|
Software </a></td>
|
83 |
|
|
</tr>
|
84 |
505
|
jones
|
<tr>
|
85 |
506
|
jones
|
<td align="right" valign="top" colspan="7">
|
86 |
505
|
jones
|
<form action="@html-path@/servlet/metacat" method="POST">
|
87 |
|
|
Data Search: <input type="text" name="anyfield" size="10" />
|
88 |
|
|
<input type="hidden" name="action" value="query" />
|
89 |
833
|
jones
|
<input type="hidden" name="qformat" value="knb" />
|
90 |
505
|
jones
|
<input type="hidden" name="operator" value="UNION" />
|
91 |
1525
|
tao
|
|
92 |
|
|
<input type="hidden" name="returnfield"
|
93 |
|
|
value="creator/individualName/surName" />
|
94 |
|
|
<input type="hidden" name="returnfield"
|
95 |
|
|
value="creator/organizationName" />
|
96 |
505
|
jones
|
<input type="hidden" name="returnfield"
|
97 |
813
|
jones
|
value="originator/individualName/surName" />
|
98 |
505
|
jones
|
<input type="hidden" name="returnfield"
|
99 |
813
|
jones
|
value="originator/individualName/givenName" />
|
100 |
505
|
jones
|
<input type="hidden" name="returnfield"
|
101 |
813
|
jones
|
value="originator/organizationName" />
|
102 |
505
|
jones
|
<input type="hidden" name="returnfield"
|
103 |
1698
|
tao
|
value="dataset/title" />
|
104 |
505
|
jones
|
<input type="hidden" name="returnfield"
|
105 |
813
|
jones
|
value="keyword" />
|
106 |
814
|
jones
|
<input type="hidden" name="returndoctype"
|
107 |
1525
|
tao
|
value="eml://ecoinformatics.org/eml-2.0.0" />
|
108 |
|
|
<input type="hidden" name="returndoctype"
|
109 |
813
|
jones
|
value="-//NCEAS//eml-dataset-2.0//EN" />
|
110 |
814
|
jones
|
<input type="hidden" name="returndoctype"
|
111 |
505
|
jones
|
value="-//NCEAS//resource//EN" />
|
112 |
814
|
jones
|
<input type="hidden" name="returndoctype"
|
113 |
505
|
jones
|
value="-//NCEAS//eml-dataset//EN" />
|
114 |
857
|
berkley
|
<input type="hidden" name="returndoctype"
|
115 |
892
|
berkley
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
|
116 |
916
|
berkley
|
<input type="hidden" name="returndoctype"
|
117 |
|
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
|
118 |
505
|
jones
|
</form>
|
119 |
|
|
</td>
|
120 |
|
|
</tr>
|
121 |
|
|
</table>
|
122 |
51
|
jones
|
|
123 |
505
|
jones
|
<p><xsl:number value="count(resultset/document)" /> documents found.</p>
|
124 |
|
|
<!-- This tests to see if there are returned documents,
|
125 |
|
|
if there are not then don't show the query results -->
|
126 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
127 |
|
|
<center>
|
128 |
|
|
<u><h2>Results</h2></u>
|
129 |
|
|
</center>
|
130 |
|
|
|
131 |
|
|
<table width="100%">
|
132 |
|
|
<tr>
|
133 |
506
|
jones
|
<th class="tablehead">Title</th>
|
134 |
833
|
jones
|
<!-- <th class="tablehead">Action</th> -->
|
135 |
|
|
<!-- <th class="tablehead">Related Documents</th> -->
|
136 |
506
|
jones
|
<th class="tablehead">Contacts</th>
|
137 |
|
|
<th class="tablehead">Organization</th>
|
138 |
|
|
<th class="tablehead">Keywords</th>
|
139 |
505
|
jones
|
</tr>
|
140 |
|
|
|
141 |
|
|
<xsl:for-each select="resultset/document">
|
142 |
813
|
jones
|
<xsl:sort select="title"/>
|
143 |
505
|
jones
|
<tr valign="top">
|
144 |
|
|
<xsl:attribute name="class">
|
145 |
|
|
<xsl:choose>
|
146 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
147 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
148 |
|
|
</xsl:choose>
|
149 |
|
|
</xsl:attribute>
|
150 |
85
|
jones
|
|
151 |
1525
|
tao
|
|
152 |
505
|
jones
|
<td>
|
153 |
566
|
jones
|
<form action="@html-path@/servlet/metacat" method="POST">
|
154 |
505
|
jones
|
<xsl:attribute name="name">
|
155 |
566
|
jones
|
<xsl:value-of select="translate(./docid,'.','')"/>
|
156 |
505
|
jones
|
</xsl:attribute>
|
157 |
|
|
<!-- abstractpath tells the servlet where the abstract is in
|
158 |
|
|
the document. The % sign is used because the path could
|
159 |
|
|
be resource/literature or resource/dataset. -->
|
160 |
737
|
bojilova
|
<!-- specified down IN javascript:submitform1('read',abstractpath,docid) -->
|
161 |
|
|
<input type="hidden" name="abstractpath" />
|
162 |
|
|
<!-- specified down IN javascript:submitform2('read','zip',docid) -->
|
163 |
|
|
<input type="hidden" name="qformat" />
|
164 |
566
|
jones
|
<input type="hidden" name="action" value="read"/>
|
165 |
505
|
jones
|
<input type="hidden" name="docid">
|
166 |
|
|
<xsl:attribute name="value">
|
167 |
|
|
<xsl:value-of select="./docid"/>
|
168 |
|
|
</xsl:attribute>
|
169 |
|
|
</input>
|
170 |
|
|
<xsl:for-each select="./relation">
|
171 |
732
|
bojilova
|
<input type="hidden" name="docid">
|
172 |
505
|
jones
|
<xsl:attribute name="value" >
|
173 |
|
|
<xsl:value-of select="./relationdoc" />
|
174 |
|
|
</xsl:attribute>
|
175 |
|
|
</input>
|
176 |
|
|
</xsl:for-each>
|
177 |
85
|
jones
|
|
178 |
505
|
jones
|
<a>
|
179 |
566
|
jones
|
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '.', '')"/>)</xsl:attribute>
|
180 |
1711
|
tao
|
<xsl:choose>
|
181 |
|
|
<xsl:when test="./param[@name='dataset/title']!=''">
|
182 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
183 |
|
|
</xsl:when>
|
184 |
|
|
<xsl:otherwise>
|
185 |
|
|
<xsl:value-of select="./param[@name='citation/title']"/>
|
186 |
|
|
<xsl:value-of select="./param[@name='software/title']"/>
|
187 |
|
|
<xsl:value-of select="./param[@name='protocol/title']"/>
|
188 |
|
|
</xsl:otherwise>
|
189 |
|
|
</xsl:choose>
|
190 |
505
|
jones
|
</a><br />
|
191 |
833
|
jones
|
<br/>
|
192 |
|
|
<p><pre>Document ID: <xsl:value-of select="./docid"/></pre></p>
|
193 |
1525
|
tao
|
|
194 |
505
|
jones
|
</form>
|
195 |
|
|
</td>
|
196 |
1525
|
tao
|
|
197 |
505
|
jones
|
<td>
|
198 |
813
|
jones
|
<xsl:for-each select="./param[@name='originator/individualName/surName']" >
|
199 |
505
|
jones
|
<xsl:value-of select="." />
|
200 |
|
|
<br/>
|
201 |
1525
|
tao
|
</xsl:for-each>
|
202 |
|
|
<xsl:for-each select="./param[@name='creator/individualName/surName']" >
|
203 |
|
|
<xsl:value-of select="." />
|
204 |
|
|
<br/>
|
205 |
|
|
</xsl:for-each>
|
206 |
|
|
|
207 |
833
|
jones
|
<xsl:text> </xsl:text>
|
208 |
505
|
jones
|
</td>
|
209 |
|
|
<td>
|
210 |
1525
|
tao
|
<xsl:value-of select="./param[@name='originator/organizationName']" />
|
211 |
|
|
<xsl:value-of select="./param[@name='creator/organizationName']" />
|
212 |
833
|
jones
|
<xsl:text> </xsl:text>
|
213 |
505
|
jones
|
</td>
|
214 |
|
|
|
215 |
|
|
<td>
|
216 |
|
|
<xsl:for-each
|
217 |
813
|
jones
|
select="./param[@name='keyword']">
|
218 |
505
|
jones
|
<xsl:value-of select="." />
|
219 |
|
|
<br/>
|
220 |
|
|
</xsl:for-each>
|
221 |
833
|
jones
|
<xsl:text> </xsl:text>
|
222 |
505
|
jones
|
</td>
|
223 |
|
|
</tr>
|
224 |
51
|
jones
|
|
225 |
1525
|
tao
|
|
226 |
505
|
jones
|
</xsl:for-each>
|
227 |
|
|
</table>
|
228 |
51
|
jones
|
|
229 |
505
|
jones
|
</xsl:if>
|
230 |
51
|
jones
|
</body>
|
231 |
|
|
</html>
|
232 |
|
|
</xsl:template>
|
233 |
|
|
|
234 |
|
|
</xsl:stylesheet>
|