Project

General

Profile

« Previous | Next » 

Revision 3532

organize the bulk of the stylesheets in their own xsl directory.
note that these xsl files are being maintained in the "first" cvs module and should be copied from there.

View differences:

lib/style/skins/first/edml-settings.xsl
1
<?xml version="1.0"?>
2
<!--
3
  *  '$RCSfile$'
4
  *      Authors: Matthew Brooke
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
  *****************************************************************************
28
  *
29
  * This is an XSLT (http://www.w3.org/TR/xslt) stylesheet that provides a
30
  * single, central location for setting all installation-specific paths for
31
  * XSLT stylesheets.  It is intended to be imported (using the
32
  * <xsl:import href="..." /> element) into other XSLT stylesheets used in the
33
  * transformation of xml files that are valid with respect to the
34
  * applicable dtd of the Ecological Metadata Language (EML).
35

  
36
  * Some of these paths incorporate values of the form: @token-name@; these are
37
  * intended to allow an Ant (http://jakarta.apache.org/ant/index.html) build
38
  * script to replace the tokens automatically with the correct values at build/
39
  * install time.  If Ant is not used, the tokens may simply be edited by hand
40
  * to point to the correct resources.
41
  * Note that the values given below may be overridden by passing parameters to
42
  * the XSLT processor programatically, although the procedure for doing so is
43
  * vendor-specific.  Note also that these parameter definitions will be overridden
44
  * by any identical parameter names declared within xsl stylesheets that import
45
  * this stylesheet.
46
  *
47
-->
48

  
49
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
50

  
51

  
52
<!--
53
    /**
54
    *   The filename of the default css stylesheet to be used
55
    *   (filename only - not the whole path, and no ".css" extension.  The
56
    *   example below would look for a file named "default.css" in the same
57
    *   directory as the stylesheets
58
    */
59
-->
60

  
61
  <xsl:param name="qformat">@default-style@</xsl:param>
62

  
63

  
64
<!--
65
    /**
66
    *   The module which need to be display in eml2 document. The default
67
    *   value is dataset
68
    */
69
-->
70
  <xsl:param name="displaymodule">dataset</xsl:param>
71

  
72

  
73
<!--
74
    /**
75
    *   To show the links for the Entities in the dataset display module.
76
    */
77
-->
78
  <xsl:param name="withEntityLinks">1</xsl:param>
79

  
80

  
81
<!--
82
    /**
83
    *   To show the link for Additional Metadata in the dataset display module.
84
    */
85
-->
86
  <xsl:param name="withAdditionalMetadataLink">1</xsl:param>
87

  
88

  
89
<!--
90
    /**
91
    *   To show the link for the Original XML in the dataset display module.
92
    */
93
-->
94
  <xsl:param name="withOriginalXMLLink">1</xsl:param>
95

  
96

  
97
<!--
98
    /**
99
    *   To show any html links (emails and webpage).
100
    */
101
-->
102
  <xsl:param name="withHTMLLinks">1</xsl:param>
103

  
104
<!--
105
    /**
106
    *   To show the Attributes table in the entity display.
107
    */
108
-->
109
  <xsl:param name="withAttributes">1</xsl:param>
110

  
111
<!--
112
    /**
113
    *   To insert templates where header and footer are defined.
114
    */
115
-->
116
  <xsl:param name="insertTemplate">1</xsl:param>
117

  
118

  
119
<!--
120
   /**
121
    *   the path of the directory where the XSL and CSS files reside - starts
122
    *   with context name, eg: /myContextRoot/styleDirectory.
123
    *   (As found in "http://hostname:port/myContextRoot/styleDirectory").
124
    *   Needs leading slash but not trailing slash
125
    *
126
    *   EXAMPLE:
127
    *       <xsl:param name="stylePath">/brooke/style</xsl:param>
128
    */
129
-->
130

  
131
    <xsl:param name="stylePath">@style-skins-path@</xsl:param>
132

  
133

  
134
<!--
135
   /*
136
    *   the path of the directory where the common javascript and css files
137
    *   reside - i.e the files that are not skin-specific. Starts
138
    *   with context name, eg: /myContextRoot/styleCommonDirectory.
139
    *   (As found in "http://hostname:port/myContextRoot/styleCommonDirectory").
140
    *
141
    *   EXAMPLE
142
    *       <xsl:param name="styleCommonPath">/brooke/style/common</xsl:param>
143
    */
144
-->
145

  
146
    <xsl:param name="styleCommonPath">@style-common-path@</xsl:param>
147

  
148
	
149
<!--the docid of xml which is processed-->
150
    <xsl:param name="docid"/>
151
<!-- type of entity, data table or spacial raster or others-->
152
    <xsl:param name="entitytype"></xsl:param>
153
<!-- the index of entity in same entity type -->
154
    <xsl:param name="entityindex"/>
155
<!-- the index of attribute in same entity -->
156
    <xsl:param name="attributeindex"/>
157
<!-- the index of physical part in entity part-->
158
    <xsl:param name="physicalindex"/>
159
<!-- the index of distribution in physical part  -->
160
    <xsl:param name="distributionindex"/>
161
<!-- the levle of distribution -->
162
    <xsl:param name="distributionlevel"/>
163
<!-- the index of attribute in attribute list-->
164
    <xsl:param name="attributeindex"/>
165
<!-- the index of additional metadata-->
166
    <xsl:param name="additionalmetadataindex">1</xsl:param>
167
<!-- attribute set to get rid of cell spacing-->
168
    <xsl:attribute-set name="cellspacing">
169
      <xsl:attribute name="cellpadding">0</xsl:attribute>
170
      <xsl:attribute name="cellspacing">0</xsl:attribute>
171
    </xsl:attribute-set>
172
	
173
	
174
	
175

  
176
<!-- determines whether to use metacat or LSID identiers-->
177
	<xsl:param name="lsidauthority"></xsl:param>
178
<!-- the url for the data registry of the dataset-->
179
	<xsl:param name="registryurl"></xsl:param>
180
<!-- the name of the data registry of the dataset-->
181
	<xsl:param name="registryname"></xsl:param>
182

  
183

  
184
<!--
185
    /**
186
    *   The base URI to be used for the href link to each document in a
187
    *   "subject-relationaship-object" triple
188
    *
189
    *   EXAMPLE:
190
    *       <xsl:param name="tripleURI">
191
    *         <![CDATA[/brooke/servlet/metacat?action=read&qformat=knb&docid=]]>
192
    *       </xsl:param>
193
    *
194
    *   (Note in the above case the "qformat=knb" parameter in the url; a system
195
    *   could pass this parameter to the XSLT engine to override the local
196
    *   <xsl:param name="qformat"> tags defined earlier in this document.)
197
    */
198
-->
199

  
200
    <xsl:param name="tripleURI"><![CDATA[@servlet-path@?action=read&qformat=]]><xsl:value-of select="$qformat" /><![CDATA[&docid=]]></xsl:param>
201

  
202
    <!-- URL for xmlformat-->
203
    <xsl:param name="xmlURI"><![CDATA[@servlet-path@?action=read&qformat=xml&docid=]]></xsl:param>
204

  
205

  
206
<!--
207
    /**
208
    *   Most of the html pages are currently laid out as a 2-column table, with
209
    *   highlights for more-major rows containing subsection titles etc.
210
    *   The following parameters are used within the
211
    *           <td width="whateverWidth" class="whateverClass">
212
    *   tags to define the column widths and (css) styles.
213
    *
214
    *   The values of the "xxxColWidth" parameters can be percentages (need to
215
    *   include % sign) or pixels (number only). Note that if a width is defined
216
    *   in the CSS stylesheet (see next paragraph), it will override this local
217
    *   width setting in browsers newer than NN4
218
    *
219
    *   The values of the "xxxColStyle" parameters refer to style definitions
220
    *   listed in the *.css stylesheet that is defined in this xsl document,
221
    *   above (in the <xsl:param name="qformat"> tag).
222
    *
223
    *   (Note that if the "qformat" is changed from the default by passing a
224
    *   value in the url (see notes for <xsl:param name="qformat"> tag, above),
225
    *   then the params below must match style names in the "new" CSS stylesheet
226
    */
227
-->
228

  
229
<!--    the style for major rows containing subsection titles etc. -->
230
  <xsl:param name="subHeaderStyle" select="'tablehead'"/>
231

  
232
<!--    the style for major rows containing links, such as additional metadata,
233
        original xml file etc. -->
234
  <xsl:param name="linkedHeaderStyle" select="'linkedHeaderStyle'"/>
235

  
236
<!--    the width for the first column (but see note above) -->
237
  <xsl:param name="firstColWidth" select="'15%'"/>
238

  
239
<!-- the style for the first column -->
240
  <xsl:param name="firstColStyle" select="'highlight'"/>
241

  
242
<!--    the width for the second column (but see note above) -->
243
  <xsl:param name="secondColWidth" select="'85%'"/>
244

  
245
<!-- the style for the second column -->
246
  <xsl:param name="secondColStyle" select="'secondCol'"/>
247

  
248
<!-- the style for the attribute table -->
249
  <xsl:param name="tableattributeStyle" select="'tableattribute'"/>
250

  
251
<!-- the style for the border -->
252
  <xsl:param name="borderStyle" select="'bordered'"/>
253

  
254
<!-- the style for the even col in attributes table -->
255
  <xsl:param name="colevenStyle" select="'coleven'"/>
256

  
257
<!-- the style for the inner even col in attributes table -->
258
  <xsl:param name="innercolevenStyle" select="'innercoleven'"/>
259

  
260
<!-- the style for the odd col in attributes table -->
261
  <xsl:param name="coloddStyle" select="'colodd'"/>
262

  
263
<!-- the style for the inner odd col in attributes table -->
264
  <xsl:param name="innercoloddStyle" select="'innercolodd'"/>
265

  
266

  
267
<!-- the default alignment style for the wrapper around the main tables -->
268
  <xsl:param name="mainTableAligmentStyle" select="'mainTableAligmentStyle'"/>
269

  
270
<!-- the default style for the main container table -->
271
  <xsl:param name="mainContainerTableStyle" select="'mainContainerTableStyle'"/>
272

  
273
<!-- the default style for all other tables -->
274
  <xsl:param name="tabledefaultStyle" select="'tabledefault'"/>
275

  
276
<!-- the style for table party -->
277
  <xsl:param name="tablepartyStyle" select="'tableparty'"/>
278

  
279
<!-- Some html pages use a nested table in the second column.
280
     Some of these nested tables set their first column to
281
     the following width: -->
282
  <xsl:param name="secondColIndent" select="'10%'"/>
283

  
284
<!-- the first column width of attribute table-->
285
  <xsl:param name="attributefirstColWidth" select="'15%'"/>
286

  
287
</xsl:stylesheet>
288 0

  
lib/style/skins/first/edml.xsl
1
<?xml version="1.0"?>
2
<!--
3
	*  '$RCSfile$'
4
	*      Authors: leinfelder
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 that is valid with respect to the edml.xsd
29
	* module of the Educational Metadata Language (EdML) into an HTML format
30
	* suitable for rendering with modern web browsers.
31
-->
32
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
33
	xmlns:fn="http://www.w3.org/2005/02/xpath-function"
34
	xmlns:edml="edml://ecoinformatics.org/edml"
35
	xmlns:rp="eml://ecoinformatics.org/party-2.0.1"
36
	xmlns:res="eml://ecoinformatics.org/resource-2.0.1"
37
	xmlns:lom="http://ltsc.ieee.org/xsd/LOM"
38
	xmlns:qti="http://www.imsglobal.org/xsd/ims_qtiasiv1p2"
39
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
40

  
41

  
42
	<xsl:import href="edml-settings.xsl" />
43
	<!-- 
44
		<xsl:import href="eml-additionalmetadata.xsl"/> 
45
		<xsl:import href="eml-coverage.xsl"/>
46
		<xsl:import href="eml-party.xsl"/>
47
		<xsl:import href="eml-text.xsl"/>
48
		<xsl:import href="eml-view.xsl"/>
49
	-->
50
	<xsl:output method="html" encoding="iso-8859-1"
51
		doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
52
		doctype-system="http://www.w3.org/TR/html4/loose.dtd" indent="yes" />
53
	<!-- global variables to store id node set in case to be referenced-->
54
	<xsl:variable name="ids" select="//*[@id!='']" />
55

  
56
	<xsl:template match="/">
57
		<html>
58
			<head>
59
				<title>Assessment Metadata</title>
60
				<link rel="stylesheet" type="text/css"
61
					href="{$stylePath}/{$qformat}/{$qformat}.css">
62
				</link>
63
				<script language="Javascript" type="text/JavaScript"
64
					src="{$stylePath}/{$qformat}/{$qformat}.js">
65
				</script>
66
				<script language="Javascript" type="text/JavaScript"
67
					src="{$styleCommonPath}/branding.js">
68
				</script>
69
			</head>
70
			<body>
71

  
72
				<div id="{$mainTableAligmentStyle}">
73
					<script language="JavaScript"
74
						type="text/JavaScript">
75
						<xsl:if test="$insertTemplate='0'">
76
							<xsl:comment>
77
								insertTemplateOpening();//
78
							</xsl:comment>
79
						</xsl:if>
80
						<xsl:if test="$insertTemplate='1'">
81
							insertTemplateOpening();
82
						</xsl:if>
83
					</script>
84

  
85

  
86
					<table xsl:use-attribute-sets="cellspacing" class="{$mainContainerTableStyle}">
87
						<xsl:apply-templates select="*[local-name()='edml']" />
88
					</table>
89
					<script language="JavaScript"
90
						type="text/JavaScript">
91
						<xsl:if test="$insertTemplate='0'">
92
							<xsl:comment>
93
								insertTemplateClosing();//
94
							</xsl:comment>
95
						</xsl:if>
96
						<xsl:if test="$insertTemplate='1'">
97
							insertTemplateClosing();
98
						</xsl:if>
99
					</script>
100
				</div>
101
			</body>
102
		</html>
103
	</xsl:template>
104

  
105
	<xsl:template match="*[local-name()='edml']">
106
		<tr valign="top">
107
			<td colspan="2">&#160;</td>
108
		</tr>
109
		<tr valign="top">
110
			<th colspan="2" class="tablehead">Contact Information</th>
111
		</tr>	
112
		<tr valign="top">
113
			<td>
114
				<xsl:for-each select="institution">
115
					<xsl:call-template name="institution" />
116
				</xsl:for-each>
117
			</td>
118
			<td>	
119
				<xsl:for-each select="instructor">
120
					<xsl:call-template name="instructor" />
121
				</xsl:for-each>
122
			</td>
123
		</tr>
124
		<tr valign="top">
125
			<td colspan="2">&#160;</td>
126
		</tr>
127
		<tr valign="top">
128
			<td colspan="2">		
129
				<xsl:for-each select="compositeCourse">
130
					<xsl:call-template name="course" />
131
				</xsl:for-each>
132
			</td>
133
		</tr>
134
		<tr valign="top">
135
			<td colspan="2">&#160;</td>
136
		</tr>
137
		<tr valign="top">
138
			<td colspan="2">
139
				<xsl:for-each select="compositeQTI">
140
					<xsl:call-template name="compositeQTI" />
141
				</xsl:for-each>
142
			</td>
143
		</tr>
144
	</xsl:template>
145

  
146
	<!--********************************************************
147
		institution part
148
		********************************************************-->
149
	<xsl:template name="institution">
150
		<table xsl:use-attribute-sets="cellspacing">
151
			<tr>
152
				<th colspan="2">
153
					Institution Information
154
				</th>
155
			</tr>
156
			<tr>
157
				<td width="{$firstColWidth}" class="{$firstColStyle}">Name:</td>
158
				<td><xsl:value-of select="organizationName" /></td>
159
			</tr>
160
			<tr>
161
				<td width="{$firstColWidth}" class="{$firstColStyle}">Address:</td>
162
				<td> 
163
					<xsl:value-of select="address/deliveryPoint" />
164
					<br/>
165
					<xsl:value-of select="address/city" />, 
166
					<xsl:value-of select="address/administrativeArea" />&#160;
167
					<xsl:value-of select="address/postalCode" />
168
				</td>
169
			</tr>
170
			<tr>
171
				<td width="{$firstColWidth}" class="{$firstColStyle}">Phone:</td>
172
				<td>
173
					<xsl:for-each select="phone">
174
						<xsl:value-of select="@phonetype" />: <xsl:value-of select="." />
175
						<br/>
176
					</xsl:for-each>
177
				</td>
178
			</tr>
179
			<tr>
180
				<td width="{$firstColWidth}" class="{$firstColStyle}">Email:</td>
181
				<td>
182
					<xsl:for-each select="electronicMailAddress">
183
						<xsl:value-of select="." />
184
						<br/>
185
					</xsl:for-each>
186
				</td>
187
			</tr>
188
		</table>
189
	</xsl:template>
190
	
191
	<!--********************************************************
192
		instructor part
193
		********************************************************-->
194
	<xsl:template name="instructor">
195
		<table xsl:use-attribute-sets="cellspacing">
196
			<tr>
197
				<th colspan="2">
198
					Instructor Information
199
				</th>
200
			</tr>
201
			<tr>
202
				<td width="{$firstColWidth}" class="{$firstColStyle}">Name:</td>
203
				<td>
204
					<xsl:for-each select="individualName">
205
						<xsl:value-of select="surName" />,&#160;
206
						<xsl:value-of select="givenName" />
207
						<br/>
208
					</xsl:for-each>
209
				</td>
210
			</tr>
211
			<tr>
212
				<td width="{$firstColWidth}" class="{$firstColStyle}">Organization:</td>
213
				<td><xsl:value-of select="organizationName" /></td>
214
			</tr>
215
			<tr>
216
				<td width="{$firstColWidth}" class="{$firstColStyle}">Address:</td>
217
				<td>
218
					<xsl:value-of select="address/deliveryPoint" />
219
					<br/>
220
					<xsl:value-of select="address/city" />, 
221
					<xsl:value-of select="address/administrativeArea" />&#160;
222
					<xsl:value-of select="address/postalCode" />
223
				</td>
224
			</tr>
225
			<tr>
226
				<td width="{$firstColWidth}" class="{$firstColStyle}">Phone:</td>
227
				<td>
228
					<xsl:for-each select="phone">
229
						<xsl:value-of select="@phonetype" />: <xsl:value-of select="." />
230
						<br/>
231
					</xsl:for-each>	
232
				</td>
233
			</tr>
234
			<tr>
235
				<td width="{$firstColWidth}" class="{$firstColStyle}">Email:</td>
236
				<td>
237
					<xsl:for-each select="electronicMailAddress">
238
						<xsl:value-of select="." />
239
						<br/>
240
					</xsl:for-each>			
241
				</td>
242
			</tr>
243
			
244
		</table>
245
	</xsl:template>
246

  
247
	<!--********************************************************
248
		Assessment part
249
		********************************************************-->
250
	<xsl:template name="compositeQTI">
251
		<table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}" width="100%">
252
			<tr>
253
				<th colspan="2" class="tablehead">
254
					Assessment Information
255
				</th>
256
			</tr>
257
			<xsl:for-each select="questestinterop/qti:assessment">
258
				<tr>
259
					<th colspan="2">
260
						General
261
					</th>
262
				</tr>			
263
				<tr>
264
					<td width="{$firstColWidth}" class="{$firstColStyle}">Title:</td>
265
					<td><xsl:value-of select="@title" /></td>
266
				</tr>
267
				<tr>	
268
					<td width="{$firstColWidth}" class="{$firstColStyle}">ID:</td>
269
					<td><xsl:value-of select="@ident" /></td>
270
				</tr>
271
				<tr>	
272
					<td width="{$firstColWidth}" class="{$firstColStyle}">Duration:</td>
273
					<td><xsl:value-of select="qti:duration" /></td>
274
				</tr>
275
			</xsl:for-each>
276
			
277
			<!-- additional assessment info -->
278
			<xsl:for-each select=".">
279
				<tr>
280
					<td width="{$firstColWidth}" class="{$firstColStyle}">Timing:</td>
281
					<td>
282
						Material introduced: <xsl:value-of select="timing/rangeOfDates/beginDate/calendarDate" />
283
						<br/>
284
						Material tested: <xsl:value-of select="timing/rangeOfDates/endDate/calendarDate" />
285
					</td>
286
				</tr>
287
				<tr>	
288
					<td width="{$firstColWidth}" class="{$firstColStyle}">Instructional Strategy:</td>
289
					<td>
290
						<xsl:for-each select="instructionalStrategy" >
291
							<xsl:value-of select="." />
292
							<br/>
293
						</xsl:for-each>
294
					</td>
295
				</tr>
296
				<tr>	
297
					<td width="{$firstColWidth}" class="{$firstColStyle}">Incentive[s]:</td>
298
					<td>
299
						<xsl:for-each select="incentive" >
300
							<xsl:value-of select="." />
301
							<br/>
302
						</xsl:for-each>
303
					</td>
304
				</tr>
305
				<tr>	
306
					<td width="{$firstColWidth}" class="{$firstColStyle}">Group Size:</td>
307
					<td><xsl:value-of select="groupSize" /></td>
308
				</tr>
309
				<tr>	
310
					<td width="{$firstColWidth}" class="{$firstColStyle}">Assessment File:</td>
311
					<td>
312
						<xsl:value-of select="assessmentFile/objectName" />
313
						(<xsl:value-of select="assessmentFile/dataFormat/externallyDefinedFormat/formatName" />)
314
					</td>
315
				</tr>
316
				<tr>	
317
					<td width="{$firstColWidth}" class="{$firstColStyle}">Response File:</td>
318
					<td>
319
						<xsl:value-of select="responseFile/objectName" />
320
						(<xsl:value-of select="responseFile/dataFormat/externallyDefinedFormat/formatName" />)
321
					</td>
322
				</tr>
323
				
324
				<!-- access information -->
325
				<tr valign="top">	
326
					<td width="{$firstColWidth}" class="{$firstColStyle}">Access Control:</td>
327
					<td>
328
						<table>
329
							<tr>
330
								<td colspan="2">
331
									<xsl:value-of select="access/@authSystem" />
332
								</td>
333
							</tr>
334
							<tr>
335
								<td colspan="2">Allow</td>
336
							</tr>
337
							
338
							<xsl:for-each select="access/allow">
339
								<tr>
340
									<td width="{$firstColWidth}" class="{$firstColStyle}">
341
										<xsl:for-each select="permission">
342
											<xsl:value-of select="."/>
343
											<br/>
344
										</xsl:for-each>
345
									</td>
346
									<td>
347
										<xsl:for-each select="principal">
348
											<xsl:value-of select="."/>
349
											<br/>	
350
										</xsl:for-each>
351
									</td>
352
								</tr>
353
							</xsl:for-each>
354
						</table>		
355
					</td>
356
				</tr>
357
			
358
			</xsl:for-each>	
359
				
360
			<!-- Questions below -->	
361
			<xsl:for-each select="questestinterop/qti:assessment">	
362
				<tr>
363
					<th colspan="2">Questions</th>
364
				</tr>
365
				<tr valign="top">
366
					<!-- <td width="{$firstColWidth}" class="{$firstColStyle}"></td>
367
					<td>
368
					-->
369
					<td colspan="2">
370
						<ol>
371
							<xsl:for-each select="qti:section/qti:item">
372
								<xsl:call-template name="question"/>
373
							</xsl:for-each>
374
						</ol>
375
					</td>
376
				</tr>	
377
			
378
			</xsl:for-each>
379
		</table>
380

  
381
	</xsl:template>
382
	
383
	<!--********************************************************
384
		Question item part
385
		********************************************************-->
386
	<xsl:template name="question">
387
		<li>
388
			<xsl:value-of select="@title" /> (<xsl:value-of select="@ident" />)
389
			<table>
390
				<tr>
391
					<td width="{$firstColWidth}" class="{$firstColStyle}">Prompt:</td>
392
					<td><xsl:value-of select="qti:presentation/qti:flow/qti:material/qti:mattext" /></td>
393
				</tr>
394
				
395
				<tr>
396
					<td width="{$firstColWidth}" class="{$firstColStyle}">Choices:</td>
397
					<td>
398
						<xsl:for-each select="qti:presentation/qti:flow/qti:response_lid/qti:render_choice/qti:response_label">
399
							<xsl:value-of select="@ident"/>) <xsl:value-of select="qti:flow_mat/qti:material/qti:mattext"/>
