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: sledge $'
|
10
|
* '$Date: 2007-02-13 09:29:17 -0800 (Tue, 13 Feb 2007) $'
|
11
|
* '$Revision: 3180 $'
|
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
|
32
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
33
|
xmlns="http://www.w3.org/1999/xhtml"
|
34
|
version="1.0">
|
35
|
|
36
|
<xsl:output method="xml" encoding="utf-8"
|
37
|
doctype-public="-//W3C//DTD XHTML 1.1//EN"
|
38
|
doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
|
39
|
indent="yes" />
|
40
|
|
41
|
<xsl:param name="sessid"/>
|
42
|
<xsl:param name="qformat">default</xsl:param>
|
43
|
<xsl:param name="enableediting">false</xsl:param>
|
44
|
|
45
|
<xsl:template match="/">
|
46
|
<html xml:lang="en-US">
|
47
|
<head>
|
48
|
<title>Components Search Results</title>
|
49
|
<link rel="stylesheet" type="text/css"
|
50
|
href="@style-skins-path@/{$qformat}/{$qformat}.css" />
|
51
|
<script language="Javascript" type="text/JavaScript"
|
52
|
src="@style-skins-path@/{$qformat}/{$qformat}.js">
|
53
|
<xsl:text disable-output-escaping="yes">
|
54
|
</xsl:text>
|
55
|
</script>
|
56
|
<script language="Javascript" type="text/JavaScript"
|
57
|
src="@style-common-path@/branding.js">
|
58
|
<xsl:text disable-output-escaping="yes">
|
59
|
</xsl:text>
|
60
|
</script>
|
61
|
<style type="text/css">
|
62
|
|
63
|
a
|
64
|
{
|
65
|
color: inherit;
|
66
|
font-weight: inherit;
|
67
|
font-size: inherit;
|
68
|
text-decoration: underline;
|
69
|
}
|
70
|
|
71
|
|
72
|
div.body
|
73
|
{
|
74
|
margin-left: 2em;
|
75
|
margin-right: 2em;
|
76
|
}
|
77
|
|
78
|
th.tablehead
|
79
|
{
|
80
|
text-align: left;
|
81
|
}
|
82
|
|
83
|
th.tablehead,
|
84
|
td.text_plain
|
85
|
{
|
86
|
padding: 0 0.75em;
|
87
|
}
|
88
|
|
89
|
th.tablehead:first-child,
|
90
|
td.text_plain:first-child
|
91
|
{
|
92
|
padding: 0 0.375em;
|
93
|
}
|
94
|
|
95
|
td.text_plain
|
96
|
{
|
97
|
vertical-align: top;
|
98
|
}
|
99
|
|
100
|
tr.entry td
|
101
|
{
|
102
|
border-bottom: 1px solid #ddd;
|
103
|
}
|
104
|
|
105
|
tr.entry + tr + tr td
|
106
|
{
|
107
|
border-bottom: 1px solid #066;
|
108
|
padding-top: 0.375em;
|
109
|
padding-bottom: 0.375em;
|
110
|
}
|
111
|
|
112
|
tr.entry + tr + tr td a
|
113
|
{
|
114
|
background: #eeeeee url(download.png) 2px center no-repeat;
|
115
|
border: 1px solid black;
|
116
|
font-weight: bold;
|
117
|
text-decoration: none;
|
118
|
padding: 0.063em 0.375em 0.063em 20px;
|
119
|
}
|
120
|
|
121
|
</style>
|
122
|
</head>
|
123
|
|
124
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
125
|
<script language="JavaScript">
|
126
|
insertTemplateOpening();
|
127
|
insertSearchBox();
|
128
|
</script>
|
129
|
|
130
|
<div class="body">
|
131
|
<p class="emphasis">
|
132
|
<xsl:number value="count(resultset/document)" /> components found
|
133
|
</p>
|
134
|
|
135
|
<!-- This tests to see if there are returned documents,
|
136
|
if there are not then don't show the query results -->
|
137
|
|
138
|
<xsl:if test="count(resultset/document) > 0">
|
139
|
<table cellspacing="0" cellpadding="0" style="width: 100%;">
|
140
|
<tr>
|
141
|
<th class="tablehead" style="width: 1px;"></th>
|
142
|
<th class="tablehead" style="width: 1px;">Component</th>
|
143
|
<th class="tablehead" style="width: 15em;">Author</th>
|
144
|
<th class="tablehead">Version</th>
|
145
|
</tr>
|
146
|
|
147
|
<xsl:for-each select="resultset/document">
|
148
|
<xsl:sort select="./param[@name='/entity/@name']"/>
|
149
|
<tr class="entry">
|
150
|
|
151
|
<td class="text_plain">
|
152
|
<xsl:value-of select="position()"/>.
|
153
|
</td>
|
154
|
|
155
|
<td class="text_plain" style="white-space: nowrap;">
|
156
|
<xsl:if test="./param[@name='entity/@name']!=''">
|
157
|
<b>
|
158
|
<xsl:value-of select="./param[@name='entity/@name']"/>
|
159
|
</b>
|
160
|
</xsl:if>
|
161
|
</td>
|
162
|
|
163
|
<!--td class="text_plain">
|
164
|
<xsl:value-of select="./param[@name='entity/property/@name'][text()='documentation']/following-sibling::param[@name='entity/property/property/@name'][text()='author']/following-sibling::param[@name='entity/property/property/configure'][position()=1]"/>
|
165
|
</td>
|
166
|
|
167
|
<td class="text_plain">
|
168
|
<xsl:value-of select="./param[@name='entity/property/@name'][text()='documentation']/following-sibling::param[@name='entity/property/property/@name'][text()='version']/following-sibling::param[@name='entity/property/property/configure'][position()=1]"/>
|
169
|
</td>
|
170
|
|
171
|
<xsl:if test="$enableediting = 'true'">
|
172
|
<td class="text_plain">
|
173
|
<form action="@servlet-path@" method="get">
|
174
|
<input type="hidden" name="action" value="read"/>
|
175
|
<input type="hidden" name="qformat" value="{$qformat}"/>
|
176
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
177
|
|
178
|
<input type="hidden" name="docid">
|
179
|
<xsl:attribute name="value">
|
180
|
<xsl:value-of select="./docid"/>
|
181
|
</xsl:attribute>
|
182
|
</input>
|
183
|
|
184
|
<center>
|
185
|
<input type="SUBMIT" value=" View " name="View"></input>
|
186
|
</center>
|
187
|
</form>
|
188
|
|
189
|
<form action="@cgi-prefix@/register-dataset.cgi" method="get">
|
190
|
<input type="hidden" name="stage" value="modify"/>
|
191
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
192
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
193
|
|
194
|
<input type="hidden" name="docid">
|
195
|
<xsl:attribute name="value">
|
196
|
<xsl:value-of select="./docid"/>
|
197
|
</xsl:attribute>
|
198
|
</input>
|
199
|
|
200
|
<center>
|
201
|
<input type="SUBMIT" value=" Edit " name="Edit"></input>
|
202
|
</center>
|
203
|
</form>
|
204
|
|
205
|
<form action="@cgi-prefix@/register-dataset.cgi" method="get">
|
206
|
<input type="hidden" name="stage" value="delete"/>
|
207
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
208
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
209
|
|
210
|
<input type="hidden" name="docid">
|
211
|
<xsl:attribute name="value">
|
212
|
<xsl:value-of select="./docid"/>
|
213
|
</xsl:attribute>
|
214
|
</input>
|
215
|
|
216
|
<center>
|
217
|
<input type="SUBMIT" value="Delete" name="Delete"></input>
|
218
|
</center>
|
219
|
</form>
|
220
|
</td>
|
221
|
</xsl:if-->
|
222
|
</tr>
|
223
|
|
224
|
<tr>
|
225
|
<td class="text_plain"></td>
|
226
|
<td class="text_plain" colspan="6">
|
227
|
<!--xsl:value-of select="substring(./param[@name='entity/property/@name'][text()='documentation']/following-sibling::param[@name='entity/property/property/@name'][text()='description']/following-sibling::param[@name='entity/property/property/configure'][position()=1], 0, 50)"/>
|
228
|
<xsl:text>... [</xsl:text-->
|
229
|
|
230
|
<a>
|
231
|
<xsl:attribute name="href">
|
232
|
<xsl:text>metacat?qformat=</xsl:text>
|
233
|
<xsl:value-of select="$qformat"/>
|
234
|
<xsl:text>&sessionid=</xsl:text>
|
235
|
<xsl:value-of select="$sessid"/>
|
236
|
<xsl:text>&action=read&docid=</xsl:text>
|
237
|
<xsl:value-of select="./docid"/>
|
238
|
|
239
|
<xsl:if test="$enableediting = 'true'">
|
240
|
<xsl:text>&enableediting=</xsl:text>
|
241
|
<xsl:value-of select="$enableediting"/>
|
242
|
</xsl:if>
|
243
|
</xsl:attribute>
|
244
|
|
245
|
<xsl:text>View Documentation</xsl:text>
|
246
|
</a>
|
247
|
|
248
|
<!--xsl:text>]</xsl:text-->
|
249
|
</td>
|
250
|
</tr>
|
251
|
|
252
|
<tr>
|
253
|
<td class="text_plain"></td>
|
254
|
<td class="text_plain" colspan="6">
|
255
|
<a>
|
256
|
<xsl:attribute name="href">
|
257
|
<xsl:text>http://@server@/authority/data?lsid=</xsl:text>
|
258
|
<xsl:value-of select="./param[@name='entity/property/@name'][text()='karId']/following-sibling::param[@name='entity/property/@value'][position()=1]"/>
|
259
|
</xsl:attribute>
|
260
|
|
261
|
<xsl:text>Download</xsl:text>
|
262
|
</a>
|
263
|
</td>
|
264
|
</tr>
|
265
|
</xsl:for-each>
|
266
|
</table>
|
267
|
</xsl:if>
|
268
|
</div>
|
269
|
<script language="JavaScript">
|
270
|
insertTemplateClosing();
|
271
|
</script>
|
272
|
</body>
|
273
|
</html>
|
274
|
</xsl:template>
|
275
|
</xsl:stylesheet>
|
276
|
|