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 |
4271
|
leinfelder
|
<xsl:param name="contextURL"/>
|
38 |
|
|
|
39 |
3531
|
leinfelder
|
<xsl:template match="/">
|
40 |
|
|
<script language="JavaScript">
|
41 |
|
|
<![CDATA[
|
42 |
4391
|
leinfelder
|
submitItemForm = function(action,docid,formId) {
|
43 |
|
|
var form_ref = document.getElementById(formId);
|
44 |
3531
|
leinfelder
|
form_ref.action.value=action;
|
45 |
4391
|
leinfelder
|
form_ref.docid.value=docid;
|
46 |
|
|
//form_ref.sessionid.value="]]><xsl:value-of select="$sessid" /><![CDATA[";
|
47 |
3531
|
leinfelder
|
//form_ref.qformat.value="]]><xsl:value-of select="$qformat" /><![CDATA[";
|
48 |
4391
|
leinfelder
|
form_ref.qformat.value="first";
|
49 |
3531
|
leinfelder
|
form_ref.submit();
|
50 |
|
|
}
|
51 |
|
|
|
52 |
|
|
]]>
|
53 |
|
|
</script>
|
54 |
|
|
|
55 |
|
|
<p class="emphasis">
|
56 |
|
|
<xsl:number value="count(resultset/document)" /> items found
|
57 |
|
|
</p>
|
58 |
|
|
|
59 |
|
|
<!-- This tests to see if there are returned documents,
|
60 |
|
|
if there are not then don't show the query results -->
|
61 |
|
|
<xsl:if test="count(resultset/document) > 0">
|
62 |
|
|
|
63 |
4391
|
leinfelder
|
<form action="{$contextURL}/metacat" method="POST">
|
64 |
|
|
<xsl:attribute name="id">assessmentForm</xsl:attribute>
|
65 |
|
|
<input type="hidden" name="qformat" value="first"/>
|
66 |
|
|
<input type="hidden" name="sessionid">
|
67 |
|
|
<xsl:attribute name="value">
|
68 |
|
|
<xsl:value-of select="$sessid" />
|
69 |
|
|
</xsl:attribute>
|
70 |
|
|
</input>
|
71 |
|
|
<input type="hidden" name="action" value="read" />
|
72 |
|
|
<input type="hidden" name="docid"/>
|
73 |
|
|
</form>
|
74 |
5058
|
leinfelder
|
<!-- hidden form for the itemids -->
|
75 |
|
|
<form action="{$contextURL}/metacat" method="POST" name="itemIdForm" id="itemIdForm">
|
76 |
3531
|
leinfelder
|
<table width="95%" align="left" border="0" cellpadding="0"
|
77 |
|
|
cellspacing="0">
|
78 |
|
|
|
79 |
|
|
<xsl:for-each select="resultset/document">
|
80 |
|
|
<xsl:sort select="./param[@name='item/@title']" />
|
81 |
|
|
<tr valign="top">
|
82 |
|
|
<xsl:attribute name="class">
|
83 |
|
|
<xsl:choose>
|
84 |
|
|
<xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
|
85 |
|
|
<xsl:when test="position() mod 2 = 0">roweven</xsl:when>
|
86 |
|
|
</xsl:choose>
|
87 |
|
|
</xsl:attribute>
|
88 |
|
|
|
89 |
|
|
<td class="text_plain">
|
90 |
4391
|
leinfelder
|
<!--
|
91 |
3531
|
leinfelder
|
<a>
|
92 |
4391
|
leinfelder
|
<xsl:attribute name="href">javascript:submitItemForm('read','<xsl:value-of select="./docid" />', 'assessmentForm')</xsl:attribute>
|
93 |
3531
|
leinfelder
|
<xsl:text>» </xsl:text>
|
94 |
|
|
<xsl:value-of select="./param[@name='item/@title']" />
|
95 |
|
|
</a>
|
96 |
4391
|
leinfelder
|
-->
|
97 |
|
|
<a>
|
98 |
|
|
<xsl:attribute name="href">
|
99 |
|
|
<xsl:value-of select="$contextURL" />
|
100 |
|
|
<xsl:text>/metacat?action=read</xsl:text>
|
101 |
|
|
<xsl:text>&docid=</xsl:text>
|
102 |
|
|
<xsl:value-of select="./docid" />
|
103 |
|
|
<xsl:text>&qformat=first</xsl:text>
|
104 |
|
|
<xsl:text>&sessionid=</xsl:text>
|
105 |
|
|
<xsl:value-of select="$sessid" />
|
106 |
|
|
</xsl:attribute>
|
107 |
|
|
<xsl:value-of select="./param[@name='item/@title']" />
|
108 |
|
|
</a>
|
109 |
3531
|
leinfelder
|
(<xsl:value-of select="./docid" />)
|
110 |
5058
|
leinfelder
|
<input name="itemIds" id="itemIds" type="hidden" >
|
111 |
|
|
<xsl:attribute name="value">
|
112 |
|
|
<xsl:value-of select="./docid" />
|
113 |
|
|
</xsl:attribute>
|
114 |
|
|
</input>
|
115 |
4391
|
leinfelder
|
|
116 |
3531
|
leinfelder
|
</td>
|
117 |
|
|
|
118 |
|
|
<td class="text_plain">
|
119 |
4796
|
leinfelder
|
<xsl:for-each select="./param[@name='presentation/flow/response_lid/render_choice/material/mattext']">
|
120 |
4893
|
leinfelder
|
<xsl:value-of select="." disable-output-escaping="yes"/>
|
121 |
3564
|
leinfelder
|
<br/>
|
122 |
|
|
</xsl:for-each>
|
123 |
4889
|
leinfelder
|
<xsl:for-each select="./param[@name='presentation/flow/response_str/material/mattext']">
|
124 |
4893
|
leinfelder
|
<xsl:value-of select="." disable-output-escaping="yes"/>
|
125 |
4889
|
leinfelder
|
<br/>
|
126 |
|
|
</xsl:for-each>
|
127 |
4998
|
leinfelder
|
<xsl:for-each select="./param[@name='presentation/flow/material/mattext']">
|
128 |
|
|
<xsl:value-of select="." disable-output-escaping="yes"/>
|
129 |
|
|
<br/>
|
130 |
|
|
</xsl:for-each>
|
131 |
3531
|
leinfelder
|
<ul>
|
132 |
|
|
<xsl:for-each
|
133 |
3918
|
leinfelder
|
select="./param[@name='response_label/material/mattext']">
|
134 |
4998
|
leinfelder
|
<xsl:sort select="."/>
|
135 |
3531
|
leinfelder
|
<li>
|
136 |
4893
|
leinfelder
|
<xsl:value-of select="." disable-output-escaping="yes"/>
|
137 |
3531
|
leinfelder
|
</li>
|
138 |
|
|
</xsl:for-each>
|
139 |
|
|
</ul>
|
140 |
|
|
</td>
|
141 |
|
|
|
142 |
|
|
<td>
|
143 |
|
|
<table>
|
144 |
3564
|
leinfelder
|
<tr valign="top">
|
145 |
3531
|
leinfelder
|
<td class="text_plain" colspan="2">
|
146 |
3927
|
leinfelder
|
Metadata
|
147 |
3531
|
leinfelder
|
</td>
|
148 |
|
|
</tr>
|
149 |
3564
|
leinfelder
|
<tr valign="top">
|
150 |
3927
|
leinfelder
|
<td class="text_plain" colspan="2">
|
151 |
|
|
Vocabulary:
|
152 |
|
|
<xsl:for-each
|
153 |
|
|
select="./param[@name='vocabulary']">
|
154 |
|
|
<xsl:value-of select="." />
|
155 |
|
|
<br />
|
156 |
|
|
</xsl:for-each>
|
157 |
|
|
</td>
|
158 |
|
|
</tr>
|
159 |
|
|
<tr valign="top">
|
160 |
3564
|
leinfelder
|
<td class="text_plain" nowrap="nowrap">
|
161 |
3531
|
leinfelder
|
<xsl:for-each
|
162 |
|
|
select="./param[@name='fieldlabel']">
|
163 |
3927
|
leinfelder
|
<xsl:value-of select="." />:
|
164 |
3531
|
leinfelder
|
<br />
|
165 |
|
|
</xsl:for-each>
|
166 |
|
|
</td>
|
167 |
|
|
|
168 |
3564
|
leinfelder
|
<td class="text_plain" nowrap="nowrap">
|
169 |
3531
|
leinfelder
|
<xsl:for-each
|
170 |
|
|
select="./param[@name='fieldentry']">
|
171 |
|
|
<xsl:value-of select="." />
|
172 |
|
|
<br />
|
173 |
|
|
</xsl:for-each>
|
174 |
|
|
</td>
|
175 |
|
|
</tr>
|
176 |
|
|
</table>
|
177 |
|
|
</td>
|
178 |
|
|
|
179 |
|
|
</tr>
|
180 |
|
|
<!--
|
181 |
|
|
<tr>
|
182 |
|
|
<td class="text_plain">
|
183 |
|
|
<xsl:for-each
|
184 |
|
|
select="./param[@name='objectives/material/mattext']">
|
185 |
|
|
<xsl:value-of select="." />
|
186 |
|
|
<br />
|
187 |
|
|
</xsl:for-each>
|
188 |
|
|
</td>
|
189 |
|
|
</tr>
|
190 |
|
|
-->
|
191 |
|
|
<tr class="searchresultsdivider">
|
192 |
|
|
<td colspan="3">
|
193 |
|
|
<img
|
194 |
4271
|
leinfelder
|
src="{$contextURL}/style/skins/default/images/transparent1x1.gif"
|
195 |
3531
|
leinfelder
|
width="1" height="1" />
|
196 |
|
|
</td>
|
197 |
|
|
</tr>
|
198 |
|
|
|
199 |
|
|
</xsl:for-each>
|
200 |
|
|
</table>
|
201 |
5058
|
leinfelder
|
</form>
|
202 |
3531
|
leinfelder
|
|
203 |
|
|
</xsl:if>
|
204 |
|
|
</xsl:template>
|
205 |
|
|
|
206 |
|
|
</xsl:stylesheet>
|