400
							<br/> 
401
						</xsl:for-each>
402
					</td>
403
				</tr>
404
								
405
				<tr>
406
					<td width="{$firstColWidth}" class="{$firstColStyle}">Answer:</td>
407
					<td>
408
						<xsl:for-each select="qti:resprocessing/qti:respcondition/qti:conditionvar">
409
							<xsl:if test="qti:varequal != ''" >
410
								<xsl:value-of select="qti:varequal" />
411
							</xsl:if>
412
							<xsl:if test="qti:vargte != ''" >
413
								gte: <xsl:value-of select="qti:vargte" />
414
								<br/>
415
							</xsl:if>
416
							<xsl:if test="qti:varlte != ''" >	
417
								lte: <xsl:value-of select="qti:varlte" />
418
								<br/>
419
							</xsl:if>
420
								
421
						</xsl:for-each>
422
					</td>
423
				</tr>
424
				
425
				<tr valign="top">
426
					<td width="{$firstColWidth}" class="{$firstColStyle}">Objectives:</td>
427
					<td>
428
						<xsl:for-each select="qti:objectives/qti:material">
429
							<xsl:value-of select="qti:mattext"/>
430
							<br />
431
						</xsl:for-each>
432
					</td>
433
				</tr>
434
				
435
				<tr valign="top">
