1 |
3531
|
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 |
|
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
32 |
|
|
|
33 |
|
|
<xsl:output method="html" />
|
34 |
|
|
<xsl:param name="sessid" />
|
35 |
|
|
<xsl:param name="qformat">default</xsl:param>
|
36 |
|
|
<xsl:param name="enableediting">false</xsl:param>
|
37 |
|
|
<xsl:template match="/">
|
38 |
|
|
<script language="JavaScript">
|
39 |
|
|
<![CDATA[
|
40 |
|
|
submitform = function(action,form_ref) {
|
41 |
|
|
form_ref.action.value=action;
|
42 |
|
|
form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA[";
|
43 |
|
|
//form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA[";
|
44 |
|
|
form_ref.submit();
|
45 |
|
|
}
|
46 |
|
|
|
47 |
|
|
]]>
|
48 |
|
|
</script>
|
49 |
|
|
|
50 |
|
|
<p class="emphasis">
|
51 |
|
|
<xsl:number value="count(resultset/document)" /> items found
|
52 |
|
|
</p>
|
53 |
|
|
|
54 |
|
|
<!-- This tests to see if there are returned documents,
|
55 |
|
|
if there are not then don't show the query results -->
|
56 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
57 |
|
|
|
58 |
|
|
<table width="95%" align="left" border="0" cellpadding="0"
|
59 |
|
|
cellspacing="0">
|
60 |
|
|
|
61 |
|
|
<xsl:for-each select="resultset/document">
|
62 |
|
|
<xsl:sort select="./param[@name='item/@title']" />
|
63 |
|
|
<tr valign="top">
|
64 |
|
|
<xsl:attribute name="class">
|
65 |
|
|
<xsl:choose>
|
66 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
67 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
68 |
|
|
</xsl:choose>
|
69 |
|
|
</xsl:attribute>
|
70 |
|
|
|
71 |
|
|
<td class="text_plain">
|
72 |
|
|
<a>
|
73 |
|
|
<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '____')" />)</xsl:attribute>
|
74 |
|
|
<xsl:text>» </xsl:text>
|
75 |
|
|
<xsl:value-of select="./param[@name='item/@title']" />
|
76 |
|
|
<!-- <xsl:value-of select="./param[@name='item/@ident']" />-->
|
77 |
|
|
</a>
|
78 |
|
|
(<xsl:value-of select="./docid" />)
|
79 |
|
|
<form action="/knb/metacat" method="POST">
|
80 |
|
|
<xsl:attribute name="name">
|
81 |
|
|
<xsl:value-of select="translate(./docid, '()-.', '____')" />
|
82 |
|
|
</xsl:attribute>
|
83 |
|
|
|
84 |
|
|
<input type="hidden" name="qformat" value="first"/>
|
85 |
|
|
<input type="hidden" name="sessionid" />
|
86 |
|
|
<xsl:if test="$enableediting = 'true'">
|
87 |
|
|
<input type="hidden"
|
88 |
|
|
name="enableediting" value="{$enableediting}" />
|
89 |
|
|
</xsl:if>
|
90 |
|
|
<input type="hidden" name="action" value="read" />
|
91 |
|
|
<input type="hidden" name="docid">
|
92 |
|
|
<xsl:attribute name="value">
|
93 |
|
|
<xsl:value-of select="./docid" />
|
94 |
|
|
</xsl:attribute>
|
95 |
|
|
</input>
|
96 |
|
|
<xsl:for-each select="./relation">
|
97 |
|
|
<input type="hidden" name="docid">
|
98 |
|
|
<xsl:attribute name="value">
|
99 |
|
|
<xsl:value-of select="./relationdoc" />
|
100 |
|
|
</xsl:attribute>
|
101 |
|
|
</input>
|
102 |
|
|
</xsl:for-each>
|
103 |
|
|
</form>
|
104 |
|
|
</td>
|
105 |
|
|
|
106 |
|
|
<td class="text_plain">
|
107 |
|
|
<xsl:value-of select="./param[@name='presentation/flow/material/mattext']"/>
|
108 |
|
|
|
109 |
|
|
<ul>
|
110 |
|
|
<xsl:for-each
|
111 |
|
|
select="./param[@name='response_label/flow_mat/material/mattext']">
|
112 |
|
|
<li>
|
113 |
|
|
<xsl:value-of select="." />
|
114 |
|
|
</li>
|
115 |
|
|
</xsl:for-each>
|
116 |
|
|
</ul>
|
117 |
|
|
</td>
|
118 |
|
|
|
119 |
|
|
<td>
|
120 |
|
|
<table>
|
121 |
|
|
<tr>
|
122 |
|
|
<td class="text_plain" colspan="2">
|
123 |
|
|
Metadata:
|
124 |
|
|
</td>
|
125 |
|
|
</tr>
|
126 |
|
|
<tr>
|
127 |
|
|
<td class="text_plain">
|
128 |
|
|
<xsl:for-each
|
129 |
|
|
select="./param[@name='fieldlabel']">
|
130 |
|
|
<xsl:value-of select="." />
|
131 |
|
|
<br />
|
132 |
|
|
</xsl:for-each>
|
133 |
|
|
</td>
|
134 |
|
|
|
135 |
|
|
<td class="text_plain">
|
136 |
|
|
<xsl:for-each
|
137 |
|
|
select="./param[@name='fieldentry']">
|
138 |
|
|
<xsl:value-of select="." />
|
139 |
|
|
<br />
|
140 |
|
|
</xsl:for-each>
|
141 |
|
|
</td>
|
142 |
|
|
</tr>
|
143 |
|
|
</table>
|
144 |
|
|
</td>
|
145 |
|
|
|
146 |
|
|
</tr>
|
147 |
|
|
<!--
|
148 |
|
|
<tr>
|
149 |
|
|
<td class="text_plain">
|
150 |
|
|
<xsl:for-each
|
151 |
|
|
select="./param[@name='objectives/material/mattext']">
|
152 |
|
|
<xsl:value-of select="." />
|
153 |
|
|
<br />
|
154 |
|
|
</xsl:for-each>
|
155 |
|
|
</td>
|
156 |
|
|
</tr>
|
157 |
|
|
-->
|
158 |
|
|
<tr class="searchresultsdivider">
|
159 |
|
|
<td colspan="3">
|
160 |
|
|
<img
|
161 |
|
|
src="/knb/style/skins/default/images/transparent1x1.gif"
|
162 |
|
|
width="1" height="1" />
|
163 |
|
|
</td>
|
164 |
|
|
</tr>
|
165 |
|
|
|
166 |
|
|
</xsl:for-each>
|
167 |
|
|
</table>
|
168 |
|
|
|
169 |
|
|
</xsl:if>
|
170 |
|
|
</xsl:template>
|
171 |
|
|
|
172 |
|
|
</xsl:stylesheet>
|