Revision 4353
Added by daigle about 16 years ago
lib/style/skins/sbclter/templates/xsl/resultset.xsl_20060504 | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
* '$RCSfile: resultset.xsl,v $' |
|
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: cjones $' |
|
10 |
* '$Date: 2004/10/05 23:50:46 $' |
|
11 |
* '$Revision: 1.1 $' |
|
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 |
|
|
33 |
<!-- import the header, footer, and sidebars for customized styling --> |
|
34 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pageheader.xsl"/> |
|
35 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pagefooter.xsl"/> |
|
36 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_leftsidebar.xsl"/> |
|
37 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/> |
|
38 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/loginbox.xsl"/> |
|
39 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/searchbox.xsl"/> |
|
40 |
|
|
41 |
<!-- send the resultset back to the browser styled in HTML --> |
|
42 |
<xsl:output method="html" encoding="iso-8859-1" indent="yes" standalone="yes" |
|
43 |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
44 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> |
|
45 |
|
|
46 |
<xsl:param name="sessid"/> |
|
47 |
<xsl:param name="enableediting">false</xsl:param> |
|
48 |
<!-- This parameter gets overidden by the chosen default qformat --> |
|
49 |
<xsl:param name="qformat">default</xsl:param> |
|
50 |
|
|
51 |
<!-- this param set to require a user to accept a datause agreement |
|
52 |
<xsl:param name="visit_datauseagreement">true</xsl:param> --> |
|
53 |
|
|
54 |
<!-- The main template matches the XML document root --> |
|
55 |
<xsl:template match="/"> |
|
56 |
<html> |
|
57 |
<head> |
|
58 |
<link rel="stylesheet" type="text/css" |
|
59 |
href="@style-skins-path@/{$qformat}/{$qformat}.css" /> |
|
60 |
<script language="Javascript" type="text/JavaScript" |
|
61 |
src="@style-skins-path@/{$qformat}/{$qformat}.js" /> |
|
62 |
<script language="Javascript" type="text/JavaScript" |
|
63 |
src="@style-common-path@/branding.js" /> |
|
64 |
<script language="JavaScript"> |
|
65 |
<![CDATA[ |
|
66 |
function submitform(action,form_ref) { |
|
67 |
form_ref.action.value=action; |
|
68 |
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA["; |
|
69 |
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA["; |
|
70 |
form_ref.submit(); |
|
71 |
} |
|
72 |
]]> |
|
73 |
</script> |
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
</head> |
|
83 |
|
|
84 |
<body> |
|
85 |
<!-- begin the header area --> |
|
86 |
<xsl:call-template name="pageheader" /> |
|
87 |
<!-- end the header area --> |
|
88 |
|
|
89 |
<!-- begin the left sidebar area --> |
|
90 |
<xsl:call-template name="page_leftsidebar" /> |
|
91 |
<!-- end the left sidebar area --> |
|
92 |
|
|
93 |
<!-- begin the content area --> |
|
94 |
<div id="content"> |
|
95 |
|
|
96 |
<!-- begin login form area --> |
|
97 |
<xsl:call-template name="loginbox" /> |
|
98 |
<!-- end login form area --> |
|
99 |
|
|
100 |
<!-- begin search form area --> |
|
101 |
<xsl:call-template name="searchbox" /> |
|
102 |
<!-- end search form area --> |
|
103 |
|
|
104 |
|
|
105 |
<!-- begin results section (XSLT generated) --> |
|
106 |
<div id="data-catalog-area"> |
|
107 |
|
|
108 |
<!-- State how many package hits were returned --> |
|
109 |
<xsl:choose> |
|
110 |
<xsl:when test="count(resultset/document)=1"> |
|
111 |
<p> |
|
112 |
<xsl:number value="count(resultset/document)" /> data package found: |
|
113 |
</p> |
|
114 |
</xsl:when> |
|
115 |
<xsl:otherwise> |
|
116 |
<p> |
|
117 |
<xsl:number value="count(resultset/document)" /> data packages found: |
|
118 |
</p> |
|
119 |
</xsl:otherwise> |
|
120 |
</xsl:choose> |
|
121 |
|
|
122 |
<!-- This tests to see if there are returned documents, |
|
123 |
if there are not then don't show the query results --> |
|
124 |
<xsl:if test="count(resultset/document) > 0"> |
|
125 |
|
|
126 |
<!-- create the results table, and style each of the returnfield that |
|
127 |
were specified in the original query --> |
|
128 |
<table class="group group_border"> |
|
129 |
<tr> |
|
130 |
<th class="wide_column">Title (FROM THE MOB CONTEXT)</th> |
|
131 |
<th>Principal Investigators</th> |
|
132 |
<!-- <th>Organization</th> --> |
|
133 |
<th>Data Tables (no metadata)</th> |
|
134 |
<xsl:if test="$enableediting = 'true'"> |
|
135 |
<th>Actions</th> |
|
136 |
</xsl:if> |
|
137 |
</tr> |
|
138 |
|
|
139 |
<xsl:for-each select="resultset/document"> |
|
140 |
<xsl:sort select="./param[@name='dataset/title']"/> |
|
141 |
<tr> |
|
142 |
<td> |
|
143 |
<xsl:attribute name="class"> |
|
144 |
<xsl:choose> |
|
145 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
146 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
147 |
</xsl:choose> |
|
148 |
</xsl:attribute> |
|
149 |
|
|
150 |
<!-- |
|
151 |
Build a submit form to view the data package details, using hidden |
|
152 |
fields to POST the query values. |
|
153 |
--> |
|
154 |
<form action="@servlet-path@" method="POST"> |
|
155 |
<xsl:attribute name="name"> |
|
156 |
<xsl:value-of select="translate(./docid, '()-.', '')" /> |
|
157 |
</xsl:attribute> |
|
158 |
<input type="hidden" name="qformat" /> |
|
159 |
<input type="hidden" name="sessionid" /> |
|
160 |
<xsl:if test="$enableediting = 'true'"> |
|
161 |
<input type="hidden" name="enableediting" value="{$enableediting}"/> |
|
162 |
</xsl:if> |
|
163 |
<input type="hidden" name="action" value="read"/> |
|
164 |
<input type="hidden" name="docid"> |
|
165 |
<xsl:attribute name="value"> |
|
166 |
<xsl:value-of select="./docid"/> |
|
167 |
</xsl:attribute> |
|
168 |
</input> |
|
169 |
<xsl:for-each select="./relation"> |
|
170 |
<input type="hidden" name="docid"> |
|
171 |
<xsl:attribute name="value" > |
|
172 |
<xsl:value-of select="./relationdoc" /> |
|
173 |
</xsl:attribute> |
|
174 |
</input> |
|
175 |
</xsl:for-each> |
|
176 |
|
|
177 |
<!-- Create the link on the title column --> |
|
178 |
<a> |
|
179 |
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '')"/>)</xsl:attribute> |
|
180 |
<xsl:choose> |
|
181 |
<xsl:when test="./param[@name='dataset/title']!=''"> |
|
182 |
<xsl:value-of select="./param[@name='dataset/title']"/> |
|
183 |
</xsl:when> |
|
184 |
<xsl:otherwise> |
|
185 |
<xsl:value-of select="./param[@name='citation/title']"/> |
|
186 |
<xsl:value-of select="./param[@name='software/title']"/> |
|
187 |
<xsl:value-of select="./param[@name='protocol/title']"/> |
|
188 |
</xsl:otherwise> |
|
189 |
</xsl:choose> |
|
190 |
</a> |
|
191 |
|
|
192 |
<!-- Include the docid in the title output --> |
|
193 |
<xsl:text>(</xsl:text> |
|
194 |
<xsl:value-of select="./docid"/> |
|
195 |
<xsl:text>)</xsl:text> |
|
196 |
</form> |
|
197 |
</td> |
|
198 |
|
|
199 |
<!-- style the contacts returned --> |
|
200 |
<td> |
|
201 |
<xsl:attribute name="class"> |
|
202 |
<xsl:choose> |
|
203 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
204 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
205 |
</xsl:choose> |
|
206 |
</xsl:attribute> |
|
207 |
|
|
208 |
<xsl:for-each select="./param[@name='dataset/originator/individualName/surName']" > |
|
209 |
<xsl:value-of select="." /> |
|
210 |
<br /> |
|
211 |
</xsl:for-each> |
|
212 |
<xsl:for-each select="./param[@name='dataset/creator/individualName/surName']" > |
|
213 |
<xsl:value-of select="." /> |
|
214 |
<br /> |
|
215 |
</xsl:for-each> |
|
216 |
</td> |
|
217 |
|
|
218 |
<!-- style the organization returned --> |
|
219 |
<!-- |
|
220 |
<td> |
|
221 |
<xsl:attribute name="class"> |
|
222 |
<xsl:choose> |
|
223 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
224 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
225 |
</xsl:choose> |
|
226 |
</xsl:attribute> |
|
227 |
|
|
228 |
<xsl:value-of select="./param[@name='dataset/originator/organizationName']" /> |
|
229 |
<xsl:value-of select="./param[@name='dataset/creator/organizationName']" /> |
|
230 |
</td> |
|
231 |
--> |
|
232 |
|
|
233 |
<!-- style the keywords returned --> |
|
234 |
<!-- |
|
235 |
<td> |
|
236 |
<xsl:attribute name="class"> |
|
237 |
<xsl:choose> |
|
238 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
239 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
240 |
</xsl:choose> |
|
241 |
</xsl:attribute> |
|
242 |
|
|
243 |
<xsl:for-each select="./param[@name='keyword']"> |
|
244 |
<xsl:value-of select="." /> |
|
245 |
<br /> |
|
246 |
</xsl:for-each> |
|
247 |
</td> |
|
248 |
--> |
|
249 |
|
|
250 |
<!-- create links to each of the associated raw data entities --> |
|
251 |
|
|
252 |
<td> |
|
253 |
<xsl:attribute name="class"> |
|
254 |
<xsl:choose> |
|
255 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
256 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
257 |
</xsl:choose> |
|
258 |
</xsl:attribute> |
|
259 |
<!-- take each entity name and link it to the physical object url--> |
|
260 |
<!-- put link in a variable to be be passed to the data agreement page first --> |
|
261 |
|
|
262 |
<xsl:for-each select="./param[@name='dataTable/entityName']"> |
|
263 |
<a> |
|
264 |
<xsl:variable name="URL" |
|
265 |
select="following-sibling::param[@name='dataTable/physical/distribution/online/url']" /> |
|
266 |
|
|
267 |
<xsl:choose> |
|
268 |
<!-- if contents is a url to external data table --> |
|
269 |
<xsl:when test="starts-with($URL,'http')"> |
|
270 |
<xsl:attribute name="href"><xsl:value-of select="$URL"/></xsl:attribute> |
|
271 |
</xsl:when> |
|
272 |
|
|
273 |
<!-- strip out the ecogrid:// syntax if it's there, and the rest is in metacat --> |
|
274 |
<xsl:when test="starts-with($URL,'ecogrid')"> |
|
275 |
<xsl:variable name="URL1" select="substring-after($URL, 'ecogrid://')"/> |
|
276 |
<xsl:variable name="docID" select="substring-after($URL1, '/')"/> |
|
277 |
<xsl:attribute name="href"> |
|
278 |
<!-- this needs to be on one line ... --> |
|
279 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&docid=</xsl:text><xsl:value-of select="$docID"/> |
|
280 |
</xsl:attribute> |
|
281 |
</xsl:when> |
|
282 |
|
|
283 |
<!-- otherwise, assume the url field names a metacat table --> |
|
284 |
<xsl:otherwise> |
|
285 |
<xsl:attribute name="href"> |
|
286 |
<!-- this needs to be on one line --> |
|
287 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&docid=</xsl:text><xsl:value-of select="$URL"/> |
|
288 |
</xsl:attribute> |
|
289 |
</xsl:otherwise> |
|
290 |
</xsl:choose> |
|
291 |
|
|
292 |
<!-- show the entityName value as the link --> |
|
293 |
<xsl:value-of select="." /> |
|
294 |
</a> |
|
295 |
<br /> |
|
296 |
</xsl:for-each> |
|
297 |
</td> |
|
298 |
|
|
299 |
<xsl:if test="$enableediting = 'true'"> |
|
300 |
<td> |
|
301 |
<xsl:attribute name="class"> |
|
302 |
<xsl:choose> |
|
303 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
304 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
305 |
</xsl:choose> |
|
306 |
</xsl:attribute> |
|
307 |
|
|
308 |
<form action="@servlet-path@" method="POST"> |
|
309 |
<input type="hidden" name="action" value="read"/> |
|
310 |
<input type="hidden" name="qformat" value="{$qformat}"/> |
|
311 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
312 |
<input type="hidden" name="docid"> |
|
313 |
<xsl:attribute name="value"> |
|
314 |
<xsl:value-of select="./docid"/> |
|
315 |
</xsl:attribute> |
|
316 |
</input> |
|
317 |
<center> |
|
318 |
<input type="SUBMIT" value=" View " name="View"> |
|
319 |
</input> |
|
320 |
</center> |
|
321 |
</form> |
|
322 |
<form action="@cgi-prefix@/register-dataset.cgi" |
|
323 |
method="POST"> |
|
324 |
<input type="hidden" name="stage" value="modify"/> |
|
325 |
<input type="hidden" name="cfg" value="{$qformat}"/> |
|
326 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
327 |
<input type="hidden" name="docid"> |
|
328 |
<xsl:attribute name="value"> |
|
329 |
<xsl:value-of select="./docid"/> |
|
330 |
</xsl:attribute> |
|
331 |
</input> |
|
332 |
<input type="SUBMIT" value=" Edit " name="Edit"> |
|
333 |
</input> |
|
334 |
</form> |
|
335 |
<form action="@cgi-prefix@/register-dataset.cgi" |
|
336 |
method="POST"> |
|
337 |
<input type="hidden" name="stage" value="delete"/> |
|
338 |
<input type="hidden" name="cfg" value="{$qformat}"/> |
|
339 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
340 |
<input type="hidden" name="docid"> |
|
341 |
<xsl:attribute name="value"> |
|
342 |
<xsl:value-of select="./docid"/> |
|
343 |
</xsl:attribute> |
|
344 |
</input> |
|
345 |
<input type="submit" value="Delete" name="Delete"> |
|
346 |
</input> |
|
347 |
</form> |
|
348 |
</td> |
|
349 |
</xsl:if> |
|
350 |
</tr> |
|
351 |
</xsl:for-each> |
|
352 |
</table> |
|
353 |
</xsl:if> |
|
354 |
|
|
355 |
</div> <!-- end data-catalog-area --> |
|
356 |
</div> |
|
357 |
<!-- end content area --> |
|
358 |
|
|
359 |
<!-- begin the right sidebar area --> |
|
360 |
<xsl:call-template name="page_rightsidebar" /> |
|
361 |
<!-- end the right sidebar area --> |
|
362 |
|
|
363 |
<!-- begin the footer area --> |
|
364 |
<xsl:call-template name="pagefooter" /> |
|
365 |
<!-- end the footer area --> |
|
366 |
|
|
367 |
</body> |
|
368 |
</html> |
|
369 |
</xsl:template> |
|
370 |
<xsl:template name="data_use_agreement_form"> |
|
371 |
<xsl:param name="entity_name"/> |
|
372 |
<xsl:param name="URL1"/> |
|
373 |
<!-- create form to pass url to data agreement page with the entity's name and url sent along as param. form name must be unique/dynamic --> |
|
374 |
<!-- <form action="@cgi-prefix@/" method="POST"> --> |
|
375 |
<form action="http://sbcdata.lternet.edu/cgi-bin/data-use-agreement.cgi" method="POST"> |
|
376 |
<xsl:attribute name="name"> |
|
377 |
<xsl:value-of select="translate($entity_name,'()-.' ,'')" /> |
|
378 |
</xsl:attribute> |
|
379 |
<input type="hidden" name="qformat" /> |
|
380 |
<input type="hidden" name="sessionid" /> |
|
381 |
<xsl:if test="$enableediting = 'true'"> |
|
382 |
<input type="hidden" name="enableediting" value="{$enableediting}"/> |
|
383 |
</xsl:if> |
|
384 |
<input type="hidden" name="url"> |
|
385 |
<xsl:attribute name="value"> |
|
386 |
<xsl:value-of select="$URL1"/> |
|
387 |
</xsl:attribute> |
|
388 |
</input> |
|
389 |
<input type="hidden" name="entityName"> |
|
390 |
<xsl:attribute name="value"> |
|
391 |
<xsl:value-of select="$entity_name"/> |
|
392 |
</xsl:attribute> |
|
393 |
</input> |
|
394 |
<a> |
|
395 |
<xsl:attribute name="href">javascript:view_entity(document.<xsl:value-of select="translate($entity_name,'()-.' ,'')" />)</xsl:attribute> |
|
396 |
<xsl:value-of select="$entity_name"/> <!-- the entity name forms the anchor text --> |
|
397 |
</a> |
|
398 |
<br/> |
|
399 |
</form> |
|
400 |
</xsl:template> |
|
401 |
</xsl:stylesheet> |
|
402 | 0 |
lib/style/skins/sbclter/templates/xsl/resultset.xsl_20070517 | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
* '$RCSfile: resultset.xsl,v $' |
|
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: cjones $' |
|
10 |
* '$Date: 2004/10/05 23:50:46 $' |
|
11 |
* '$Revision: 1.1 $' |
|
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 |
<!-- 2006-05-01 mob: link to data entity is now a form, submits to a cgi requesting some user info, then on to data. |
|
32 |
required another javascript (original one contains metacat params) and a template to generate the form. |
|
33 |
--> |
|
34 |
|
|
35 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
|
36 |
|
|
37 |
<!-- import the header, footer, and sidebars for customized styling --> |
|
38 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pageheader.xsl"/> |
|
39 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pagefooter.xsl"/> |
|
40 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_leftsidebar.xsl"/> |
|
41 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/> |
|
42 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/loginbox.xsl"/> |
|
43 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/searchbox.xsl"/> |
|
44 |
|
|
45 |
<!-- send the resultset back to the browser styled in HTML --> |
|
46 |
<xsl:output method="html" encoding="iso-8859-1" indent="yes" standalone="yes" |
|
47 |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
48 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> |
|
49 |
|
|
50 |
<xsl:param name="sessid"/> |
|
51 |
<xsl:param name="enableediting">false</xsl:param> |
|
52 |
<!-- This parameter gets overidden by the chosen default qformat --> |
|
53 |
<xsl:param name="qformat">default</xsl:param> |
|
54 |
|
|
55 |
<!-- this param set to require a user to accept a datause agreement |
|
56 |
<xsl:param name="visit_datauseagreement">true</xsl:param> --> |
|
57 |
|
|
58 |
<!-- The main template matches the XML document root --> |
|
59 |
<xsl:template match="/"> |
|
60 |
<html> |
|
61 |
<head> |
|
62 |
<link rel="stylesheet" type="text/css" |
|
63 |
href="@style-skins-path@/{$qformat}/{$qformat}.css" /> |
|
64 |
<script language="Javascript" type="text/JavaScript" |
|
65 |
src="@style-skins-path@/{$qformat}/{$qformat}.js" /> |
|
66 |
<script language="Javascript" type="text/JavaScript" |
|
67 |
src="@style-common-path@/branding.js" /> |
|
68 |
<script language="JavaScript"> |
|
69 |
<![CDATA[ |
|
70 |
function submitform(action,form_ref) { |
|
71 |
form_ref.action.value=action; |
|
72 |
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA["; |
|
73 |
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA["; |
|
74 |
form_ref.submit(); |
|
75 |
} |
|
76 |
]]> |
|
77 |
</script> |
|
78 |
<script language="JavaScript"> |
|
79 |
<![CDATA[ |
|
80 |
function view_entity(form_ref) { |
|
81 |
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA["; |
|
82 |
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA["; |
|
83 |
form_ref.submit(); |
|
84 |
} |
|
85 |
]]> |
|
86 |
</script> |
|
87 |
|
|
88 |
|
|
89 |
</head> |
|
90 |
|
|
91 |
<body> |
|
92 |
<!-- begin the header area --> |
|
93 |
<xsl:call-template name="pageheader" /> |
|
94 |
<!-- end the header area --> |
|
95 |
|
|
96 |
<!-- begin the left sidebar area --> |
|
97 |
<xsl:call-template name="page_leftsidebar" /> |
|
98 |
<!-- end the left sidebar area --> |
|
99 |
|
|
100 |
<!-- begin the content area --> |
|
101 |
<div id="content"> |
|
102 |
|
|
103 |
<!-- begin login form area --> |
|
104 |
<xsl:call-template name="loginbox" /> |
|
105 |
<!-- end login form area --> |
|
106 |
|
|
107 |
<!-- begin search form area --> |
|
108 |
<xsl:call-template name="searchbox" /> |
|
109 |
<!-- end search form area --> |
|
110 |
|
|
111 |
|
|
112 |
<!-- begin results section (XSLT generated) --> |
|
113 |
<div id="data-catalog-area"> |
|
114 |
|
|
115 |
<!-- State how many package hits were returned --> |
|
116 |
<xsl:choose> |
|
117 |
<xsl:when test="count(resultset/document)=1"> |
|
118 |
<p> |
|
119 |
<xsl:number value="count(resultset/document)" /> data package found: |
|
120 |
</p> |
|
121 |
</xsl:when> |
|
122 |
<xsl:otherwise> |
|
123 |
<p> |
|
124 |
<xsl:number value="count(resultset/document)" /> data packages found: |
|
125 |
</p> |
|
126 |
</xsl:otherwise> |
|
127 |
</xsl:choose> |
|
128 |
|
|
129 |
<!-- This tests to see if there are returned documents, |
|
130 |
if there are not then don't show the query results --> |
|
131 |
<xsl:if test="count(resultset/document) > 0"> |
|
132 |
|
|
133 |
<!-- create the results table, and style each of the returnfield that |
|
134 |
were specified in the original query --> |
|
135 |
<table class="group group_border"> |
|
136 |
<tr> |
|
137 |
<th class="wide_column">Title</th> |
|
138 |
<th>Principal Investigators</th> |
|
139 |
<!-- <th>Organization</th> --> |
|
140 |
<th>Data Tables (no metadata)</th> |
|
141 |
<xsl:if test="$enableediting = 'true'"> |
|
142 |
<th>Actions</th> |
|
143 |
</xsl:if> |
|
144 |
</tr> |
|
145 |
|
|
146 |
<xsl:for-each select="resultset/document"> |
|
147 |
<xsl:sort select="./param[@name='dataset/title']"/> |
|
148 |
<tr> |
|
149 |
<td> |
|
150 |
<xsl:attribute name="class"> |
|
151 |
<xsl:choose> |
|
152 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
153 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
154 |
</xsl:choose> |
|
155 |
</xsl:attribute> |
|
156 |
|
|
157 |
<!-- |
|
158 |
Build a submit form to view the data package details, using hidden fields to POST the query values. |
|
159 |
--> |
|
160 |
<form action="@servlet-path@" method="POST"> |
|
161 |
<xsl:attribute name="name"> |
|
162 |
<xsl:value-of select="translate(./docid, '()-.', '')" /> |
|
163 |
</xsl:attribute> |
|
164 |
<input type="hidden" name="qformat" /> |
|
165 |
<input type="hidden" name="sessionid" /> |
|
166 |
<xsl:if test="$enableediting = 'true'"> |
|
167 |
<input type="hidden" name="enableediting" value="{$enableediting}"/> |
|
168 |
</xsl:if> |
|
169 |
<input type="hidden" name="action" value="read"/> |
|
170 |
<input type="hidden" name="docid"> |
|
171 |
<xsl:attribute name="value"> |
|
172 |
<xsl:value-of select="./docid"/> |
|
173 |
</xsl:attribute> |
|
174 |
</input> |
|
175 |
<xsl:for-each select="./relation"> |
|
176 |
<input type="hidden" name="docid"> |
|
177 |
<xsl:attribute name="value" > |
|
178 |
<xsl:value-of select="./relationdoc" /> |
|
179 |
</xsl:attribute> |
|
180 |
</input> |
|
181 |
</xsl:for-each> |
|
182 |
|
|
183 |
<!-- Create the link on the title column --> |
|
184 |
<a> |
|
185 |
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '')"/>)</xsl:attribute> |
|
186 |
<xsl:choose> |
|
187 |
<xsl:when test="./param[@name='dataset/title']!=''"> |
|
188 |
<xsl:value-of select="./param[@name='dataset/title']"/> |
|
189 |
</xsl:when> |
|
190 |
<xsl:otherwise> |
|
191 |
<xsl:value-of select="./param[@name='citation/title']"/> |
|
192 |
<xsl:value-of select="./param[@name='software/title']"/> |
|
193 |
<xsl:value-of select="./param[@name='protocol/title']"/> |
|
194 |
</xsl:otherwise> |
|
195 |
</xsl:choose> |
|
196 |
</a> |
|
197 |
|
|
198 |
<!-- Include the docid in the title output --> |
|
199 |
<xsl:text>(</xsl:text> |
|
200 |
<xsl:value-of select="./docid"/> |
|
201 |
<xsl:text>)</xsl:text> |
|
202 |
</form> |
|
203 |
</td> |
|
204 |
|
|
205 |
<!-- style the contacts returned --> |
|
206 |
<td> |
|
207 |
<xsl:attribute name="class"> |
|
208 |
<xsl:choose> |
|
209 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
210 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
211 |
</xsl:choose> |
|
212 |
</xsl:attribute> |
|
213 |
|
|
214 |
<xsl:for-each select="./param[@name='dataset/originator/individualName/surName']" > |
|
215 |
<xsl:value-of select="." /> |
|
216 |
<br /> |
|
217 |
</xsl:for-each> |
|
218 |
<xsl:for-each select="./param[@name='dataset/creator/individualName/surName']" > |
|
219 |
<xsl:value-of select="." /> |
|
220 |
<br /> |
|
221 |
</xsl:for-each> |
|
222 |
</td> |
|
223 |
|
|
224 |
<!-- style the organization returned --> |
|
225 |
<!-- |
|
226 |
<td> |
|
227 |
<xsl:attribute name="class"> |
|
228 |
<xsl:choose> |
|
229 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
230 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
231 |
</xsl:choose> |
|
232 |
</xsl:attribute> |
|
233 |
|
|
234 |
<xsl:value-of select="./param[@name='dataset/originator/organizationName']" /> |
|
235 |
<xsl:value-of select="./param[@name='dataset/creator/organizationName']" /> |
|
236 |
</td> |
|
237 |
--> |
|
238 |
|
|
239 |
<!-- style the keywords returned --> |
|
240 |
<!-- |
|
241 |
<td> |
|
242 |
<xsl:attribute name="class"> |
|
243 |
<xsl:choose> |
|
244 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
245 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
246 |
</xsl:choose> |
|
247 |
</xsl:attribute> |
|
248 |
|
|
249 |
<xsl:for-each select="./param[@name='keyword']"> |
|
250 |
<xsl:value-of select="." /> |
|
251 |
<br /> |
|
252 |
</xsl:for-each> |
|
253 |
</td> |
|
254 |
--> |
|
255 |
|
|
256 |
<!-- |
|
257 |
create links to each of this package's data entities. |
|
258 |
needed to edit the url first, then pass it to the form template with param. |
|
259 |
mob replaced this section 2006-05-01 --> |
|
260 |
<td> |
|
261 |
<xsl:attribute name="class"> |
|
262 |
<xsl:choose> |
|
263 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
264 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
265 |
</xsl:choose> |
|
266 |
</xsl:attribute> |
|
267 |
<!-- Check the url, edit string if it uses ecogrid protocol. --> |
|
268 |
<xsl:for-each select="./param[@name='dataTable/entityName']"> |
|
269 |
<xsl:variable name="entity_name" select="."/> |
|
270 |
<xsl:variable name="URL" |
|
271 |
select="following-sibling::param[@name='dataTable/physical/distribution/online/url']" /> |
|
272 |
<xsl:choose> |
|
273 |
<!-- |
|
274 |
if the content of url is to external data table --> |
|
275 |
<xsl:when test="starts-with($URL,'http')"> |
|
276 |
<xsl:variable name="URL1" select="$URL"/> |
|
277 |
<xsl:call-template name="data_use_agreement_form"> |
|
278 |
<xsl:with-param name="entity_name" select="$entity_name"/> |
|
279 |
<xsl:with-param name="URL1" select="$URL1"/> |
|
280 |
</xsl:call-template> |
|
281 |
</xsl:when> |
|
282 |
<!-- |
|
283 |
if URL uses ecogrid protocol, strip off table name, then create metacat query --> |
|
284 |
<xsl:when test="starts-with($URL,'ecogrid')"> |
|
285 |
<xsl:variable name="URLsubstr" select="substring-after($URL, 'ecogrid://')"/> |
|
286 |
<xsl:variable name="docID" select="substring-after($URLsubstr, '/')"/> |
|
287 |
<xsl:variable name="URL1"> |
|
288 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&docid=</xsl:text><xsl:value-of select="$docID"/> |
|
289 |
|
|
290 |
<!-- <xsl:text>http://sbcdata.lternet.edu/catalog/metacat?action=read&qformat=</xsl:text> |
|
291 |
<xsl:value-of select="$qformat"/> |
|
292 |
<xsl:text>&docid=</xsl:text> |
|
293 |
<xsl:value-of select="$docID"/> --> |
|
294 |
</xsl:variable> |
|
295 |
<xsl:call-template name="data_use_agreement_form"> |
|
296 |
<xsl:with-param name="entity_name" select="$entity_name"/> |
|
297 |
<xsl:with-param name="URL1" select="$URL1"/> |
|
298 |
</xsl:call-template> |
|
299 |
</xsl:when> |
|
300 |
<xsl:otherwise> |
|
301 |
<!-- |
|
302 |
else, assume the url content is the just name of a metacat table --> |
|
303 |
<xsl:variable name="URL1"> |
|
304 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text> |
|
305 |
<xsl:value-of select="$qformat"/> |
|
306 |
<xsl:text>&docid=</xsl:text> |
|
307 |
<xsl:value-of select="$URL"/> |
|
308 |
</xsl:variable> |
|
309 |
<xsl:call-template name="data_use_agreement_form"> |
|
310 |
<xsl:with-param name="entity_name" select="$entity_name"/> |
|
311 |
<xsl:with-param name="URL1" select="$URL1"/> |
|
312 |
</xsl:call-template> |
|
313 |
</xsl:otherwise> |
|
314 |
</xsl:choose> |
|
315 |
</xsl:for-each> |
|
316 |
</td> |
|
317 |
|
|
318 |
|
|
319 |
|
|
320 |
|
|
321 |
<!-- |
|
322 |
|
|
323 |
if editing is turned on, add some buttons --> |
|
324 |
<xsl:if test="$enableediting = 'true'"> |
|
325 |
<td> |
|
326 |
<xsl:attribute name="class"> |
|
327 |
<xsl:choose> |
|
328 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
329 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
330 |
</xsl:choose> |
|
331 |
</xsl:attribute> |
|
332 |
|
|
333 |
<form action="@servlet-path@" method="POST"> |
|
334 |
<input type="hidden" name="action" value="read"/> |
|
335 |
<input type="hidden" name="qformat" value="{$qformat}"/> |
|
336 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
337 |
<input type="hidden" name="docid"> |
|
338 |
<xsl:attribute name="value"> |
|
339 |
<xsl:value-of select="./docid"/> |
|
340 |
</xsl:attribute> |
|
341 |
</input> |
|
342 |
<center> |
|
343 |
<input type="SUBMIT" value=" View " name="View"> |
|
344 |
</input> |
|
345 |
</center> |
|
346 |
</form> |
|
347 |
<form action="@cgi-prefix@/register-dataset.cgi" |
|
348 |
method="POST"> |
|
349 |
<input type="hidden" name="stage" value="modify"/> |
|
350 |
<input type="hidden" name="cfg" value="{$qformat}"/> |
|
351 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
352 |
<input type="hidden" name="docid"> |
|
353 |
<xsl:attribute name="value"> |
|
354 |
<xsl:value-of select="./docid"/> |
|
355 |
</xsl:attribute> |
|
356 |
</input> |
|
357 |
<input type="SUBMIT" value=" Edit " name="Edit"> |
|
358 |
</input> |
|
359 |
</form> |
|
360 |
<form action="@cgi-prefix@/register-dataset.cgi" |
|
361 |
method="POST"> |
|
362 |
<input type="hidden" name="stage" value="delete"/> |
|
363 |
<input type="hidden" name="cfg" value="{$qformat}"/> |
|
364 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
365 |
<input type="hidden" name="docid"> |
|
366 |
<xsl:attribute name="value"> |
|
367 |
<xsl:value-of select="./docid"/> |
|
368 |
</xsl:attribute> |
|
369 |
</input> |
|
370 |
<input type="submit" value="Delete" name="Delete"> |
|
371 |
</input> |
|
372 |
</form> |
|
373 |
</td> |
|
374 |
</xsl:if> |
|
375 |
</tr> |
|
376 |
</xsl:for-each> |
|
377 |
</table> |
|
378 |
</xsl:if> |
|
379 |
|
|
380 |
</div> <!-- end data-catalog-area --> |
|
381 |
</div> |
|
382 |
<!-- end content area --> |
|
383 |
|
|
384 |
<!-- begin the right sidebar area --> |
|
385 |
<xsl:call-template name="page_rightsidebar" /> |
|
386 |
<!-- end the right sidebar area --> |
|
387 |
|
|
388 |
<!-- begin the footer area --> |
|
389 |
<xsl:call-template name="pagefooter" /> |
|
390 |
<!-- end the footer area --> |
|
391 |
|
|
392 |
</body> |
|
393 |
</html> |
|
394 |
</xsl:template> |
|
395 |
<!-- |
|
396 |
|
|
397 |
|
|
398 |
template to display data use agreement form. |
|
399 |
mob, 2006-05-01 --> |
|
400 |
<xsl:template name="data_use_agreement_form"> |
|
401 |
<xsl:param name="entity_name"/> |
|
402 |
<xsl:param name="URL1"/> |
|
403 |
<!-- create form to pass url and entity's name to cgi with data agreement page. form name must be unique/dynamic --> |
|
404 |
<form action="@cgi-prefix@/data-use-agreement.cgi" method="POST"> |
|
405 |
<!-- <form action="http://sbcdata.lternet.edu/cgi-bin/data-use-agreement.cgi" method="POST"> --> |
|
406 |
<xsl:attribute name="name"> |
|
407 |
<xsl:value-of select="translate($entity_name,',:()-. ' ,'')" /> |
|
408 |
</xsl:attribute> |
|
409 |
<input type="hidden" name="qformat" /> |
|
410 |
<input type="hidden" name="sessionid" /> |
|
411 |
<xsl:if test="$enableediting = 'true'"> |
|
412 |
<input type="hidden" name="enableediting" value="{$enableediting}"/> |
|
413 |
</xsl:if> |
|
414 |
<input type="hidden" name="url"> |
|
415 |
<xsl:attribute name="value"> |
|
416 |
<xsl:value-of select="$URL1"/> |
|
417 |
</xsl:attribute> |
|
418 |
</input> |
|
419 |
<input type="hidden" name="entityName"> |
|
420 |
<xsl:attribute name="value"> |
|
421 |
<xsl:value-of select="$entity_name"/> |
|
422 |
</xsl:attribute> |
|
423 |
</input> |
|
424 |
<a> |
|
425 |
<xsl:attribute name="href">javascript:view_entity(document.<xsl:value-of select="translate($entity_name,',:()-. ' ,'')" />)</xsl:attribute> |
|
426 |
<xsl:value-of select="$entity_name"/> <!-- the entity name forms the anchor text --> |
|
427 |
</a> |
|
428 |
<br/> |
|
429 |
</form> |
|
430 |
</xsl:template> |
|
431 |
</xsl:stylesheet> |
|
432 | 0 |
lib/style/skins/sbclter/templates/xsl/resultset.xsl_20041129 | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
* '$RCSfile: resultset.xsl,v $' |
|
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: cjones $' |
|
10 |
* '$Date: 2004/10/05 23:50:46 $' |
|
11 |
* '$Revision: 1.1 $' |
|
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 |
|
|
33 |
<!-- import the header, footer, and sidebars for customized styling --> |
|
34 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pageheader.xsl"/> |
|
35 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pagefooter.xsl"/> |
|
36 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_leftsidebar.xsl"/> |
|
37 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/> |
|
38 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/loginbox.xsl"/> |
|
39 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/searchbox.xsl"/> |
|
40 |
|
|
41 |
<!-- send the resultset back to the browser styled in HTML --> |
|
42 |
<xsl:output method="html" encoding="iso-8859-1" indent="yes" standalone="yes" |
|
43 |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
44 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> |
|
45 |
|
|
46 |
<xsl:param name="sessid"/> |
|
47 |
<xsl:param name="enableediting">false</xsl:param> |
|
48 |
<!-- This parameter gets overidden by the chosen default qformat --> |
|
49 |
<xsl:param name="qformat">default</xsl:param> |
|
50 |
|
|
51 |
<!-- The main template matches the XML document root --> |
|
52 |
<xsl:template match="/"> |
|
53 |
<html> |
|
54 |
<head> |
|
55 |
<link rel="stylesheet" type="text/css" |
|
56 |
href="@style-skins-path@/{$qformat}/{$qformat}.css" /> |
|
57 |
<script language="Javascript" type="text/JavaScript" |
|
58 |
src="@style-skins-path@/{$qformat}/{$qformat}.js" /> |
|
59 |
<script language="Javascript" type="text/JavaScript" |
|
60 |
src="@style-common-path@/branding.js" /> |
|
61 |
<script language="JavaScript"> |
|
62 |
<![CDATA[ |
|
63 |
function submitform(action,form_ref) { |
|
64 |
form_ref.action.value=action; |
|
65 |
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA["; |
|
66 |
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA["; |
|
67 |
form_ref.submit(); |
|
68 |
} |
|
69 |
]]> |
|
70 |
</script> |
|
71 |
</head> |
|
72 |
|
|
73 |
<body> |
|
74 |
<!-- begin the header area --> |
|
75 |
<xsl:call-template name="pageheader" /> |
|
76 |
<!-- end the header area --> |
|
77 |
|
|
78 |
<!-- begin the left sidebar area --> |
|
79 |
<xsl:call-template name="page_leftsidebar" /> |
|
80 |
<!-- end the left sidebar area --> |
|
81 |
|
|
82 |
<!-- begin the content area --> |
|
83 |
<div id="content"> |
|
84 |
|
|
85 |
<!-- begin login form area --> |
|
86 |
<xsl:call-template name="loginbox" /> |
|
87 |
<!-- end login form area --> |
|
88 |
|
|
89 |
<!-- begin search form area --> |
|
90 |
<xsl:call-template name="searchbox" /> |
|
91 |
<!-- end search form area --> |
|
92 |
|
|
93 |
|
|
94 |
<!-- begin results section (XSLT generated) --> |
|
95 |
<div id="data-catalog-area"> |
|
96 |
|
|
97 |
<!-- State how many package hits were returned --> |
|
98 |
<xsl:choose> |
|
99 |
<xsl:when test="count(resultset/document)=1"> |
|
100 |
<p> |
|
101 |
<xsl:number value="count(resultset/document)" /> data package found: |
|
102 |
</p> |
|
103 |
</xsl:when> |
|
104 |
<xsl:otherwise> |
|
105 |
<p> |
|
106 |
<xsl:number value="count(resultset/document)" /> data packages found: |
|
107 |
</p> |
|
108 |
</xsl:otherwise> |
|
109 |
</xsl:choose> |
|
110 |
|
|
111 |
<!-- This tests to see if there are returned documents, |
|
112 |
if there are not then don't show the query results --> |
|
113 |
<xsl:if test="count(resultset/document) > 0"> |
|
114 |
|
|
115 |
<!-- create the results table, and style each of the returnfield that |
|
116 |
were specified in the original query --> |
|
117 |
<table class="group group_border"> |
|
118 |
<tr> |
|
119 |
<th class="wide_column">Title (follow link for metadata)</th> |
|
120 |
<th>Owners</th> |
|
121 |
<th>Organization</th> |
|
122 |
<th>Data Tables (no metadata)</th> |
|
123 |
<xsl:if test="$enableediting = 'true'"> |
|
124 |
<th>Actions</th> |
|
125 |
</xsl:if> |
|
126 |
</tr> |
|
127 |
|
|
128 |
<xsl:for-each select="resultset/document"> |
|
129 |
<xsl:sort select="./param[@name='dataset/title']"/> |
|
130 |
<tr> |
|
131 |
<td> |
|
132 |
<xsl:attribute name="class"> |
|
133 |
<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 |
</xsl:choose> |
|
137 |
</xsl:attribute> |
|
138 |
|
|
139 |
<!-- |
|
140 |
Build a submit form to view the data package details, using hidden |
|
141 |
fields to POST the query values. |
|
142 |
--> |
|
143 |
<form action="@servlet-path@" method="POST"> |
|
144 |
<xsl:attribute name="name"> |
|
145 |
<xsl:value-of select="translate(./docid, '()-.', '')" /> |
|
146 |
</xsl:attribute> |
|
147 |
<input type="hidden" name="qformat" /> |
|
148 |
<input type="hidden" name="sessionid" /> |
|
149 |
<xsl:if test="$enableediting = 'true'"> |
|
150 |
<input type="hidden" name="enableediting" value="{$enableediting}"/> |
|
151 |
</xsl:if> |
|
152 |
<input type="hidden" name="action" value="read"/> |
|
153 |
<input type="hidden" name="docid"> |
|
154 |
<xsl:attribute name="value"> |
|
155 |
<xsl:value-of select="./docid"/> |
|
156 |
</xsl:attribute> |
|
157 |
</input> |
|
158 |
<xsl:for-each select="./relation"> |
|
159 |
<input type="hidden" name="docid"> |
|
160 |
<xsl:attribute name="value" > |
|
161 |
<xsl:value-of select="./relationdoc" /> |
|
162 |
</xsl:attribute> |
|
163 |
</input> |
|
164 |
</xsl:for-each> |
|
165 |
|
|
166 |
<!-- Create the link on the title column --> |
|
167 |
<a> |
|
168 |
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '')"/>)</xsl:attribute> |
|
169 |
<xsl:choose> |
|
170 |
<xsl:when test="./param[@name='dataset/title']!=''"> |
|
171 |
<xsl:value-of select="./param[@name='dataset/title']"/> |
|
172 |
</xsl:when> |
|
173 |
<xsl:otherwise> |
|
174 |
<xsl:value-of select="./param[@name='citation/title']"/> |
|
175 |
<xsl:value-of select="./param[@name='software/title']"/> |
|
176 |
<xsl:value-of select="./param[@name='protocol/title']"/> |
|
177 |
</xsl:otherwise> |
|
178 |
</xsl:choose> |
|
179 |
</a> |
|
180 |
|
|
181 |
<!-- Include the docid in the title output --> |
|
182 |
<xsl:text>(</xsl:text> |
|
183 |
<xsl:value-of select="./docid"/> |
|
184 |
<xsl:text>)</xsl:text> |
|
185 |
</form> |
|
186 |
</td> |
|
187 |
|
|
188 |
<!-- style the contacts returned --> |
|
189 |
<td> |
|
190 |
<xsl:attribute name="class"> |
|
191 |
<xsl:choose> |
|
192 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
193 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
194 |
</xsl:choose> |
|
195 |
</xsl:attribute> |
|
196 |
|
|
197 |
<xsl:for-each select="./param[@name='originator/individualName/surName']" > |
|
198 |
<xsl:value-of select="." /> |
|
199 |
<br /> |
|
200 |
</xsl:for-each> |
|
201 |
<xsl:for-each select="./param[@name='creator/individualName/surName']" > |
|
202 |
<xsl:value-of select="." /> |
|
203 |
<br /> |
|
204 |
</xsl:for-each> |
|
205 |
</td> |
|
206 |
|
|
207 |
<!-- style the contacts returned --> |
|
208 |
<td> |
|
209 |
<xsl:attribute name="class"> |
|
210 |
<xsl:choose> |
|
211 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
212 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
213 |
</xsl:choose> |
|
214 |
</xsl:attribute> |
|
215 |
|
|
216 |
<xsl:value-of select="./param[@name='originator/organizationName']" /> |
|
217 |
<xsl:value-of select="./param[@name='creator/organizationName']" /> |
|
218 |
</td> |
|
219 |
|
|
220 |
<!-- style the keywords returned --> |
|
221 |
<!-- |
|
222 |
<td> |
|
223 |
<xsl:attribute name="class"> |
|
224 |
<xsl:choose> |
|
225 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
226 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
227 |
</xsl:choose> |
|
228 |
</xsl:attribute> |
|
229 |
|
|
230 |
<xsl:for-each select="./param[@name='keyword']"> |
|
231 |
<xsl:value-of select="." /> |
|
232 |
<br /> |
|
233 |
</xsl:for-each> |
|
234 |
</td> |
|
235 |
--> |
|
236 |
|
|
237 |
<!-- create links to each of the associated raw data entities --> |
|
238 |
<td> |
|
239 |
<xsl:attribute name="class"> |
|
240 |
<xsl:choose> |
|
241 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
242 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
243 |
</xsl:choose> |
|
244 |
</xsl:attribute> |
|
245 |
<!-- take each entity name and link it to the physical object url--> |
|
246 |
<xsl:for-each select="./param[@name='dataTable/entityName']"> |
|
247 |
<a> |
|
248 |
<xsl:variable name="URL" |
|
249 |
select="following-sibling::param[@name='dataTable/physical/distribution/online/url']" /> |
|
250 |
|
|
251 |
<xsl:choose> |
|
252 |
<!-- if contents is a url to external data table --> |
|
253 |
<xsl:when test="starts-with($URL,'http')"> |
|
254 |
<xsl:attribute name="href"><xsl:value-of select="$URL"/></xsl:attribute> |
|
255 |
</xsl:when> |
|
256 |
|
|
257 |
<!-- strip out the ecogrid:// syntax if it's there, and the rest is in metacat --> |
|
258 |
<xsl:when test="starts-with($URL,'ecogrid')"> |
|
259 |
<xsl:variable name="URL1" select="substring-after($URL, 'ecogrid://')"/> |
|
260 |
<xsl:variable name="docID" select="substring-after($URL1, '/')"/> |
|
261 |
<xsl:attribute name="href"> |
|
262 |
<!-- this needs to be on one line ... --> |
|
263 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&docid=</xsl:text><xsl:value-of select="$docID"/> |
|
264 |
</xsl:attribute> |
|
265 |
</xsl:when> |
|
266 |
|
|
267 |
<!-- otherwise, assume the url field names a metacat table --> |
|
268 |
<xsl:otherwise> |
|
269 |
<xsl:attribute name="href"> |
|
270 |
<!-- this needs to be on one line --> |
|
271 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&docid=</xsl:text><xsl:value-of select="$URL"/> |
|
272 |
</xsl:attribute> |
|
273 |
</xsl:otherwise> |
|
274 |
</xsl:choose> |
|
275 |
|
|
276 |
<!-- show the entityName value as the link --> |
|
277 |
<xsl:value-of select="." /> |
|
278 |
</a> |
|
279 |
<br /> |
|
280 |
</xsl:for-each> |
|
281 |
</td> |
|
282 |
|
|
283 |
<xsl:if test="$enableediting = 'true'"> |
|
284 |
<td> |
|
285 |
<xsl:attribute name="class"> |
|
286 |
<xsl:choose> |
|
287 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
288 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
289 |
</xsl:choose> |
|
290 |
</xsl:attribute> |
|
291 |
|
|
292 |
<form action="@servlet-path@" method="POST"> |
|
293 |
<input type="hidden" name="action" value="read"/> |
|
294 |
<input type="hidden" name="qformat" value="{$qformat}"/> |
|
295 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
296 |
<input type="hidden" name="docid"> |
|
297 |
<xsl:attribute name="value"> |
|
298 |
<xsl:value-of select="./docid"/> |
|
299 |
</xsl:attribute> |
|
300 |
</input> |
|
301 |
<center> |
|
302 |
<input type="SUBMIT" value=" View " name="View"> |
|
303 |
</input> |
|
304 |
</center> |
|
305 |
</form> |
|
306 |
<form action="@cgi-prefix@/register-dataset.cgi" |
|
307 |
method="POST"> |
|
308 |
<input type="hidden" name="stage" value="modify"/> |
|
309 |
<input type="hidden" name="cfg" value="{$qformat}"/> |
|
310 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
311 |
<input type="hidden" name="docid"> |
|
312 |
<xsl:attribute name="value"> |
|
313 |
<xsl:value-of select="./docid"/> |
|
314 |
</xsl:attribute> |
|
315 |
</input> |
|
316 |
<input type="SUBMIT" value=" Edit " name="Edit"> |
|
317 |
</input> |
|
318 |
</form> |
|
319 |
<form action="@cgi-prefix@/register-dataset.cgi" |
|
320 |
method="POST"> |
|
321 |
<input type="hidden" name="stage" value="delete"/> |
|
322 |
<input type="hidden" name="cfg" value="{$qformat}"/> |
|
323 |
<input type="hidden" name="sessionid" value="{$sessid}"/> |
|
324 |
<input type="hidden" name="docid"> |
|
325 |
<xsl:attribute name="value"> |
|
326 |
<xsl:value-of select="./docid"/> |
|
327 |
</xsl:attribute> |
|
328 |
</input> |
|
329 |
<input type="submit" value="Delete" name="Delete"> |
|
330 |
</input> |
|
331 |
</form> |
|
332 |
</td> |
|
333 |
</xsl:if> |
|
334 |
</tr> |
|
335 |
</xsl:for-each> |
|
336 |
</table> |
|
337 |
</xsl:if> |
|
338 |
|
|
339 |
</div> <!-- end data-catalog-area --> |
|
340 |
</div> |
|
341 |
<!-- end content area --> |
|
342 |
|
|
343 |
<!-- begin the right sidebar area --> |
|
344 |
<xsl:call-template name="page_rightsidebar" /> |
|
345 |
<!-- end the right sidebar area --> |
|
346 |
|
|
347 |
<!-- begin the footer area --> |
|
348 |
<xsl:call-template name="pagefooter" /> |
|
349 |
<!-- end the footer area --> |
|
350 |
|
|
351 |
</body> |
|
352 |
</html> |
|
353 |
</xsl:template> |
|
354 |
|
|
355 |
</xsl:stylesheet> |
|
356 | 0 |
lib/style/skins/sbclter/templates/xsl/resultset.xsl_20060202 | ||
---|---|---|
1 |
<?xml version="1.0"?> |
|
2 |
<!-- |
|
3 |
* '$RCSfile: resultset.xsl,v $' |
|
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: cjones $' |
|
10 |
* '$Date: 2004/10/05 23:50:46 $' |
|
11 |
* '$Revision: 1.1 $' |
|
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 |
|
|
33 |
<!-- import the header, footer, and sidebars for customized styling --> |
|
34 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pageheader.xsl"/> |
|
35 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/pagefooter.xsl"/> |
|
36 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_leftsidebar.xsl"/> |
|
37 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/page_rightsidebar.xsl"/> |
|
38 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/loginbox.xsl"/> |
|
39 |
<xsl:import href="@systemidserver@@style-skins-path@/@default-style@/templates/xsl/searchbox.xsl"/> |
|
40 |
|
|
41 |
<!-- send the resultset back to the browser styled in HTML --> |
|
42 |
<xsl:output method="html" encoding="iso-8859-1" indent="yes" standalone="yes" |
|
43 |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
44 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" /> |
|
45 |
|
|
46 |
<xsl:param name="sessid"/> |
|
47 |
<xsl:param name="enableediting">false</xsl:param> |
|
48 |
<!-- This parameter gets overidden by the chosen default qformat --> |
|
49 |
<xsl:param name="qformat">default</xsl:param> |
|
50 |
|
|
51 |
<!-- The main template matches the XML document root --> |
|
52 |
<xsl:template match="/"> |
|
53 |
<html> |
|
54 |
<head> |
|
55 |
<link rel="stylesheet" type="text/css" |
|
56 |
href="@style-skins-path@/{$qformat}/{$qformat}.css" /> |
|
57 |
<script language="Javascript" type="text/JavaScript" |
|
58 |
src="@style-skins-path@/{$qformat}/{$qformat}.js" /> |
|
59 |
<script language="Javascript" type="text/JavaScript" |
|
60 |
src="@style-common-path@/branding.js" /> |
|
61 |
<script language="JavaScript"> |
|
62 |
<![CDATA[ |
|
63 |
function submitform(action,form_ref) { |
|
64 |
form_ref.action.value=action; |
|
65 |
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA["; |
|
66 |
form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA["; |
|
67 |
form_ref.submit(); |
|
68 |
} |
|
69 |
]]> |
|
70 |
</script> |
|
71 |
</head> |
|
72 |
|
|
73 |
<body> |
|
74 |
<!-- begin the header area --> |
|
75 |
<xsl:call-template name="pageheader" /> |
|
76 |
<!-- end the header area --> |
|
77 |
|
|
78 |
<!-- begin the left sidebar area --> |
|
79 |
<xsl:call-template name="page_leftsidebar" /> |
|
80 |
<!-- end the left sidebar area --> |
|
81 |
|
|
82 |
<!-- begin the content area --> |
|
83 |
<div id="content"> |
|
84 |
|
|
85 |
<!-- begin login form area --> |
|
86 |
<xsl:call-template name="loginbox" /> |
|
87 |
<!-- end login form area --> |
|
88 |
|
|
89 |
<!-- begin search form area --> |
|
90 |
<xsl:call-template name="searchbox" /> |
|
91 |
<!-- end search form area --> |
|
92 |
|
|
93 |
|
|
94 |
<!-- begin results section (XSLT generated) --> |
|
95 |
<div id="data-catalog-area"> |
|
96 |
|
|
97 |
<!-- State how many package hits were returned --> |
|
98 |
<xsl:choose> |
|
99 |
<xsl:when test="count(resultset/document)=1"> |
|
100 |
<p> |
|
101 |
<xsl:number value="count(resultset/document)" /> data package found: |
|
102 |
</p> |
|
103 |
</xsl:when> |
|
104 |
<xsl:otherwise> |
|
105 |
<p> |
|
106 |
<xsl:number value="count(resultset/document)" /> data packages found: |
|
107 |
</p> |
|
108 |
</xsl:otherwise> |
|
109 |
</xsl:choose> |
|
110 |
|
|
111 |
<!-- This tests to see if there are returned documents, |
|
112 |
if there are not then don't show the query results --> |
|
113 |
<xsl:if test="count(resultset/document) > 0"> |
|
114 |
|
|
115 |
<!-- create the results table, and style each of the returnfield that |
|
116 |
were specified in the original query --> |
|
117 |
<table class="group group_border"> |
|
118 |
<tr> |
|
119 |
<th class="wide_column">Title (follow link for metadata)</th> |
|
120 |
<th>Principal Investigators</th> |
|
121 |
<!-- <th>Organization</th> --> |
|
122 |
<th>Data Tables (no metadata)</th> |
|
123 |
<xsl:if test="$enableediting = 'true'"> |
|
124 |
<th>Actions</th> |
|
125 |
</xsl:if> |
|
126 |
</tr> |
|
127 |
|
|
128 |
<xsl:for-each select="resultset/document"> |
|
129 |
<xsl:sort select="./param[@name='dataset/title']"/> |
|
130 |
<tr> |
|
131 |
<td> |
|
132 |
<xsl:attribute name="class"> |
|
133 |
<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 |
</xsl:choose> |
|
137 |
</xsl:attribute> |
|
138 |
|
|
139 |
<!-- |
|
140 |
Build a submit form to view the data package details, using hidden |
|
141 |
fields to POST the query values. |
|
142 |
--> |
|
143 |
<form action="@servlet-path@" method="POST"> |
|
144 |
<xsl:attribute name="name"> |
|
145 |
<xsl:value-of select="translate(./docid, '()-.', '')" /> |
|
146 |
</xsl:attribute> |
|
147 |
<input type="hidden" name="qformat" /> |
|
148 |
<input type="hidden" name="sessionid" /> |
|
149 |
<xsl:if test="$enableediting = 'true'"> |
|
150 |
<input type="hidden" name="enableediting" value="{$enableediting}"/> |
|
151 |
</xsl:if> |
|
152 |
<input type="hidden" name="action" value="read"/> |
|
153 |
<input type="hidden" name="docid"> |
|
154 |
<xsl:attribute name="value"> |
|
155 |
<xsl:value-of select="./docid"/> |
|
156 |
</xsl:attribute> |
|
157 |
</input> |
|
158 |
<xsl:for-each select="./relation"> |
|
159 |
<input type="hidden" name="docid"> |
|
160 |
<xsl:attribute name="value" > |
|
161 |
<xsl:value-of select="./relationdoc" /> |
|
162 |
</xsl:attribute> |
|
163 |
</input> |
|
164 |
</xsl:for-each> |
|
165 |
|
|
166 |
<!-- Create the link on the title column --> |
|
167 |
<a> |
|
168 |
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '')"/>)</xsl:attribute> |
|
169 |
<xsl:choose> |
|
170 |
<xsl:when test="./param[@name='dataset/title']!=''"> |
|
171 |
<xsl:value-of select="./param[@name='dataset/title']"/> |
|
172 |
</xsl:when> |
|
173 |
<xsl:otherwise> |
|
174 |
<xsl:value-of select="./param[@name='citation/title']"/> |
|
175 |
<xsl:value-of select="./param[@name='software/title']"/> |
|
176 |
<xsl:value-of select="./param[@name='protocol/title']"/> |
|
177 |
</xsl:otherwise> |
|
178 |
</xsl:choose> |
|
179 |
</a> |
|
180 |
|
|
181 |
<!-- Include the docid in the title output --> |
|
182 |
<xsl:text>(</xsl:text> |
|
183 |
<xsl:value-of select="./docid"/> |
|
184 |
<xsl:text>)</xsl:text> |
|
185 |
</form> |
|
186 |
</td> |
|
187 |
|
|
188 |
<!-- style the contacts returned --> |
|
189 |
<td> |
|
190 |
<xsl:attribute name="class"> |
|
191 |
<xsl:choose> |
|
192 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
193 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
194 |
</xsl:choose> |
|
195 |
</xsl:attribute> |
|
196 |
|
|
197 |
<xsl:for-each select="./param[@name='dataset/originator/individualName/surName']" > |
|
198 |
<xsl:value-of select="." /> |
|
199 |
<br /> |
|
200 |
</xsl:for-each> |
|
201 |
<xsl:for-each select="./param[@name='dataset/creator/individualName/surName']" > |
|
202 |
<xsl:value-of select="." /> |
|
203 |
<br /> |
|
204 |
</xsl:for-each> |
|
205 |
</td> |
|
206 |
|
|
207 |
<!-- style the organization returned --> |
|
208 |
<!-- |
|
209 |
<td> |
|
210 |
<xsl:attribute name="class"> |
|
211 |
<xsl:choose> |
|
212 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
213 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
214 |
</xsl:choose> |
|
215 |
</xsl:attribute> |
|
216 |
|
|
217 |
<xsl:value-of select="./param[@name='dataset/originator/organizationName']" /> |
|
218 |
<xsl:value-of select="./param[@name='dataset/creator/organizationName']" /> |
|
219 |
</td> |
|
220 |
--> |
|
221 |
|
|
222 |
<!-- style the keywords returned --> |
|
223 |
<!-- |
|
224 |
<td> |
|
225 |
<xsl:attribute name="class"> |
|
226 |
<xsl:choose> |
|
227 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
228 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
229 |
</xsl:choose> |
|
230 |
</xsl:attribute> |
|
231 |
|
|
232 |
<xsl:for-each select="./param[@name='keyword']"> |
|
233 |
<xsl:value-of select="." /> |
|
234 |
<br /> |
|
235 |
</xsl:for-each> |
|
236 |
</td> |
|
237 |
--> |
|
238 |
|
|
239 |
<!-- create links to each of the associated raw data entities --> |
|
240 |
<td> |
|
241 |
<xsl:attribute name="class"> |
|
242 |
<xsl:choose> |
|
243 |
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when> |
|
244 |
<xsl:when test="position() mod 2 = 0">roweven</xsl:when> |
|
245 |
</xsl:choose> |
|
246 |
</xsl:attribute> |
|
247 |
<!-- take each entity name and link it to the physical object url--> |
|
248 |
<xsl:for-each select="./param[@name='dataTable/entityName']"> |
|
249 |
<a> |
|
250 |
<xsl:variable name="URL" |
|
251 |
select="following-sibling::param[@name='dataTable/physical/distribution/online/url']" /> |
|
252 |
|
|
253 |
<xsl:choose> |
|
254 |
<!-- if contents is a url to external data table --> |
|
255 |
<xsl:when test="starts-with($URL,'http')"> |
|
256 |
<xsl:attribute name="href"><xsl:value-of select="$URL"/></xsl:attribute> |
|
257 |
</xsl:when> |
|
258 |
|
|
259 |
<!-- strip out the ecogrid:// syntax if it's there, and the rest is in metacat --> |
|
260 |
<xsl:when test="starts-with($URL,'ecogrid')"> |
|
261 |
<xsl:variable name="URL1" select="substring-after($URL, 'ecogrid://')"/> |
|
262 |
<xsl:variable name="docID" select="substring-after($URL1, '/')"/> |
|
263 |
<xsl:attribute name="href"> |
|
264 |
<!-- this needs to be on one line ... --> |
|
265 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&docid=</xsl:text><xsl:value-of select="$docID"/> |
|
266 |
</xsl:attribute> |
|
267 |
</xsl:when> |
|
268 |
|
|
269 |
<!-- otherwise, assume the url field names a metacat table --> |
|
270 |
<xsl:otherwise> |
|
271 |
<xsl:attribute name="href"> |
|
272 |
<!-- this needs to be on one line --> |
|
273 |
<xsl:text>@systemidserver@@servlet-path@?action=read&qformat=</xsl:text><xsl:value-of select="$qformat"/><xsl:text>&docid=</xsl:text><xsl:value-of select="$URL"/> |
Also available in: Unified diff
Remove backed up resultset.xsl files