436
					<td width="{$firstColWidth}" class="{$firstColStyle}">Metadata:</td>
437
					<td>
438
						<xsl:for-each select="qti:itemmetadata/qti:qtimetadata">
439
							<xsl:call-template name="qtiMetadata" />
440
						</xsl:for-each>
441
					</td>
442
				</tr>
443
			</table>
444
		</li>
445
	</xsl:template>		
446
				
447
	
448
	<!--********************************************************
449
		Asssessment - QTI metadata part
450
		********************************************************-->
451
	<xsl:template name="qtiMetadata">
452
		<table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}" width="100%">
453
			<tr valign="top">
454
				<td>
455
					<xsl:value-of select="qti:vocabulary" />
456
					(<xsl:value-of select="qti:vocabulary/@uri" />)
457
				</td>
458
			</tr>
459
			<tr>	
460
				<td>
461
					<xsl:for-each select=".">
462
						<table>
463
							<xsl:for-each select="qti:qtimetadatafield">
464
								<tr>
465
									<td width="{$firstColWidth}" class="{$firstColStyle}">
466
										<xsl:value-of
467
											select="qti:fieldlabel" />:
468
									</td>
469
									<td>
470
										<xsl:value-of
471
											select="qti:fieldentry" />
472
									</td>
473
								</tr>
