1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* '$RCSfile$'
|
4
|
* Authors: Jivka Bojilova
|
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: 2013-07-15 10:37:09 -0700 (Mon, 15 Jul 2013) $'
|
11
|
* '$Revision: 7982 $'
|
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-file.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
|
|
35
|
<xsl:output method="html" encoding="iso-8859-1"
|
36
|
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
|
37
|
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
|
38
|
indent="yes" />
|
39
|
<!-- This module is for datatable module-->
|
40
|
|
41
|
<xsl:template name="dataTable">
|
42
|
<xsl:param name="datatablefirstColStyle"/>
|
43
|
<xsl:param name="datatablesubHeaderStyle"/>
|
44
|
<xsl:param name="docid"/>
|
45
|
<xsl:param name="entityindex"/>
|
46
|
<table class="{$tabledefaultStyle}">
|
47
|
<xsl:choose>
|
48
|
<xsl:when test="references!=''">
|
49
|
<xsl:variable name="ref_id" select="references"/>
|
50
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
51
|
<xsl:for-each select="$references">
|
52
|
<xsl:call-template name="datatablecommon">
|
53
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
54
|
<xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
55
|
<xsl:with-param name="docid" select="$docid"/>
|
56
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
57
|
</xsl:call-template>
|
58
|
</xsl:for-each>
|
59
|
</xsl:when>
|
60
|
<xsl:otherwise>
|
61
|
<xsl:call-template name="datatablecommon">
|
62
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
63
|
<xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
64
|
<xsl:with-param name="docid" select="$docid"/>
|
65
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
66
|
</xsl:call-template>
|
67
|
</xsl:otherwise>
|
68
|
</xsl:choose>
|
69
|
</table>
|
70
|
</xsl:template>
|
71
|
|
72
|
<xsl:template name="datatablecommon">
|
73
|
<xsl:param name="datatablefirstColStyle"/>
|
74
|
<xsl:param name="datatablesubHeaderStyle"/>
|
75
|
<xsl:param name="docid"/>
|
76
|
<xsl:param name="entityindex"/>
|
77
|
<xsl:for-each select="entityName">
|
78
|
<xsl:call-template name="entityName">
|
79
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
80
|
</xsl:call-template>
|
81
|
</xsl:for-each>
|
82
|
<xsl:for-each select="alternateIdentifier">
|
83
|
<xsl:call-template name="entityalternateIdentifier">
|
84
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
85
|
</xsl:call-template>
|
86
|
</xsl:for-each>
|
87
|
<xsl:for-each select="entityDescription">
|
88
|
<xsl:call-template name="entityDescription">
|
89
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
90
|
</xsl:call-template>
|
91
|
</xsl:for-each>
|
92
|
<xsl:for-each select="additionalInfo">
|
93
|
<xsl:call-template name="entityadditionalInfo">
|
94
|
<xsl:with-param name="entityfirstColStyle" select="$datatablefirstColStyle"/>
|
95
|
</xsl:call-template>
|
96
|
</xsl:for-each>
|
97
|
<!-- call physical moduel without show distribution(we want see it later)-->
|
98
|
<xsl:if test="physical">
|
99
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
100
|
Physical Structure Description:
|
101
|
</td></tr>
|
102
|
</xsl:if>
|
103
|
<xsl:for-each select="physical">
|
104
|
<tr><td colspan="2">
|
105
|
<xsl:call-template name="physical">
|
106
|
<xsl:with-param name="physicalfirstColStyle" select="$datatablefirstColStyle"/>
|
107
|
<xsl:with-param name="notshowdistribution">yes</xsl:with-param>
|
108
|
</xsl:call-template>
|
109
|
</td></tr>
|
110
|
</xsl:for-each>
|
111
|
|
112
|
<xsl:for-each select="caseSensitive">
|
113
|
<xsl:call-template name="datatablecaseSensitive">
|
114
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
115
|
</xsl:call-template>
|
116
|
</xsl:for-each>
|
117
|
<xsl:for-each select="numberOfRecords">
|
118
|
<xsl:call-template name="datatablenumberOfRecords">
|
119
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
120
|
</xsl:call-template>
|
121
|
</xsl:for-each>
|
122
|
|
123
|
<!-- Here to display distribution info-->
|
124
|
<xsl:for-each select="physical">
|
125
|
<xsl:call-template name="showdistribution">
|
126
|
<xsl:with-param name="docid" select="$docid"/>
|
127
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
128
|
<xsl:with-param name="physicalindex" select="position()"/>
|
129
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
130
|
<xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
131
|
</xsl:call-template>
|
132
|
</xsl:for-each>
|
133
|
|
134
|
<xsl:if test="coverage">
|
135
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
136
|
Coverage Description:
|
137
|
</td></tr>
|
138
|
</xsl:if>
|
139
|
<xsl:for-each select="coverage">
|
140
|
<tr><td colspan="2">
|
141
|
<xsl:call-template name="coverage">
|
142
|
</xsl:call-template>
|
143
|
</td></tr>
|
144
|
</xsl:for-each>
|
145
|
<xsl:if test="method">
|
146
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
147
|
Method Description:
|
148
|
</td></tr>
|
149
|
</xsl:if>
|
150
|
<xsl:for-each select="method">
|
151
|
<tr><td colspan="2">
|
152
|
<xsl:call-template name="method">
|
153
|
<xsl:with-param name="methodfirstColStyle" select="$datatablefirstColStyle"/>
|
154
|
<xsl:with-param name="methodsubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
155
|
</xsl:call-template>
|
156
|
</td></tr>
|
157
|
</xsl:for-each>
|
158
|
<xsl:if test="constraint">
|
159
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
160
|
Constraint:
|
161
|
</td></tr>
|
162
|
</xsl:if>
|
163
|
<xsl:for-each select="constraint">
|
164
|
<tr><td colspan="2">
|
165
|
<xsl:call-template name="constraint">
|
166
|
<xsl:with-param name="constraintfirstColStyle" select="$datatablefirstColStyle"/>
|
167
|
</xsl:call-template>
|
168
|
</td></tr>
|
169
|
</xsl:for-each>
|
170
|
<xsl:if test="$withAttributes='1' or $displaymodule='printall'">
|
171
|
<xsl:for-each select="attributeList">
|
172
|
<xsl:call-template name="datatableattributeList">
|
173
|
<xsl:with-param name="datatablefirstColStyle" select="$datatablefirstColStyle"/>
|
174
|
<xsl:with-param name="datatablesubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
175
|
<xsl:with-param name="docid" select="$docid"/>
|
176
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
177
|
</xsl:call-template>
|
178
|
</xsl:for-each>
|
179
|
</xsl:if>
|
180
|
|
181
|
</xsl:template>
|
182
|
|
183
|
|
184
|
|
185
|
|
186
|
<xsl:template name="datatablecaseSensitive">
|
187
|
<xsl:param name="datatablefirstColStyle"/>
|
188
|
<tr><td class="{$datatablefirstColStyle}">
|
189
|
Case Sensitive?</td><td class="{$secondColStyle}">
|
190
|
<xsl:value-of select="."/></td></tr>
|
191
|
|
192
|
</xsl:template>
|
193
|
|
194
|
<xsl:template name="datatablenumberOfRecords">
|
195
|
<xsl:param name="datatablefirstColStyle"/>
|
196
|
<tr><td class="{$datatablefirstColStyle}">
|
197
|
Number Of Records:</td><td class="{$secondColStyle}">
|
198
|
<xsl:value-of select="."/></td></tr>
|
199
|
</xsl:template>
|
200
|
|
201
|
<xsl:template name="showdistribution">
|
202
|
<xsl:param name="datatablefirstColStyle"/>
|
203
|
<xsl:param name="datatablesubHeaderStyle"/>
|
204
|
<xsl:param name="docid"/>
|
205
|
<xsl:param name="level">entitylevel</xsl:param>
|
206
|
<xsl:param name="entitytype">dataTable</xsl:param>
|
207
|
<xsl:param name="entityindex"/>
|
208
|
<xsl:param name="physicalindex"/>
|
209
|
|
210
|
<xsl:for-each select="distribution">
|
211
|
<tr><td colspan="2">
|
212
|
<xsl:call-template name="distribution">
|
213
|
<xsl:with-param name="docid" select="$docid"/>
|
214
|
<xsl:with-param name="level" select="$level"/>
|
215
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
216
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
217
|
<xsl:with-param name="physicalindex" select="$physicalindex"/>
|
218
|
<xsl:with-param name="distributionindex" select="position()"/>
|
219
|
<xsl:with-param name="disfirstColStyle" select="$datatablefirstColStyle"/>
|
220
|
<xsl:with-param name="dissubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
221
|
</xsl:call-template>
|
222
|
</td></tr>
|
223
|
</xsl:for-each>
|
224
|
</xsl:template>
|
225
|
|
226
|
|
227
|
<xsl:template name="datatableattributeList">
|
228
|
<xsl:param name="datatablefirstColStyle"/>
|
229
|
<xsl:param name="datatablesubHeaderStyle"/>
|
230
|
<xsl:param name="docid"/>
|
231
|
<xsl:param name="entitytype">dataTable</xsl:param>
|
232
|
<xsl:param name="entityindex"/>
|
233
|
<tr><td class="{$datatablesubHeaderStyle}" colspan="2">
|
234
|
<xsl:text>Attribute(s) Info:</xsl:text>
|
235
|
</td></tr>
|
236
|
<tr><td colspan="2">
|
237
|
<xsl:call-template name="attributelist">
|
238
|
<xsl:with-param name="docid" select="$docid"/>
|
239
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
240
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
241
|
</xsl:call-template>
|
242
|
</td>
|
243
|
</tr>
|
244
|
</xsl:template>
|
245
|
|
246
|
|
247
|
|
248
|
</xsl:stylesheet>
|