1 |
1929
|
brooke
|
<?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:param name="qformat">default</xsl:param>
|
34 |
3763
|
leinfelder
|
<xsl:param name="contextURL"/>
|
35 |
|
|
<xsl:param name="cgi-prefix"/>
|
36 |
1929
|
brooke
|
<xsl:template match="/">
|
37 |
|
|
<html>
|
38 |
|
|
<head>
|
39 |
|
|
<link rel="stylesheet" type="text/css"
|
40 |
3763
|
leinfelder
|
href="{$contextURL}/style/skins/{$qformat}/{$qformat}.css" />
|
41 |
1929
|
brooke
|
</head>
|
42 |
|
|
|
43 |
|
|
<body>
|
44 |
|
|
<table width="100%">
|
45 |
|
|
<tr>
|
46 |
3688
|
barteau
|
<td rowspan="2"><img src="./images/KNBLogo.gif"/></td>
|
47 |
1929
|
brooke
|
<td colspan="7"><div class="title">Biocomplexity Data Search</div>
|
48 |
|
|
</td>
|
49 |
|
|
</tr>
|
50 |
|
|
<tr>
|
51 |
3688
|
barteau
|
<td><a href="." class="toollink"> KNB </a></td>
|
52 |
|
|
<td><a href="./data.html" class="toollink">
|
53 |
1929
|
brooke
|
Data </a></td>
|
54 |
3688
|
barteau
|
<td><a href="./people.html" class="toollink">
|
55 |
1929
|
brooke
|
People </a></td>
|
56 |
3688
|
barteau
|
<td><a href="./informatics" class="toollink">
|
57 |
1929
|
brooke
|
Informatics </a></td>
|
58 |
3688
|
barteau
|
<td><a href="./biodiversity" class="toollink">
|
59 |
1929
|
brooke
|
Biodiversity </a></td>
|
60 |
3688
|
barteau
|
<td><a href="./education" class="toollink">
|
61 |
1929
|
brooke
|
Education </a></td>
|
62 |
3688
|
barteau
|
<td><a href="./software" class="toollink">
|
63 |
1929
|
brooke
|
Software </a></td>
|
64 |
|
|
</tr>
|
65 |
|
|
<tr>
|
66 |
|
|
<td align="right" valign="top" colspan="7">
|
67 |
3763
|
leinfelder
|
<form action="{$contextURL}/metacat" method="POST">
|
68 |
1929
|
brooke
|
Data Search: <input type="text" name="anyfield" size="10" />
|
69 |
|
|
<input type="hidden" name="action" value="query" />
|
70 |
|
|
<input type="hidden" name="qformat" value="knb" />
|
71 |
|
|
<input type="hidden" name="operator" value="UNION" />
|
72 |
|
|
|
73 |
|
|
<input type="hidden" name="returnfield"
|
74 |
|
|
value="creator/individualName/surName" />
|
75 |
|
|
<input type="hidden" name="returnfield"
|
76 |
|
|
value="creator/organizationName" />
|
77 |
|
|
<input type="hidden" name="returnfield"
|
78 |
|
|
value="originator/individualName/surName" />
|
79 |
|
|
<input type="hidden" name="returnfield"
|
80 |
|
|
value="originator/individualName/givenName" />
|
81 |
|
|
<input type="hidden" name="returnfield"
|
82 |
|
|
value="originator/organizationName" />
|
83 |
|
|
<input type="hidden" name="returnfield"
|
84 |
|
|
value="dataset/title" />
|
85 |
|
|
<input type="hidden" name="returnfield"
|
86 |
|
|
value="keyword" />
|
87 |
|
|
<input type="hidden" name="returndoctype"
|
88 |
|
|
value="eml://ecoinformatics.org/eml-2.0.0" />
|
89 |
|
|
<input type="hidden" name="returndoctype"
|
90 |
2226
|
sgarg
|
value="eml://ecoinformatics.org/eml-2.0.1" />
|
91 |
|
|
<input type="hidden" name="returndoctype"
|
92 |
4505
|
daigle
|
value="eml://ecoinformatics.org/eml-2.1.0" />
|
93 |
|
|
<input type="hidden" name="returndoctype"
|
94 |
1929
|
brooke
|
value="-//NCEAS//eml-dataset-2.0//EN" />
|
95 |
|
|
<input type="hidden" name="returndoctype"
|
96 |
|
|
value="-//NCEAS//resource//EN" />
|
97 |
|
|
<input type="hidden" name="returndoctype"
|
98 |
|
|
value="-//NCEAS//eml-dataset//EN" />
|
99 |
|
|
<input type="hidden" name="returndoctype"
|
100 |
|
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta6//EN" />
|
101 |
|
|
<input type="hidden" name="returndoctype"
|
102 |
|
|
value="-//ecoinformatics.org//eml-dataset-2.0.0beta4//EN" />
|
103 |
|
|
</form>
|
104 |
|
|
</td>
|
105 |
|
|
</tr>
|
106 |
|
|
</table>
|
107 |
|
|
|
108 |
|
|
<p><xsl:number value="count(resultset/document)" /> documents found.</p>
|
109 |
|
|
<!-- This tests to see if there are returned documents,
|
110 |
|
|
if there are not then don't show the query results -->
|
111 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
112 |
|
|
<table border="0" cellpadding="2" cellspacing="2">
|
113 |
|
|
<tr valign="top">
|
114 |
|
|
<td width="33%">
|
115 |
|
|
<h3>Browse data sets by keyword:</h3>
|
116 |
|
|
<ul>
|
117 |
|
|
<xsl:apply-templates select="//param[@name='keyword' and not(. = preceding::param) and not(normalize-space(.) = '')]">
|
118 |
|
|
<xsl:sort select="."/>
|
119 |
|
|
</xsl:apply-templates>
|
120 |
|
|
</ul>
|
121 |
|
|
</td>
|
122 |
|
|
<td width="33%">
|
123 |
|
|
<h3>Browse data sets by creator:</h3>
|
124 |
|
|
<ul>
|
125 |
|
|
<xsl:apply-templates select="//param[@name='surName' and not(. = preceding::param) and not(normalize-space(.) = '')]">
|
126 |
|
|
<xsl:sort select="."/>
|
127 |
|
|
</xsl:apply-templates>
|
128 |
|
|
</ul>
|
129 |
|
|
</td>
|
130 |
|
|
<td width="33%">
|
131 |
|
|
<h3>Browse data sets by organization:</h3>
|
132 |
|
|
<ul>
|
133 |
|
|
<xsl:apply-templates select="//param[@name='organizationName' and not(. = preceding::param) and not(normalize-space(.) = '')]">
|
134 |
|
|
<xsl:sort select="."/>
|
135 |
|
|
</xsl:apply-templates>
|
136 |
|
|
</ul>
|
137 |
|
|
</td>
|
138 |
|
|
</tr>
|
139 |
|
|
</table>
|
140 |
|
|
</xsl:if>
|
141 |
|
|
</body>
|
142 |
|
|
</html>
|
143 |
|
|
</xsl:template>
|
144 |
|
|
|
145 |
|
|
<xsl:template match="param[@name='keyword']">
|
146 |
|
|
<li>
|
147 |
|
|
<a>
|
148 |
4505
|
daigle
|
<xsl:attribute name="href">{$contextURL}/metacat?action=query&operator=INTERSECT&qformat=knb&returndoctype=eml://ecoinformatics.org/eml-2.1.0&returndoctype=eml://ecoinformatics.org/eml-2.0.1&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>
|
149 |
1929
|
brooke
|
<xsl:value-of select="."/>
|
150 |
|
|
</a> (<xsl:value-of select="count(//param[.=current()])"/>)
|
151 |
|
|
</li>
|
152 |
|
|
</xsl:template>
|
153 |
|
|
|
154 |
|
|
<xsl:template match="param[@name='surName']">
|
155 |
|
|
<li>
|
156 |
|
|
<a>
|
157 |
4505
|
daigle
|
<xsl:attribute name="href">{$contextURL}/metacat?action=query&operator=INTERSECT&qformat=knb&returndoctype=eml://ecoinformatics.org/eml-2.1.0&returndoctype=eml://ecoinformatics.org/eml-2.0.0&returndoctype=eml://ecoinformatics.org/eml-2.0.1&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>
|
158 |
1929
|
brooke
|
<xsl:value-of select="."/>
|
159 |
|
|
</a> (<xsl:value-of select="count(//param[.=current()])"/>)
|
160 |
|
|
</li>
|
161 |
|
|
</xsl:template>
|
162 |
|
|
|
163 |
|
|
<xsl:template match="param[@name='organizationName']">
|
164 |
|
|
<li>
|
165 |
|
|
<a>
|
166 |
4505
|
daigle
|
<xsl:attribute name="href">{$contextURL}/metacat?action=query&operator=INTERSECT&qformat=knb&returndoctype=eml://ecoinformatics.org/eml-2.1.0&returndoctype=eml://ecoinformatics.org/eml-2.0.0&returndoctype=eml://ecoinformatics.org/eml-2.0.1&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>
|
167 |
1929
|
brooke
|
<xsl:value-of select="."/>
|
168 |
|
|
</a> (<xsl:value-of select="count(//param[.=current()])"/>)
|
169 |
|
|
</li>
|
170 |
|
|
</xsl:template>
|
171 |
|
|
|
172 |
|
|
</xsl:stylesheet>
|