474
							</xsl:for-each>
475
						</table>
476
					</xsl:for-each>
477
				</td>
478
			</tr>
479
		</table>
480
	</xsl:template>
481

  
482
	<!--********************************************************
483
		Course part
484
		********************************************************-->
485
	<xsl:template name="course">
486
		<table xsl:use-attribute-sets="cellspacing" class="{$tabledefaultStyle}" width="100%">
487
			<tr>
488
				<th colspan="2" class="tablehead">
489
					Course Information
490
				</th>
491
			</tr>
492
			<tr valign="top">
493
				<td>
494
					<!-- general info -->
495
					<xsl:for-each select="lom/lom:general">
496
						<xsl:call-template name="lomGeneral"/>
497
					</xsl:for-each>
498
				</td>
499
			
500
				<td>
501
					<!-- education info -->
502
					<xsl:for-each select="lom/lom:educational">
503
						<xsl:call-template name="lomEducational"/>
504
					</xsl:for-each>
505
				</td>
506
			</tr>
507
			
508
			<tr valign="top">	
509
				<td>
510
					<!-- relation info -->
511
					<xsl:for-each select="lom/lom:relation">
512
						<xsl:call-template name="lomRelation"/>
513
					</xsl:for-each>
514
				</td>
515
				
516
				<td>
