Project

General

Profile

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: leinfelder $'
10
*     '$Date: 2007-10-25 20:16:38 -0700 (Thu, 25 Oct 2007) $'
11
* '$Revision: 3531 $'
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"><xsl:number value="count(resultset/document)" /> found</p>      
51
      
52
		<!-- This tests to see if there are returned documents,
53
            if there are not then don't show the query results -->
54

    
55
		<xsl:if test="count(resultset/document) &gt; 0">
56

    
57
			<table width="95%" align="left" border="0" cellpadding="0"
58
				cellspacing="0">
59
				<tr>
60
					<th style="text-align: left">
61
						Assessment Title
62
					</th>
63
					<th style="text-align: left">
64
						Course Title
65
					</th>
66
					<th	style="text-align: left">
67
						Instructor[s]
68
					</th>
69
					<th	style="text-align: left">
70
						Organization[s]
71
					</th>
72
					<th	style="text-align: left">
73
						Keywords
74
					</th>
75
				</tr>
76

    
77
				<xsl:for-each select="resultset/document">
78
					<xsl:sort select="./param[@name='assessment/@assessmentId']" />
79
					<tr valign="top" class="subpanel">
80
						<xsl:attribute name="class">
81
               <xsl:choose>
82
                 <xsl:when test="position() mod 2 = 1">rowodd</xsl:when>
83
                 <xsl:when test="position() mod 2 = 0">roweven</xsl:when>
84
               </xsl:choose>
85
             </xsl:attribute>
86

    
87
						<td class="text_plain">
88
							<form action="/knb/metacat" method="POST">
89
								<xsl:attribute name="name">
90
                   <xsl:value-of
91
										select="translate(./docid, '()-.', '____')" />
92
                 </xsl:attribute>
93

    
94
								<input type="hidden" name="qformat" value="first" />
95
								<input type="hidden" name="sessionid" />
96
								<xsl:if
97
									test="$enableediting = 'true'">
98
									<input type="hidden"
99
										name="enableediting" value="{$enableediting}" />
100
								</xsl:if>
101
								<input type="hidden" name="action"
102
									value="read" />
103
								<input type="hidden" name="docid">
104
									<xsl:attribute name="value">
105
                     <xsl:value-of select="./docid" />
106
                   </xsl:attribute>
107
								</input>
108
								<xsl:for-each select="./relation">
109
									<input type="hidden" name="docid">
110
										<xsl:attribute name="value">
111
                       <xsl:value-of select="./relationdoc" />
112
                     </xsl:attribute>
113
									</input>
114
								</xsl:for-each>
115

    
116
								<a>
117
									<xsl:attribute name="href">javascript:submitform('read',document.<xsl:value-of select="translate(./docid, '()-.', '____')" />)</xsl:attribute>
118
									<xsl:text>&#187;&#160;</xsl:text>
119
									<xsl:value-of select="./param[@name='assessment/@assessmentTitle']" />
120
									<!-- <xsl:value-of select="./param[@name='assessment/@assessmentId']" />) -->
121
								</a>
122
								(<xsl:value-of select="./docid" />)
123
							</form>
124
						</td>
125

    
126
						<td class="text_plain">
127
							<xsl:for-each
128
								select="./param[@name='lom/general/title/string']">
129
								<xsl:value-of select="." />
130
								<br />
131
							</xsl:for-each>
132
						</td>
133
						<td class="text_plain">
134
							<xsl:for-each
135
								select="./param[@name='individualName/surName']">
136
								<xsl:value-of select="." />
137
								<br />
138
							</xsl:for-each>
139
						</td>
140
						<td class="text_plain">
141
							<xsl:for-each
142
								select="./param[@name='organizationName']">
143
								<xsl:value-of select="." />
144
								<br />
145
							</xsl:for-each>
146
						</td>
147

    
148
						<td class="text_plain">
149
							<xsl:for-each
150
								select="./param[@name='keyword']">
151
								<xsl:value-of select="." />
152
								<br />
153
							</xsl:for-each>
154
							<xsl:for-each
155
								select="./param[@name='lom/general/keyword/string']">
156
								<xsl:value-of select="." />
157
								<br />
158
							</xsl:for-each>
159

    
160
						</td>
161

    
162
					</tr>
163
					<tr class="searchresultsdivider">
164
						<td colspan="5">
165
							<img
166
								src="/knb/style/skins/default/images/transparent1x1.gif"
167
								width="1" height="1" />
168
						</td>
169
					</tr>
170

    
171
				</xsl:for-each>
172
			</table>
173

    
174
		</xsl:if>
175
	</xsl:template>
176

    
177
</xsl:stylesheet>
(1-1/9)