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: tao $'
|
10
|
* '$Date: 2003-06-26 18:29:36 -0700 (Thu, 26 Jun 2003) $'
|
11
|
* '$Revision: 1696 $'
|
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 eml-variable.dtd
|
29
|
* module of the Ecological Metadata Language (EML) 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" version="1.0">
|
33
|
|
34
|
<xsl:output method="html" encoding="iso-8859-1"/>
|
35
|
|
36
|
|
37
|
<xsl:template name="project">
|
38
|
<xsl:param name="projectfirstColStyle"/>
|
39
|
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
|
40
|
<xsl:choose>
|
41
|
<xsl:when test="references!=''">
|
42
|
<xsl:variable name="ref_id" select="references"/>
|
43
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
44
|
<xsl:for-each select="$references">
|
45
|
<xsl:call-template name="projectcommon">
|
46
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
47
|
</xsl:call-template>
|
48
|
</xsl:for-each>
|
49
|
</xsl:when>
|
50
|
<xsl:otherwise>
|
51
|
<xsl:call-template name="projectcommon">
|
52
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
53
|
</xsl:call-template>
|
54
|
</xsl:otherwise>
|
55
|
</xsl:choose>
|
56
|
</table>
|
57
|
</xsl:template>
|
58
|
|
59
|
|
60
|
|
61
|
<xsl:template name="projectcommon">
|
62
|
<xsl:param name="projectfirstColStyle"/>
|
63
|
<xsl:call-template name="projecttitle">
|
64
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
65
|
</xsl:call-template>
|
66
|
<xsl:call-template name="projectpersonnel">
|
67
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
68
|
</xsl:call-template>
|
69
|
<xsl:call-template name="projectabstract">
|
70
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
71
|
</xsl:call-template>
|
72
|
<xsl:call-template name="projectfunding">
|
73
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
74
|
</xsl:call-template>
|
75
|
<xsl:call-template name="projectstudyareadescription">
|
76
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
77
|
</xsl:call-template>
|
78
|
<xsl:call-template name="projectdesigndescription">
|
79
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
80
|
</xsl:call-template>
|
81
|
<xsl:call-template name="projectrelatedproject">
|
82
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
83
|
</xsl:call-template>
|
84
|
</xsl:template>
|
85
|
|
86
|
|
87
|
|
88
|
<xsl:template name="projecttitle">
|
89
|
<xsl:param name="projectfirstColStyle"/>
|
90
|
<xsl:for-each select="title">
|
91
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
92
|
Title:
|
93
|
</td>
|
94
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
95
|
<xsl:value-of select="../title"/>
|
96
|
</td>
|
97
|
</tr>
|
98
|
</xsl:for-each>
|
99
|
</xsl:template>
|
100
|
|
101
|
|
102
|
|
103
|
<xsl:template name="projectpersonnel">
|
104
|
<xsl:param name="projectfirstColStyle"/>
|
105
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
106
|
Personnel:
|
107
|
</td>
|
108
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
109
|
 