517
					<!-- classification info -->
518
					<xsl:for-each select="lom/lom:classification">
519
						<xsl:call-template name="lomClassification"/>
520
					</xsl:for-each>
521
				</td>
522
				
523
			</tr>
524
			
525
		</table>
526

  
527
	</xsl:template>
528
	
529
	<!--********************************************************
530
		lomGeneral part
531
		********************************************************-->
532
	<xsl:template name="lomGeneral">
533
		<xsl:for-each select=".">
534
			<table>
535
				<tr>
536
					<th colspan="2">
537
						General
538
					</th>
539
				</tr>
540
				<tr>
541
					<td width="{$firstColWidth}" class="{$firstColStyle}">Title:</td>
542
					<td>
543
						<xsl:value-of
544
							select="lom:title/lom:string" />
545
					</td>
546
				</tr>
547
				<tr>
548
					<td width="{$firstColWidth}" class="{$firstColStyle}">ID:</td>
549
					<td>
550
						<xsl:value-of
551
							select="lom:identifier/lom:catalog" />
552
							/
553
						<xsl:value-of
554
							select="lom:identifier/lom:entry" />
555
					</td>
556
				</tr>
557
				<tr>
558
					<td width="{$firstColWidth}" class="{$firstColStyle}">Description:</td>
559
					<td>
