1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* '$RCSfile$'
|
4
|
* Authors: Matt Jones, Chad Berkley
|
5
|
* Copyright: 2000-2007 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: leinfelder $'
|
10
|
* '$Date: 2011-01-18 17:04:51 -0800 (Tue, 18 Jan 2011) $'
|
11
|
* '$Revision: 5816 $'
|
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"
|
32
|
version="1.0">
|
33
|
<xsl:template name="resultstable">
|
34
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
35
|
|
36
|
<p class="emphasis">
|
37
|
<xsl:number value="count(resultset/document)" />
|
38
|
data packages found
|
39
|
</p>
|
40
|
|
41
|
<!-- This tests to see if there are returned documents,
|
42
|
if there are not then don't show the query results -->
|
43
|
<xsl:if test="count(resultset/document) > 0">
|
44
|
|
45
|
<table class="resultstable" width="95%" align="center" border="0" cellpadding="0" cellspacing="0">
|
46
|
<tr>
|
47
|
<th class="tablehead_lcorner" align="right" valign="top">
|
48
|
<img src="{$contextURL}/style/skins/default/images/transparent1x1.gif" width="1" height="1" />
|
49
|
</th>
|
50
|
<th class="tablehead" style="text-align: left">
|
51
|
Title
|
52
|
</th>
|
53
|
<th width="15%" class="tablehead" style="text-align: left">
|
54
|
Contacts
|
55
|
</th>
|
56
|
<th width="15%" class="tablehead" style="text-align: left">
|
57
|
Organization
|
58
|
</th>
|
59
|
<th width="15%" class="tablehead" style="text-align: left">
|
60
|
Keywords
|
61
|
</th>
|
62
|
<xsl:if test="$enableediting = 'true'">
|
63
|
<th width="10%" class="tablehead" style="text-align: middle">
|
64
|
Actions
|
65
|
</th>
|
66
|
</xsl:if>
|
67
|
<th class="tablehead_rcorner" align="right" valign="top">
|
68
|
<img src="{$contextURL}/style/skins/default/images/transparent1x1.gif" width="1" height="1" />
|
69
|
</th>
|
70
|
</tr>
|
71
|
|
72
|
<xsl:for-each select="resultset/document">
|
73
|
<xsl:sort select="./param[@name='dataset/title']" />
|
74
|
<tr valign="top" class="subpanel">
|
75
|
<xsl:attribute name="class">
|
76
|
<xsl:choose>
|
77
|
<xsl:when
|
78
|
test="position() mod 2 = 1">
|
79
|
rowodd
|
80
|
</xsl:when>
|
81
|
<xsl:when
|
82
|
test="position() mod 2 = 0">
|
83
|
roweven
|
84
|
</xsl:when>
|
85
|
</xsl:choose>
|
86
|
</xsl:attribute>
|
87
|
|
88
|
<td width="10"> </td>
|
89
|
<td class="text_plain">
|
90
|
<form action="{$contextURL}/metacat" method="POST">
|
91
|
<xsl:attribute name="name"><xsl:value-of
|
92
|
select="translate(./docid, '()-.', '____')" /></xsl:attribute>
|
93
|
|
94
|
<input type="hidden" name="qformat" />
|
95
|
<input type="hidden" name="sessionid" />
|
96
|
<xsl:if
|
97
|
test="$enableediting = 'true'">
|
98
|
<input type="hidden" name="enableediting" value="{$enableediting}" />
|
99
|
</xsl:if>
|
100
|
<input type="hidden" name="action" value="read" />
|
101
|
<input type="hidden" name="docid">
|
102
|
<xsl:attribute
|
103
|
name="value"><xsl:value-of
|
104
|
select="./docid" /></xsl:attribute>
|
105
|
</input>
|
106
|
<xsl:for-each
|
107
|
select="./relation">
|
108
|
<input type="hidden" name="docid">
|
109
|
<xsl:attribute
|
110
|
name="value"><xsl:value-of
|
111
|
select="./relationdoc" /></xsl:attribute>
|
112
|
</input>
|
113
|
</xsl:for-each>
|
114
|
|
115
|
<a>
|
116
|
<xsl:attribute
|
117
|
name="href">javascript:submitform('read',document.<xsl:value-of
|
118
|
select="translate(./docid, '()-.', '____')" />)</xsl:attribute>
|
119
|
<xsl:text>
|
120
|
» 
|
121
|
</xsl:text>
|
122
|
<xsl:choose>
|
123
|
<xsl:when test="./param[@name='dataset/title']!=''">
|
124
|
<xsl:value-of select="./param[@name='dataset/title']" />
|
125
|
<xsl:if test="count(./param[@name='dataset/title/value']) != 0">
|
126
|
<br/>
|
127
|
<xsl:for-each select="./param[@name='dataset/title/value']" >
|
128
|
<xsl:value-of select="." />
|
129
|
<br/>
|
130
|
</xsl:for-each>
|
131
|
</xsl:if>
|
132
|
</xsl:when>
|
133
|
<xsl:otherwise>
|
134
|
<xsl:value-of select="./param[@name='citation/title']" />
|
135
|
<xsl:value-of select="./param[@name='software/title']" />
|
136
|
<xsl:value-of select="./param[@name='protocol/title']" />
|
137
|
<xsl:value-of select="./param[@name='idinfo/citation/citeinfo/title']" />
|
138
|
</xsl:otherwise>
|
139
|
</xsl:choose>
|
140
|
</a>
|
141
|
<br />
|
142
|
<br />
|
143
|
<p>
|
144
|
<pre>ID: <xsl:value-of select="./docid" /></pre>
|
145
|
</p>
|
146
|
|
147
|
</form>
|
148
|
</td>
|
149
|
|
150
|
<td class="text_plain">
|
151
|
<xsl:for-each
|
152
|
select="./param[@name='originator/individualName/surName']">
|
153
|
<xsl:value-of select="." />
|
154
|
<br />
|
155
|
</xsl:for-each>
|
156
|
<xsl:for-each
|
157
|
select="./param[@name='creator/individualName/surName']">
|
158
|
<xsl:value-of select="." />
|
159
|
<br />
|
160
|
</xsl:for-each>
|
161
|
<xsl:for-each
|
162
|
select="./param[@name='idinfo/citation/citeinfo/origin']">
|
163
|
<xsl:value-of select="." />
|
164
|
<br />
|
165
|
</xsl:for-each>
|
166
|
|
167
|
</td>
|
168
|
<td class="text_plain">
|
169
|
<xsl:value-of
|
170
|
select="./param[@name='originator/organizationName']" />
|
171
|
<xsl:value-of
|
172
|
select="./param[@name='creator/organizationName']" />
|
173
|
|
174
|
</td>
|
175
|
|
176
|
<td class="text_plain">
|
177
|
<xsl:for-each
|
178
|
select="./param[@name='keyword']">
|
179
|
<xsl:value-of select="." />
|
180
|
<br />
|
181
|
</xsl:for-each>
|
182
|
<xsl:for-each
|
183
|
select="./param[@name='keyword/value']">
|
184
|
<xsl:value-of select="." />
|
185
|
<br />
|
186
|
</xsl:for-each>
|
187
|
<xsl:for-each
|
188
|
select="./param[@name='idinfo/keywords/theme/themekey']">
|
189
|
<xsl:value-of select="." />
|
190
|
<br />
|
191
|
</xsl:for-each>
|
192
|
|
193
|
</td>
|
194
|
|
195
|
<xsl:if test="$enableediting = 'true'">
|
196
|
<td class="text_plain">
|
197
|
<form action="{$contextURL}/metacat" method="POST">
|
198
|
<input type="hidden" name="action" value="read" />
|
199
|
<input type="hidden" name="qformat" value="{$qformat}" />
|
200
|
<input type="hidden" name="sessionid" value="{$sessid}" />
|
201
|
<input type="hidden" name="docid">
|
202
|
<xsl:attribute name="value">
|
203
|
<xsl:value-of select="./docid" />
|
204
|
</xsl:attribute>
|
205
|
</input>
|
206
|
<center>
|
207
|
<input type="SUBMIT" value=" View " name="View">
|
208
|
</input>
|
209
|
</center>
|
210
|
</form>
|
211
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
212
|
<input type="hidden" name="stage" value="modify" />
|
213
|
<input type="hidden" name="cfg" value="{$qformat}" />
|
214
|
<input type="hidden" name="sessionid" value="{$sessid}" />
|
215
|
<input type="hidden" name="docid">
|
216
|
<xsl:attribute name="value">
|
217
|
<xsl:value-of select="./docid" />
|
218
|
</xsl:attribute>
|
219
|
</input>
|
220
|
<center>
|
221
|
<input type="SUBMIT" value=" Edit " name="Edit">
|
222
|
</input>
|
223
|
</center>
|
224
|
</form>
|
225
|
<form action="{$cgi-prefix}/register-dataset.cgi" method="POST">
|
226
|
<input type="hidden" name="stage" value="delete" />
|
227
|
<input type="hidden" name="cfg" value="{$qformat}" />
|
228
|
<input type="hidden" name="sessionid" value="{$sessid}" />
|
229
|
<input type="hidden" name="docid">
|
230
|
<xsl:attribute name="value">
|
231
|
<xsl:value-of select="./docid" />
|
232
|
</xsl:attribute>
|
233
|
</input>
|
234
|
<center>
|
235
|
<input type="SUBMIT" value="Delete" name="Delete">
|
236
|
</input>
|
237
|
</center>
|
238
|
</form>
|
239
|
</td>
|
240
|
</xsl:if>
|
241
|
<td width="10"> </td>
|
242
|
</tr>
|
243
|
<tr>
|
244
|
<td width="10" class="searchresultslead"></td>
|
245
|
<td colspan="5" class="searchresultsdivider"> </td>
|
246
|
</tr>
|
247
|
|
248
|
</xsl:for-each>
|
249
|
</table>
|
250
|
|
251
|
</xsl:if>
|
252
|
</body>
|
253
|
</xsl:template>
|
254
|
|
255
|
</xsl:stylesheet>
|