|
110
|
</td>
|
111
|
</tr>
|
112
|
<xsl:for-each select="personnel">
|
113
|
<tr><td colspan="2">
|
114
|
<xsl:call-template name="party">
|
115
|
<xsl:with-param name="partyfirstColStyle" select="$projectfirstColStyle"/>
|
116
|
</xsl:call-template>
|
117
|
</td></tr>
|
118
|
<xsl:for-each select="role">
|
119
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
120
|
Role:
|
121
|
</td>
|
122
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
123
|
<xsl:value-of select="."/>
|
124
|
</td>
|
125
|
</tr>
|
126
|
</xsl:for-each>
|
127
|
</xsl:for-each>
|
128
|
</xsl:template>
|
129
|
|
130
|
|
131
|
<xsl:template name="projectabstract">
|
132
|
<xsl:param name="projectfirstColStyle"/>
|
133
|
<xsl:for-each select="abstract">
|
134
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
135
|
Abstract:
|
136
|
</td>
|
137
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
138
|
<xsl:call-template name="text">
|
139
|
<xsl:with-param name="textfirstColStyle" select="$projectfirstColStyle"/>
|
140
|
</xsl:call-template>
|
141
|
</td>
|
142
|
</tr>
|
143
|
</xsl:for-each>
|
144
|
</xsl:template>
|
145
|
|
146
|
<xsl:template name="projectfunding">
|
147
|
<xsl:param name="projectfirstColStyle"/>
|
148
|
<xsl:for-each select="funding">
|
149
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
150
|
Funding:
|
151
|
</td>
|
152
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
153
|
<xsl:call-template name="text">
|
154
|
<xsl:with-param name="textfirstColStyle" select="$projectfirstColStyle"/>
|
155
|
</xsl:call-template>
|
156
|
</td>
|
157
|
</tr>
|
158
|
</xsl:for-each>
|
159
|
</xsl:template>
|
160
|
|
161
|
|
162
|
|
163
|
<xsl:template name="projectstudyareadescription">
|
164
|
<xsl:param name="projectfirstColStyle"/>
|
165
|
<xsl:for-each select="studyAreaDescription">
|
166
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
167
|
<xsl:text>Study Area:</xsl:text>
|
168
|
</td>
|
169
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
170
|
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
|
171
|
<xsl:for-each select="descriptor">
|
172
|
<xsl:for-each select="descriptorValue">
|
173
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
174
|
<xsl:value-of select="../@name"/>
|
175
|
</td>
|
176
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
177
|
<xsl:value-of select="descriptorValue"/><xsl:value-of select="./@name_or_id"/>
|
178
|
</td>
|
179
|
</tr>
|
180
|
</xsl:for-each>
|
181
|
<xsl:for-each select="citation">
|
182
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
183
|
Citation:
|
184
|
</td>
|
185
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
186
|
<xsl:call-template name="citation">
|
187
|
<xsl:with-param name="citationfirstColStyle" select="projectfirstColStyle"/>
|
188
|
</xsl:call-template>
|
189
|
</td>
|
190
|
</tr>
|
191
|
</xsl:for-each>
|
192
|
</xsl:for-each>
|
193
|
</table>
|
194
|
</td>
|
195
|
</tr>
|
196
|
|
197
|
<xsl:for-each select="citation">
|
198
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
199
|
Study Area Citation:
|
200
|
</td>
|
201
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
202
|
<xsl:call-template name="citation">
|
203
|
<xsl:with-param name="citationfirstColStyle" select="projectfirstColStyle"/>
|
204
|
</xsl:call-template>
|
205
|
</td>
|
206
|
</tr>
|
207
|
</xsl:for-each>
|
208
|
|
209
|
<xsl:for-each select="coverage">
|
210
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
211
|
Study Area Coverage:
|
212
|
</td>
|
213
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
214
|
<xsl:call-template name="coverage"/>
|
215
|
</td>
|
216
|
</tr>
|
217
|
</xsl:for-each>
|
218
|
</xsl:for-each>
|
219
|
</xsl:template>
|
220
|
|
221
|
|
222
|
|
223
|
<xsl:template name="projectdesigndescription">
|
224
|
<xsl:param name="projectfirstColStyle"/>
|
225
|
<xsl:for-each select="designDescription">
|
226
|
<xsl:for-each select="description">
|
227
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
228
|
Design Description:
|
229
|
</td>
|
230
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
231
|
<xsl:call-template name="text"/>
|
232
|
</td>
|
233
|
</tr>
|
234
|
</xsl:for-each>
|
235
|
<xsl:for-each select="citation">
|
236
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
237
|
Design Citation:
|
238
|
</td>
|
239
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
240
|
<xsl:call-template name="citation"/>
|
241
|
</td>
|
242
|
</tr>
|
243
|
</xsl:for-each>
|
244
|
</xsl:for-each>
|
245
|
</xsl:template>
|
246
|
|
247
|
|
248
|
|
249
|
<xsl:template name="projectrelatedproject">
|
250
|
<xsl:param name="projectfirstColStyle"/>
|
251
|
<xsl:for-each select="relatedProject">
|
252
|
<tr><td width="{$firstColWidth}" class="{$projectfirstColStyle}">
|
253
|
Related Project:
|
254
|
</td>
|
255
|
<td width="{$secondColWidth}" class="{$secondColStyle}" >
|
256
|
<xsl:call-template name="project">
|
257
|
<xsl:with-param name="projectfirstColStyle" select="$projectfirstColStyle"/>
|
258
|
</xsl:call-template>
|
259
|
</td>
|
260
|
</tr>
|
261
|
</xsl:for-each>
|
262
|
</xsl:template>
|
263
|
|
264
|
|
265
|
</xsl:stylesheet>
|