560
						<xsl:value-of
561
							select="lom:description/lom:string" />
562
					</td>
563
				</tr>
564
				<tr>
565
					<td width="{$firstColWidth}" class="{$firstColStyle}">Year:</td>
566
					<td><xsl:value-of select="../../year"/></td>
567
				</tr>
568
				<tr>
569
					<td width="{$firstColWidth}" class="{$firstColStyle}">Term:</td>
570
					<td><xsl:value-of select="../../term"/></td>
571
				</tr>
572
				<tr>
573
					<td width="{$firstColWidth}" class="{$firstColStyle}">Dates:</td>
574
					<td>
575
						<xsl:value-of select="../../coverage/rangeOfDates/beginDate"/>
576
						to
577
						<xsl:value-of select="../../coverage/rangeOfDates/endDate"/>
578
					</td>
579
				</tr>
580
				<tr>
581
					<td width="{$firstColWidth}" class="{$firstColStyle}"><xsl:value-of select="../../credit/@measurementUnit"/>:</td>
582
					<td>
583
						<xsl:value-of select="../../credit"/>
584
					</td>
585
				</tr>
586
				<tr valign="top">
587
					<td width="{$firstColWidth}" class="{$firstColStyle}">Student Count:</td>
588
					<td>
589
						<table>
590
							<xsl:for-each select="../../studentCount[@level!='']">
