1 |
2950
|
berkley
|
<?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 |
3178
|
sledge
|
<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 |
2950
|
berkley
|
|
36 |
3178
|
sledge
|
<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 |
2950
|
berkley
|
<xsl:param name="sessid"/>
|
42 |
|
|
<xsl:param name="qformat">default</xsl:param>
|
43 |
|
|
<xsl:param name="enableediting">false</xsl:param>
|
44 |
3178
|
sledge
|
|
45 |
2950
|
berkley
|
<xsl:template match="/">
|
46 |
3178
|
sledge
|
<html xml:lang="en-US">
|
47 |
2950
|
berkley
|
<head>
|
48 |
3178
|
sledge
|
<title>Components Search Results</title>
|
49 |
|
|
<link rel="stylesheet" type="text/css"
|
50 |
|
|
href="@style-skins-path@/{$qformat}/{$qformat}.css" />
|
51 |
2950
|
berkley
|
<script language="Javascript" type="text/JavaScript"
|
52 |
3180
|
sledge
|
src="@style-skins-path@/{$qformat}/{$qformat}.js">
|
53 |
|
|
<xsl:text disable-output-escaping="yes">
|
54 |
|
|
</xsl:text>
|
55 |
|
|
</script>
|
56 |
2950
|
berkley
|
<script language="Javascript" type="text/JavaScript"
|
57 |
3180
|
sledge
|
src="@style-common-path@/branding.js">
|
58 |
|
|
<xsl:text disable-output-escaping="yes">
|
59 |
|
|
</xsl:text>
|
60 |
|
|
</script>
|
61 |
3178
|
sledge
|
<style type="text/css">
|
62 |
2950
|
berkley
|
|
63 |
3178
|
sledge
|
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 |
3236
|
sledge
|
padding: 0.375em 0.75em 0;
|
87 |
3178
|
sledge
|
}
|
88 |
|
|
|
89 |
|
|
th.tablehead:first-child,
|
90 |
|
|
td.text_plain:first-child
|
91 |
|
|
{
|
92 |
3236
|
sledge
|
padding: 0.375em 0.375em 0;
|
93 |
3178
|
sledge
|
}
|
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 |
3236
|
sledge
|
tr.entry + tr td
|
106 |
3178
|
sledge
|
{
|
107 |
|
|
border-bottom: 1px solid #066;
|
108 |
|
|
padding-top: 0.375em;
|
109 |
|
|
padding-bottom: 0.375em;
|
110 |
|
|
}
|
111 |
|
|
|
112 |
3236
|
sledge
|
.dl
|
113 |
3178
|
sledge
|
{
|
114 |
3236
|
sledge
|
background: #eeeeee url(@style-skins-path@/<xsl:value-of select="$qformat"/>/download2.png) 2px center no-repeat;
|
115 |
3178
|
sledge
|
border: 1px solid black;
|
116 |
|
|
font-weight: bold;
|
117 |
|
|
text-decoration: none;
|
118 |
|
|
padding: 0.063em 0.375em 0.063em 20px;
|
119 |
3236
|
sledge
|
font-size: smaller;
|
120 |
3178
|
sledge
|
}
|
121 |
|
|
|
122 |
|
|
</style>
|
123 |
2950
|
berkley
|
</head>
|
124 |
|
|
|
125 |
|
|
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
|
126 |
3178
|
sledge
|
<script language="JavaScript">
|
127 |
|
|
insertTemplateOpening();
|
128 |
|
|
insertSearchBox();
|
129 |
|
|
</script>
|
130 |
2950
|
berkley
|
|
131 |
3178
|
sledge
|
<div class="body">
|
132 |
|
|
<p class="emphasis">
|
133 |
|
|
<xsl:number value="count(resultset/document)" /> components found
|
134 |
|
|
</p>
|
135 |
2950
|
berkley
|
|
136 |
3178
|
sledge
|
<!-- This tests to see if there are returned documents,
|
137 |
|
|
if there are not then don't show the query results -->
|
138 |
2950
|
berkley
|
|
139 |
3178
|
sledge
|
<xsl:if test="count(resultset/document) > 0">
|
140 |
|
|
<table cellspacing="0" cellpadding="0" style="width: 100%;">
|
141 |
|
|
<tr>
|
142 |
|
|
<th class="tablehead" style="width: 1px;"></th>
|
143 |
|
|
<th class="tablehead" style="width: 1px;">Component</th>
|
144 |
|
|
<th class="tablehead" style="width: 15em;">Author</th>
|
145 |
|
|
<th class="tablehead">Version</th>
|
146 |
3236
|
sledge
|
<th class="tablehead"></th>
|
147 |
3178
|
sledge
|
</tr>
|
148 |
2950
|
berkley
|
|
149 |
3178
|
sledge
|
<xsl:for-each select="resultset/document">
|
150 |
|
|
<xsl:sort select="./param[@name='/entity/@name']"/>
|
151 |
3236
|
sledge
|
<xsl:variable name="sq">'</xsl:variable>
|
152 |
3178
|
sledge
|
<tr class="entry">
|
153 |
2950
|
berkley
|
|
154 |
3178
|
sledge
|
<td class="text_plain">
|
155 |
|
|
<xsl:value-of select="position()"/>.
|
156 |
|
|
</td>
|
157 |
2950
|
berkley
|
|
158 |
3178
|
sledge
|
<td class="text_plain" style="white-space: nowrap;">
|
159 |
|
|
<xsl:if test="./param[@name='entity/@name']!=''">
|
160 |
3236
|
sledge
|
<b style="font-size: larger;">
|
161 |
2950
|
berkley
|
<xsl:value-of select="./param[@name='entity/@name']"/>
|
162 |
3178
|
sledge
|
</b>
|
163 |
|
|
</xsl:if>
|
164 |
|
|
</td>
|
165 |
2950
|
berkley
|
|
166 |
3236
|
sledge
|
<td class="text_plain">
|
167 |
|
|
<xsl:value-of select="./param[@name=concat('entity/property[@name=', $sq, 'documentation', $sq, ']/property[@name=', $sq, 'author', $sq, ']/configure')]"/>
|
168 |
3178
|
sledge
|
</td>
|
169 |
2950
|
berkley
|
|
170 |
3178
|
sledge
|
<td class="text_plain">
|
171 |
3236
|
sledge
|
<xsl:value-of select="./param[@name=concat('entity/property[@name=', $sq, 'documentation', $sq, ']/property[@name=', $sq, 'version', $sq, ']/configure')]"/>
|
172 |
3178
|
sledge
|
</td>
|
173 |
2950
|
berkley
|
|
174 |
3236
|
sledge
|
<td class="text_plain">
|
175 |
|
|
<a class="dl">
|
176 |
|
|
<xsl:attribute name="href">
|
177 |
|
|
<xsl:text>http://@server@/authority/data?lsid=</xsl:text>
|
178 |
|
|
<xsl:value-of select="./param[@name=concat('entity/property[@name=', $sq, 'karId', $sq, ']/@value')]"/>
|
179 |
|
|
</xsl:attribute>
|
180 |
|
|
|
181 |
|
|
<xsl:text>Download</xsl:text>
|
182 |
|
|
</a>
|
183 |
|
|
</td>
|
184 |
|
|
|
185 |
|
|
<!--xsl:if test="$enableediting = 'true'">
|
186 |
3178
|
sledge
|
<td class="text_plain">
|
187 |
|
|
<form action="@servlet-path@" method="get">
|
188 |
|
|
<input type="hidden" name="action" value="read"/>
|
189 |
|
|
<input type="hidden" name="qformat" value="{$qformat}"/>
|
190 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
191 |
2950
|
berkley
|
|
192 |
3178
|
sledge
|
<input type="hidden" name="docid">
|
193 |
|
|
<xsl:attribute name="value">
|
194 |
|
|
<xsl:value-of select="./docid"/>
|
195 |
|
|
</xsl:attribute>
|
196 |
|
|
</input>
|
197 |
|
|
|
198 |
|
|
<center>
|
199 |
|
|
<input type="SUBMIT" value=" View " name="View"></input>
|
200 |
|
|
</center>
|
201 |
|
|
</form>
|
202 |
|
|
|
203 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi" method="get">
|
204 |
|
|
<input type="hidden" name="stage" value="modify"/>
|
205 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
206 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
207 |
|
|
|
208 |
|
|
<input type="hidden" name="docid">
|
209 |
|
|
<xsl:attribute name="value">
|
210 |
|
|
<xsl:value-of select="./docid"/>
|
211 |
|
|
</xsl:attribute>
|
212 |
|
|
</input>
|
213 |
|
|
|
214 |
|
|
<center>
|
215 |
|
|
<input type="SUBMIT" value=" Edit " name="Edit"></input>
|
216 |
|
|
</center>
|
217 |
|
|
</form>
|
218 |
|
|
|
219 |
|
|
<form action="@cgi-prefix@/register-dataset.cgi" method="get">
|
220 |
|
|
<input type="hidden" name="stage" value="delete"/>
|
221 |
|
|
<input type="hidden" name="cfg" value="{$qformat}"/>
|
222 |
|
|
<input type="hidden" name="sessionid" value="{$sessid}"/>
|
223 |
|
|
|
224 |
|
|
<input type="hidden" name="docid">
|
225 |
|
|
<xsl:attribute name="value">
|
226 |
|
|
<xsl:value-of select="./docid"/>
|
227 |
|
|
</xsl:attribute>
|
228 |
|
|
</input>
|
229 |
|
|
|
230 |
|
|
<center>
|
231 |
|
|
<input type="SUBMIT" value="Delete" name="Delete"></input>
|
232 |
|
|
</center>
|
233 |
|
|
</form>
|
234 |
|
|
</td>
|
235 |
3180
|
sledge
|
</xsl:if-->
|
236 |
3178
|
sledge
|
</tr>
|
237 |
|
|
|
238 |
|
|
<tr>
|
239 |
|
|
<td class="text_plain"></td>
|
240 |
|
|
<td class="text_plain" colspan="6">
|
241 |
3236
|
sledge
|
<xsl:variable name="docClip" select="substring(./param[@name=concat('entity/property[@name=', $sq, 'documentation', $sq, ']/property[@name=', $sq, 'description', $sq, ']/configure')], 0, 200)"/>
|
242 |
|
|
<xsl:value-of select="$docClip"/>
|
243 |
|
|
<xsl:text> </xsl:text>
|
244 |
|
|
<xsl:value-of select="substring(./param[@name=concat('entity/property[@name=', $sq, 'documentation', $sq, ']/property[@name=', $sq, 'userLevelDocumentation', $sq, ']/configure')], 0, 200 - $docClip)"/>
|
245 |
|
|
<xsl:text>... [</xsl:text>
|
246 |
3178
|
sledge
|
|
247 |
3236
|
sledge
|
<a style="font-size: smaller;">
|
248 |
3178
|
sledge
|
<xsl:attribute name="href">
|
249 |
|
|
<xsl:text>metacat?qformat=</xsl:text>
|
250 |
|
|
<xsl:value-of select="$qformat"/>
|
251 |
|
|
<xsl:text>&sessionid=</xsl:text>
|
252 |
|
|
<xsl:value-of select="$sessid"/>
|
253 |
|
|
<xsl:text>&action=read&docid=</xsl:text>
|
254 |
|
|
<xsl:value-of select="./docid"/>
|
255 |
|
|
|
256 |
|
|
<xsl:if test="$enableediting = 'true'">
|
257 |
|
|
<xsl:text>&enableediting=</xsl:text>
|
258 |
|
|
<xsl:value-of select="$enableediting"/>
|
259 |
|
|
</xsl:if>
|
260 |
|
|
</xsl:attribute>
|
261 |
|
|
|
262 |
3180
|
sledge
|
<xsl:text>View Documentation</xsl:text>
|
263 |
3178
|
sledge
|
</a>
|
264 |
|
|
|
265 |
3236
|
sledge
|
<xsl:text>]</xsl:text>
|
266 |
3178
|
sledge
|
</td>
|
267 |
|
|
</tr>
|
268 |
|
|
</xsl:for-each>
|
269 |
|
|
</table>
|
270 |
|
|
</xsl:if>
|
271 |
|
|
</div>
|
272 |
|
|
<script language="JavaScript">
|
273 |
|
|
insertTemplateClosing();
|
274 |
|
|
</script>
|
275 |
|
|
</body>
|
276 |
2950
|
berkley
|
</html>
|
277 |
3178
|
sledge
|
</xsl:template>
|
278 |
|
|
</xsl:stylesheet>
|