|
1 |
<?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@/default.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="knb";
|
|
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 |
<table width="100%">
|
|
64 |
<tr>
|
|
65 |
<td rowspan="2"><img src="@web-base-url@/images/KNBLogo.gif"/></td>
|
|
66 |
<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 |
<tr>
|
|
85 |
<td align="right" valign="top" colspan="7">
|
|
86 |
<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 |
<input type="hidden" name="qformat" value="knb" />
|
|
90 |
<input type="hidden" name="operator" value="UNION" />
|
|
91 |
|
|
92 |
<input type="hidden" name="returnfield"
|
|
93 |
value="creator/individualName/surName" />
|
|
94 |
<input type="hidden" name="returnfield"
|
|
95 |
value="creator/organizationName" />
|
|
96 |
<input type="hidden" name="returnfield"
|
|
97 |
value="originator/individualName/surName" />
|
|
98 |
<input type="hidden" name="returnfield"
|
|
99 |
value="originator/individualName/givenName" />
|
|
100 |
<input type="hidden" name="returnfield"
|
|
101 |
value="originator/organizationName" />
|
|
102 |
<input type="hidden" name="returnfield"
|
|
103 |
value="dataset/title" />
|
|
104 |
<input type="hidden" name="returnfield"
|
|
105 |
value="keyword" />
|
|
106 |
<input type="hidden" name="returndoctype"
|
|
107 |
value="eml://ecoinformatics.org/eml-2.0.0" />
|
|
108 |
<input type="hidden" name="returndoctype"
|
|
109 |
value="-//NCEAS//eml-dataset-2.0//EN" />
|
|
110 |
<input type="hidden" name="returndoctype"
|
|
111 |
value="-//NCEAS//resource//EN" />
|
|
112 |
<input type="hidden" name="returndoctype"
|
|
113 |
value="-//NCEAS//eml-dataset//EN" />
|
|
114 |
<input type="hidden" name="returndoctype"
|
|
115 |
value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
|
|
116 |
<input type="hidden" name="returndoctype"
|
|
117 |
value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
|
|
118 |
</form>
|
|
119 |
</td>
|
|
120 |
</tr>
|
|
121 |
</table>
|
|
122 |
|
|
123 |
<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 |
<table border="0" cellpadding="2" cellspacing="2">
|
|
128 |
<tr valign="top">
|
|
129 |
<td width="33%">
|
|
130 |
<h3>Browse data sets by keyword:</h3>
|
|
131 |
<ul>
|
|
132 |
<xsl:apply-templates select="//param[@name='keyword' and not(. = preceding::param) and not(normalize-space(.) = '')]">
|
|
133 |
<xsl:sort select="."/>
|
|
134 |
</xsl:apply-templates>
|
|
135 |
</ul>
|
|
136 |
</td>
|
|
137 |
<td width="33%">
|
|
138 |
<h3>Browse data sets by creator:</h3>
|
|
139 |
<ul>
|
|
140 |
<xsl:apply-templates select="//param[@name='surName' and not(. = preceding::param) and not(normalize-space(.) = '')]">
|
|
141 |
<xsl:sort select="."/>
|
|
142 |
</xsl:apply-templates>
|
|
143 |
</ul>
|
|
144 |
</td>
|
|
145 |
<td width="33%">
|
|
146 |
<h3>Browse data sets by organization:</h3>
|
|
147 |
<ul>
|
|
148 |
<xsl:apply-templates select="//param[@name='organizationName' and not(. = preceding::param) and not(normalize-space(.) = '')]">
|
|
149 |
<xsl:sort select="."/>
|
|
150 |
</xsl:apply-templates>
|
|
151 |
</ul>
|
|
152 |
</td>
|
|
153 |
</tr>
|
|
154 |
</table>
|
|
155 |
</xsl:if>
|
|
156 |
</body>
|
|
157 |
</html>
|
|
158 |
</xsl:template>
|
|
159 |
|
|
160 |
<xsl:template match="param[@name='keyword']">
|
|
161 |
<li>
|
|
162 |
<a>
|
|
163 |
<xsl:attribute name="href">@servlet-path@?action=query&operator=INTERSECT&qformat=knb&returndoctype=eml://ecoinformatics.org/eml-2.0.0&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&returnfield=dataset/title&returnfield=citation/title&returnfield=software/title&returnfield=protocol/title&returnfield=keyword&returnfield=originator/individualName/surName&returnfield=creator/individualName/surName&returnfield=originator/organizationName&returnfield=creator/organizationName&keyword=<xsl:value-of select="."/></xsl:attribute>
|
|
164 |
<xsl:value-of select="."/>
|
|
165 |
</a> (<xsl:value-of select="count(//param[.=current()])"/>)
|
|
166 |
</li>
|
|
167 |
</xsl:template>
|
|
168 |
|
|
169 |
<xsl:template match="param[@name='surName']">
|
|
170 |
<li>
|
|
171 |
<a>
|
|
172 |
<xsl:attribute name="href">@servlet-path@?action=query&operator=INTERSECT&qformat=knb&returndoctype=eml://ecoinformatics.org/eml-2.0.0&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&returnfield=dataset/title&returnfield=citation/title&returnfield=software/title&returnfield=protocol/title&returnfield=keyword&returnfield=originator/individualName/surName&returnfield=creator/individualName/surName&returnfield=originator/organizationName&returnfield=creator/organizationName&surName=<xsl:value-of select="."/></xsl:attribute>
|
|
173 |
<xsl:value-of select="."/>
|
|
174 |
</a> (<xsl:value-of select="count(//param[.=current()])"/>)
|
|
175 |
</li>
|
|
176 |
</xsl:template>
|
|
177 |
|
|
178 |
<xsl:template match="param[@name='organizationName']">
|
|
179 |
<li>
|
|
180 |
<a>
|
|
181 |
<xsl:attribute name="href">@servlet-path@?action=query&operator=INTERSECT&qformat=knb&returndoctype=eml://ecoinformatics.org/eml-2.0.0&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN&returndoctype=-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN&returnfield=dataset/title&returnfield=citation/title&returnfield=software/title&returnfield=protocol/title&returnfield=keyword&returnfield=originator/individualName/surName&returnfield=creator/individualName/surName&returnfield=originator/organizationName&returnfield=creator/organizationName&organizationName=<xsl:value-of select="."/></xsl:attribute>
|
|
182 |
<xsl:value-of select="."/>
|
|
183 |
</a> (<xsl:value-of select="count(//param[.=current()])"/>)
|
|
184 |
</li>
|
|
185 |
</xsl:template>
|
|
186 |
|
|
187 |
</xsl:stylesheet>
|
0 |
188 |
|
Added a browse stylesheet that indexes data sets by keyword, creator, and
organization, all on one page. Use style=browse to access.
Some minor formatting improvements to keyword index, and change style
setting to style=keywords to access.