591
								<tr>
592
									<td  width="{$firstColWidth}" class="{$firstColStyle}">
593
										Level <xsl:value-of select="@level"/>:
594
									</td>
595
									<td>
596
										<xsl:value-of select="."/>
597
									</td>
598
								</tr>
599
							</xsl:for-each>	
600
						</table>
601
					</td>
602
				</tr>
603
				<tr valign="top">
604
					<td width="{$firstColWidth}" class="{$firstColStyle}">Class Time:</td>
605
					<td>
606
						<table>
607
							<xsl:for-each select="../../classTime[@type!='']">
608
								<tr>
609
									<td  width="{$firstColWidth}" class="{$firstColStyle}">
610
										<xsl:value-of select="@type"/>:
611
									</td>
612
									<td>
613
										<xsl:value-of select="."/> (<xsl:value-of select="@measurementUnit"/>)
614
									</td>
615
								</tr>
616
							</xsl:for-each>	
617
						</table>
618
					</td>
619
				</tr>
620
			</table>
621
		</xsl:for-each>
622
	</xsl:template>	
623

  
624
	<!--********************************************************
625
		lomEducational part
626
		********************************************************-->
627
	<xsl:template name="lomEducational">
628
		<table>
629
			<tr>
630
				<th colspan="2">
631
					Educational
632
				</th>
633
			</tr>
634
			<tr>
635
				<td width="{$firstColWidth}" class="{$firstColStyle}">Context:</td>
636
				<td>
637
					<ul>
638
						<xsl:for-each select="lom:context">
639
							<li>
640
								<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
641
							</li>	
642
						</xsl:for-each>	
643
					</ul>	
644
				</td>
645
			</tr>
646
			<tr>
647
				<td width="{$firstColWidth}" class="{$firstColStyle}">Intended End-User Role:</td>
648
				<td>
649
					<ul>
650
						<xsl:for-each select="lom:intendedEndUserRole">
651
							<li>
652
								<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
653
							</li>	
654
						</xsl:for-each>	
655
					</ul>	
656
				</td>
657
			</tr>
658
			<tr>
659
				<td width="{$firstColWidth}" class="{$firstColStyle}">Typical Age Range:</td>
660
				<td>
661
					<ul>
662
						<xsl:for-each select="lom:typicalAgeRange/lom:string">
663
							<li>
664
								<xsl:value-of select="." />
665
							</li>	
666
						</xsl:for-each>	
667
					</ul>	
668
				</td>
669
			</tr>
670
			<tr>
671
				<td width="{$firstColWidth}" class="{$firstColStyle}">Difficulty:</td>
672
				<td>
673
					<ul>
674
						<xsl:for-each select="lom:difficulty">
675
							<li>
676
								<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
677
							</li>	
678
						</xsl:for-each>	
679
					</ul>	
680
				</td>
681
			</tr>
682
			<tr>
683
				<td width="{$firstColWidth}" class="{$firstColStyle}">Learning Resource Type:</td>
