1 |
5385
|
leinfelder
|
<?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 |
5536
|
leinfelder
|
<xsl:stylesheet
|
32 |
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
33 |
|
|
xmlns:sms="http://ecoinformatics.org/sms/annotation.0.9"
|
34 |
5385
|
leinfelder
|
version="1.0">
|
35 |
5541
|
leinfelder
|
<xsl:import href="annotation-root.xsl"/>
|
36 |
5385
|
leinfelder
|
|
37 |
|
|
<xsl:output method="html" />
|
38 |
|
|
<xsl:param name="sessid" />
|
39 |
|
|
<xsl:param name="qformat">semtools</xsl:param>
|
40 |
|
|
<xsl:param name="enableediting">false</xsl:param>
|
41 |
|
|
<xsl:param name="contextURL"/>
|
42 |
5743
|
leinfelder
|
|
43 |
|
|
<xsl:param name="labelWidth">120</xsl:param>
|
44 |
|
|
|
45 |
5385
|
leinfelder
|
<xsl:template match="/">
|
46 |
|
|
<html>
|
47 |
|
|
<head>
|
48 |
|
|
<title>Search Results</title>
|
49 |
|
|
<link rel="stylesheet" type="text/css"
|
50 |
|
|
href="/knb/style/skins/{$qformat}/{$qformat}.css" />
|
51 |
|
|
<script language="Javascript" type="text/JavaScript"
|
52 |
|
|
src="/knb/style/skins/{$qformat}/{$qformat}.js" />
|
53 |
|
|
<script language="Javascript" type="text/JavaScript"
|
54 |
|
|
src="/knb/style/common/branding.js" />
|
55 |
|
|
</head>
|
56 |
|
|
|
57 |
5574
|
leinfelder
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
58 |
5385
|
leinfelder
|
<script language="JavaScript">
|
59 |
|
|
insertTemplateOpening('<xsl:value-of select="$contextURL" />'); insertSearchBox('<xsl:value-of select="$contextURL" />');
|
60 |
|
|
</script>
|
61 |
5574
|
leinfelder
|
|
62 |
|
|
<div id="content_wrapper">
|
63 |
|
|
|
64 |
5385
|
leinfelder
|
<table style="width:100%;" align="center" border="0"
|
65 |
|
|
cellpadding="5" cellspacing="0">
|
66 |
|
|
<tr>
|
67 |
|
|
<td align="left">
|
68 |
|
|
<p class="emphasis">
|
69 |
|
|
<xsl:number
|
70 |
|
|
value="count(resultset/document)" />
|
71 |
|
|
total records found
|
72 |
|
|
</p>
|
73 |
|
|
</td>
|
74 |
|
|
</tr>
|
75 |
|
|
</table>
|
76 |
|
|
|
77 |
5536
|
leinfelder
|
<table align="left" border="0" cellpadding="0" cellspacing="5" width="100%">
|
78 |
5385
|
leinfelder
|
<tr valign="top">
|
79 |
|
|
|
80 |
|
|
<!-- EML HERE -->
|
81 |
|
|
<xsl:if test="count(resultset/document[docname='eml']) > 0">
|
82 |
5533
|
leinfelder
|
<td>
|
83 |
5385
|
leinfelder
|
<xsl:call-template name="emlResults"/>
|
84 |
|
|
</td>
|
85 |
|
|
</xsl:if>
|
86 |
|
|
|
87 |
|
|
</tr>
|
88 |
|
|
</table>
|
89 |
|
|
|
90 |
5574
|
leinfelder
|
</div>
|
91 |
|
|
|
92 |
5385
|
leinfelder
|
<script language="JavaScript">
|
93 |
|
|
insertTemplateClosing('<xsl:value-of select="$contextURL" />');
|
94 |
|
|
</script>
|
95 |
|
|
</body>
|
96 |
|
|
</html>
|
97 |
|
|
</xsl:template>
|
98 |
|
|
|
99 |
|
|
<xsl:template name="emlResults">
|
100 |
|
|
|
101 |
5677
|
leinfelder
|
<div id="results">
|
102 |
|
|
|
103 |
5385
|
leinfelder
|
<xsl:for-each
|
104 |
|
|
select="resultset/document[docname='eml']">
|
105 |
|
|
<xsl:sort
|
106 |
|
|
select="./param[@name='dataset/title']" />
|
107 |
5675
|
leinfelder
|
|
108 |
|
|
<!-- the header portion of the result -->
|
109 |
5677
|
leinfelder
|
<div>
|
110 |
5385
|
leinfelder
|
<xsl:attribute name="class">
|
111 |
|
|
<xsl:choose>
|
112 |
5675
|
leinfelder
|
<xsl:when test="position() mod 2 = 1">rowodd accordian</xsl:when>
|
113 |
|
|
<xsl:when test="position() mod 2 = 0">roweven accordian</xsl:when>
|
114 |
5385
|
leinfelder
|
</xsl:choose>
|
115 |
|
|
</xsl:attribute>
|
116 |
|
|
|
117 |
5677
|
leinfelder
|
<a>
|
118 |
|
|
<xsl:attribute name="href">
|
119 |
|
|
<xsl:value-of select="$tripleURI"/><xsl:value-of select="./docid"/>
|
120 |
|
|
</xsl:attribute>
|
121 |
|
|
<b>
|
122 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
123 |
|
|
</b>
|
124 |
|
|
</a>
|
125 |
5739
|
leinfelder
|
|
126 |
5677
|
leinfelder
|
(<xsl:value-of select="./docid" />)
|
127 |
5739
|
leinfelder
|
|
128 |
5677
|
leinfelder
|
</div>
|
129 |
5536
|
leinfelder
|
|
130 |
5675
|
leinfelder
|
<!-- the content part -->
|
131 |
5677
|
leinfelder
|
<div>
|
132 |
5385
|
leinfelder
|
<xsl:attribute name="class">
|
133 |
5675
|
leinfelder
|
<xsl:choose>
|
134 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
135 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
136 |
5385
|
leinfelder
|
</xsl:choose>
|
137 |
|
|
</xsl:attribute>
|
138 |
|
|
|
139 |
5677
|
leinfelder
|
<table class="onehundred_percent">
|
140 |
|
|
<tr>
|
141 |
5743
|
leinfelder
|
<td>
|
142 |
5737
|
leinfelder
|
<!-- citation -->
|
143 |
|
|
<xsl:call-template name="citation"/>
|
144 |
5677
|
leinfelder
|
</td>
|
145 |
5690
|
leinfelder
|
</tr>
|
146 |
|
|
<tr>
|
147 |
5743
|
leinfelder
|
<td>
|
148 |
|
|
<!-- keywords -->
|
149 |
|
|
<xsl:call-template name="keywords"/>
|
150 |
|
|
</td>
|
151 |
|
|
</tr>
|
152 |
|
|
<tr>
|
153 |
5727
|
leinfelder
|
|
154 |
5690
|
leinfelder
|
<!-- annotation section -->
|
155 |
5743
|
leinfelder
|
<td>
|
156 |
5690
|
leinfelder
|
<!-- render the annotation -->
|
157 |
|
|
<xsl:for-each select="./*[local-name()='annotation']">
|
158 |
|
|
<xsl:call-template name="annotation">
|
159 |
5740
|
leinfelder
|
<xsl:with-param name="showAll" select="'false'"/>
|
160 |
5690
|
leinfelder
|
</xsl:call-template>
|
161 |
|
|
</xsl:for-each>
|
162 |
|
|
</td>
|
163 |
|
|
|
164 |
5677
|
leinfelder
|
</tr>
|
165 |
|
|
</table>
|
166 |
|
|
|
167 |
|
|
</div>
|
168 |
|
|
|
169 |
5385
|
leinfelder
|
</xsl:for-each>
|
170 |
5677
|
leinfelder
|
|
171 |
|
|
</div>
|
172 |
|
|
|
173 |
5675
|
leinfelder
|
</xsl:template>
|
174 |
5385
|
leinfelder
|
|
175 |
5737
|
leinfelder
|
<xsl:template name="citation">
|
176 |
|
|
<table class="subGroup subGroup_border onehundred_percent">
|
177 |
|
|
<tr>
|
178 |
5743
|
leinfelder
|
<td class="rowodd" width="{$labelWidth}">
|
179 |
5737
|
leinfelder
|
Citation:
|
180 |
|
|
</td>
|
181 |
|
|
<td class="roweven">
|
182 |
|
|
<!-- the author -->
|
183 |
|
|
<xsl:choose>
|
184 |
|
|
<xsl:when test="count(./param[@name='creator/individualName/surName']) > 0">
|
185 |
|
|
<xsl:for-each select="./param[@name='creator/individualName/surName']">
|
186 |
|
|
<xsl:value-of select="." />
|
187 |
|
|
<xsl:if test="position() != last()">, </xsl:if>
|
188 |
|
|
</xsl:for-each>
|
189 |
|
|
</xsl:when>
|
190 |
|
|
<xsl:otherwise>
|
191 |
|
|
<xsl:for-each select="./param[@name='creator/organizationName']">
|
192 |
|
|
<xsl:value-of select="." />
|
193 |
|
|
<xsl:if test="position() != last()">, </xsl:if>
|
194 |
|
|
</xsl:for-each>
|
195 |
|
|
</xsl:otherwise>
|
196 |
|
|
</xsl:choose>
|
197 |
|
|
<xsl:text>. </xsl:text>
|
198 |
|
|
<!-- the pubdate -->
|
199 |
|
|
<xsl:value-of select="substring(string(./param[@name='dataset/pubDate']),1,4)"/>
|
200 |
5739
|
leinfelder
|
<xsl:if test="substring(string(./param[@name='dataset/pubDate']),1,4) != ''">. </xsl:if>
|
201 |
|
|
<!-- the title -->
|
202 |
|
|
<xsl:value-of select="./param[@name='dataset/title']"/>
|
203 |
|
|
<xsl:text>. </xsl:text>
|
204 |
|
|
<!-- the id -->
|
205 |
|
|
<xsl:value-of select="./docid"/>
|
206 |
|
|
<xsl:text>. </xsl:text>
|
207 |
|
|
<br/>
|
208 |
5737
|
leinfelder
|
<!-- the link -->
|
209 |
5739
|
leinfelder
|
(<a>
|
210 |
5737
|
leinfelder
|
<xsl:attribute name="href">
|
211 |
|
|
<xsl:value-of select="$tripleURI"/><xsl:value-of select="./docid"/>
|
212 |
|
|
</xsl:attribute>
|
213 |
|
|
<xsl:value-of select="$contextURL" /><![CDATA[/metacat/]]><xsl:value-of select="./docid"/><![CDATA[/]]><xsl:value-of select="$qformat" />
|
214 |
5739
|
leinfelder
|
</a>)
|
215 |
5737
|
leinfelder
|
</td>
|
216 |
|
|
</tr>
|
217 |
|
|
</table>
|
218 |
|
|
</xsl:template>
|
219 |
|
|
|
220 |
5743
|
leinfelder
|
<xsl:template name="keywords">
|
221 |
|
|
<!-- render the keywords -->
|
222 |
|
|
<table class="subGroup subGroup_border onehundred_percent">
|
223 |
5727
|
leinfelder
|
<tr>
|
224 |
5743
|
leinfelder
|
<td class="rowodd" width="{$labelWidth}">
|
225 |
|
|
Keywords:
|
226 |
5727
|
leinfelder
|
</td>
|
227 |
|
|
<td>
|
228 |
5743
|
leinfelder
|
<p>
|
229 |
|
|
<xsl:for-each select="./param[@name='keyword']">
|
230 |
5727
|
leinfelder
|
<xsl:value-of select="." />
|
231 |
5743
|
leinfelder
|
<xsl:if test="position() != last()">, </xsl:if>
|
232 |
5727
|
leinfelder
|
</xsl:for-each>
|
233 |
5743
|
leinfelder
|
</p>
|
234 |
5727
|
leinfelder
|
</td>
|
235 |
|
|
</tr>
|
236 |
|
|
</table>
|
237 |
|
|
</xsl:template>
|
238 |
|
|
|
239 |
5385
|
leinfelder
|
|
240 |
|
|
</xsl:stylesheet>
|