684
				<td>
685
					<ul>
686
						<xsl:for-each select="lom:learningResourceType">
687
							<li>
688
								<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
689
							</li>	
690
						</xsl:for-each>	
691
					</ul>	
692
				</td>
693
			</tr>
694
			<tr>
695
				<td width="{$firstColWidth}" class="{$firstColStyle}">Interactivity Type:</td>
696
				<td>
697
					<ul>
698
						<xsl:for-each select="lom:interactivityType">
699
							<li>
700
								<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
701
							</li>	
702
						</xsl:for-each>	
703
					</ul>	
704
				</td>
705
			</tr>
706
			<tr>
707
				<td width="{$firstColWidth}" class="{$firstColStyle}">Typical Learning Time:</td>
708
				<td>
709
					<ul>
710
						<xsl:for-each select="lom:typicalLearningTime">
711
							<li>
712
								<xsl:value-of select="lom:description/lom:string" /> (<xsl:value-of select="lom:duration" />)
713
							</li>	
714
						</xsl:for-each>	
715
					</ul>	
716
				</td>
717
			</tr>
718
			<tr>
719
				<td width="{$firstColWidth}" class="{$firstColStyle}">Interactivity Level:</td>
720
				<td>
721
					<ul>
722
						<xsl:for-each select="lom:interactivityLevel">
723
							<li>
724
								<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
725
							</li>	
726
						</xsl:for-each>	
727
					</ul>	
728
				</td>
729
			</tr>
730
		</table>
731
	</xsl:template>
732
	
733
	<!--********************************************************
734
		lomRelation part
735
		********************************************************-->
736
	<xsl:template name="lomRelation">
737
		<table>
738
			<tr>
739
				<th colspan="2">
740
					Relationship
741
				</th>
742
			</tr>
743
			<tr>
744
				<td width="{$firstColWidth}" class="{$firstColStyle}">Kind:</td>
745
				<td>
746
					<xsl:for-each select="lom:kind">
747
						<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
748
					</xsl:for-each>
749
				</td>
750
			</tr>
751
			<tr>
752
				<td width="{$firstColWidth}" class="{$firstColStyle}">Target:</td>
753
				<td>
754
					<xsl:for-each select="lom:resource">
755
						<xsl:for-each select="lom:identifier">
756
							<xsl:value-of select="lom:entry" /> (<xsl:value-of select="lom:catalog" />)
757
						</xsl:for-each>	
758
					</xsl:for-each>	
759
				</td>
760
			</tr>
761
			<tr>
762
				<td width="{$firstColWidth}" class="{$firstColStyle}">Description:</td>
763
				<td>
764
					<xsl:for-each select="lom:resource">
765
						<xsl:for-each select="lom:description/lom:string">
766
							<xsl:value-of select="."/>
767
						</xsl:for-each>
768
					</xsl:for-each>	
769
				</td>
770
			</tr>
771
		</table>
772
	</xsl:template>
773
	
774
	<!--********************************************************
775
		lomClassification part
776
		********************************************************-->
777
	<xsl:template name="lomClassification">
778
		<table>
779
			<tr>
780
				<th colspan="2">
781
					Classification
782
				</th>
783
			</tr>
784
			<tr>
785
				<td width="{$firstColWidth}" class="{$firstColStyle}">Purpose:</td>
786
				<td>
787
					<xsl:for-each select="lom:purpose">
788
						<xsl:value-of select="lom:value" /> (<xsl:value-of select="lom:source" />)
789
					</xsl:for-each>	
790
				</td>
791
			</tr>
792
			
793
			<xsl:for-each select="lom:taxonPath">
794
				<tr>
795
					<td width="{$firstColWidth}" class="{$firstColStyle}">Taxon (<xsl:value-of select="lom:source/lom:string"/>):</td>
796
					<td>						
797
						<xsl:for-each select="lom:taxon">
798
							<xsl:value-of select="lom:id" />: <xsl:value-of select="lom:entry/lom:string" />
799
							<br/>
800
						</xsl:for-each>
801
					</td>
802
				</tr>
803
			</xsl:for-each>	
804
		</table>
805
	</xsl:template>
806

  
807
</xsl:stylesheet>
808 0

  
lib/style/skins/first/first.xml
9 9
  
10 10
  <!-- EdML doctype -->
11 11
  <doctype publicid="edml://ecoinformatics.org/edml">
12
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-skins-path@/first/edml.xsl</target>
12
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-skins-path@/first/xsl/edml.xsl</target>
13 13
  </doctype>
14
  
15
  <!-- qti doctype -->
16
  <doctype publicid="http://www.imsglobal.org/xsd/ims_qtiasiv1p2">
17
    <target publicid="-//W3C//HTML//EN">@systemidserver@@style-skins-path@/first/xsl/qti-root.xsl</target>
18
  </doctype>
14 19

  
15 20
<!--
16 21
    ARE THESE STILL NEEDED????????????

Also available in: Unified diff