1 |
1675
|
tao
|
<?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$'
|
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 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 |
|
|
<!-- This module is for datatable module-->
|
37 |
|
|
|
38 |
|
|
<xsl:template name="spatialVector">
|
39 |
|
|
<xsl:param name="spatialvectorfirstColStyle"/>
|
40 |
|
|
<xsl:param name="spatialvectorsubHeaderStyle"/>
|
41 |
|
|
<xsl:param name="docid"/>
|
42 |
|
|
<xsl:param name="entityindex"/>
|
43 |
1696
|
tao
|
<table xsl:use-attribute-sets="cellspacing" class="tabledefault" width="100%">
|
44 |
1675
|
tao
|
<xsl:choose>
|
45 |
|
|
<xsl:when test="references!=''">
|
46 |
|
|
<xsl:variable name="ref_id" select="references"/>
|
47 |
|
|
<xsl:variable name="references" select="$ids[@id=$ref_id]" />
|
48 |
|
|
<xsl:for-each select="$references">
|
49 |
1696
|
tao
|
<xsl:call-template name="spatialVectorcommon">
|
50 |
1675
|
tao
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
51 |
|
|
<xsl:with-param name="spatialvectorsubHeaderStyle" select="$spatialvectorsubHeaderStyle"/>
|
52 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
53 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
54 |
|
|
</xsl:call-template>
|
55 |
|
|
</xsl:for-each>
|
56 |
|
|
</xsl:when>
|
57 |
|
|
<xsl:otherwise>
|
58 |
1696
|
tao
|
<xsl:call-template name="spatialVectorcommon">
|
59 |
1675
|
tao
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
60 |
|
|
<xsl:with-param name="spatialvectorsubHeaderStyle" select="$spatialvectorsubHeaderStyle"/>
|
61 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
62 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
63 |
|
|
</xsl:call-template>
|
64 |
|
|
</xsl:otherwise>
|
65 |
|
|
</xsl:choose>
|
66 |
|
|
</table>
|
67 |
|
|
</xsl:template>
|
68 |
|
|
|
69 |
|
|
<xsl:template name="spatialVectorcommon">
|
70 |
|
|
<xsl:param name="spatialvectorfirstColStyle"/>
|
71 |
|
|
<xsl:param name="spatialvectorsubHeaderStyle"/>
|
72 |
|
|
<xsl:param name="docid"/>
|
73 |
|
|
<xsl:param name="entityindex"/>
|
74 |
|
|
<xsl:for-each select="entityName">
|
75 |
|
|
<xsl:call-template name="entityName">
|
76 |
|
|
<xsl:with-param name="entityfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
77 |
|
|
</xsl:call-template>
|
78 |
|
|
</xsl:for-each>
|
79 |
|
|
<xsl:for-each select="alternateIdentifier">
|
80 |
|
|
<xsl:call-template name="entityalternateIdentifier">
|
81 |
|
|
<xsl:with-param name="entityfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
82 |
|
|
</xsl:call-template>
|
83 |
|
|
</xsl:for-each>
|
84 |
|
|
<xsl:for-each select="entityDescription">
|
85 |
|
|
<xsl:call-template name="entityDescription">
|
86 |
|
|
<xsl:with-param name="entityfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
87 |
|
|
</xsl:call-template>
|
88 |
|
|
</xsl:for-each>
|
89 |
|
|
<xsl:for-each select="additionalInfo">
|
90 |
1732
|
tao
|
<xsl:call-template name="entityadditionalInfo">
|
91 |
1675
|
tao
|
<xsl:with-param name="entityfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
92 |
|
|
</xsl:call-template>
|
93 |
|
|
</xsl:for-each>
|
94 |
|
|
<!-- call physical moduel without show distribution(we want see it later)-->
|
95 |
|
|
<xsl:if test="physical">
|
96 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
97 |
1711
|
tao
|
Physical Structure Description:
|
98 |
1675
|
tao
|
</td></tr>
|
99 |
|
|
</xsl:if>
|
100 |
1696
|
tao
|
<xsl:for-each select="physical">
|
101 |
|
|
<tr><td colspan="2">
|
102 |
1675
|
tao
|
<xsl:call-template name="physical">
|
103 |
|
|
<xsl:with-param name="physicalfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
104 |
|
|
<xsl:with-param name="notshowdistribution">yes</xsl:with-param>
|
105 |
|
|
</xsl:call-template>
|
106 |
1696
|
tao
|
</td></tr>
|
107 |
|
|
</xsl:for-each>
|
108 |
|
|
|
109 |
1675
|
tao
|
<xsl:if test="coverage">
|
110 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
111 |
1711
|
tao
|
Coverage Description:
|
112 |
1675
|
tao
|
</td></tr>
|
113 |
|
|
</xsl:if>
|
114 |
|
|
<xsl:for-each select="coverage">
|
115 |
|
|
<tr><td colspan="2">
|
116 |
|
|
<xsl:call-template name="coverage">
|
117 |
|
|
</xsl:call-template>
|
118 |
|
|
</td></tr>
|
119 |
|
|
</xsl:for-each>
|
120 |
|
|
<xsl:if test="method">
|
121 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
122 |
1711
|
tao
|
Method Description:
|
123 |
1675
|
tao
|
</td></tr>
|
124 |
|
|
</xsl:if>
|
125 |
|
|
<xsl:for-each select="method">
|
126 |
|
|
<tr><td colspan="2">
|
127 |
|
|
<xsl:call-template name="method">
|
128 |
|
|
<xsl:with-param name="methodfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
129 |
1680
|
tao
|
<xsl:with-param name="methodsubHeaderStyle" select="$spatialvectorsubHeaderStyle"/>
|
130 |
1675
|
tao
|
</xsl:call-template>
|
131 |
|
|
</td></tr>
|
132 |
|
|
</xsl:for-each>
|
133 |
|
|
<xsl:if test="constraint">
|
134 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
135 |
1711
|
tao
|
Constraint:
|
136 |
1675
|
tao
|
</td></tr>
|
137 |
|
|
</xsl:if>
|
138 |
|
|
<xsl:for-each select="constraint">
|
139 |
|
|
<tr><td colspan="2">
|
140 |
|
|
<xsl:call-template name="constraint">
|
141 |
|
|
<xsl:with-param name="constraintfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
142 |
|
|
</xsl:call-template>
|
143 |
|
|
</td></tr>
|
144 |
|
|
</xsl:for-each>
|
145 |
|
|
<xsl:for-each select="geometry">
|
146 |
1680
|
tao
|
<tr><td width="{$firstColWidth}" class="{$spatialvectorfirstColStyle}">
|
147 |
1711
|
tao
|
Geometry:
|
148 |
1675
|
tao
|
</td>
|
149 |
|
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
150 |
|
|
<xsl:value-of select="."/>
|
151 |
|
|
</td>
|
152 |
|
|
</tr>
|
153 |
|
|
</xsl:for-each>
|
154 |
|
|
<xsl:for-each select="geometricObjectCount">
|
155 |
1680
|
tao
|
<tr><td width="{$firstColWidth}" class="{$spatialvectorfirstColStyle}">
|
156 |
1711
|
tao
|
Number of Geometric Objects:
|
157 |
1675
|
tao
|
</td>
|
158 |
|
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
159 |
|
|
<xsl:value-of select="."/>
|
160 |
|
|
</td>
|
161 |
|
|
</tr>
|
162 |
|
|
</xsl:for-each>
|
163 |
|
|
<xsl:for-each select="topologyLevel">
|
164 |
1680
|
tao
|
<tr><td width="{$firstColWidth}" class="{$spatialvectorfirstColStyle}">
|
165 |
1711
|
tao
|
Topolgy Level:
|
166 |
1675
|
tao
|
</td>
|
167 |
|
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
168 |
|
|
<xsl:value-of select="."/>
|
169 |
|
|
</td>
|
170 |
|
|
</tr>
|
171 |
|
|
</xsl:for-each>
|
172 |
|
|
<xsl:for-each select="spatialReference">
|
173 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
174 |
1711
|
tao
|
Spatial Reference:
|
175 |
1675
|
tao
|
</td></tr>
|
176 |
|
|
<xsl:call-template name="spatialReference">
|
177 |
1696
|
tao
|
<xsl:with-param name="spatialrasterfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
178 |
1675
|
tao
|
</xsl:call-template>
|
179 |
|
|
</xsl:for-each>
|
180 |
|
|
<xsl:for-each select="horizontalAccuracy">
|
181 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
182 |
1711
|
tao
|
Horizontal Accuracy:
|
183 |
1675
|
tao
|
</td></tr>
|
184 |
|
|
<xsl:call-template name="dataQuality">
|
185 |
1696
|
tao
|
<xsl:with-param name="spatialrasterfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
186 |
1675
|
tao
|
</xsl:call-template>
|
187 |
|
|
</xsl:for-each>
|
188 |
|
|
<xsl:for-each select="verticalAccuracy">
|
189 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
190 |
1711
|
tao
|
Vertical Accuracy:
|
191 |
1675
|
tao
|
</td></tr>
|
192 |
|
|
<xsl:call-template name="dataQuality">
|
193 |
1696
|
tao
|
<xsl:with-param name="spatialrasterfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
194 |
1675
|
tao
|
</xsl:call-template>
|
195 |
|
|
</xsl:for-each>
|
196 |
|
|
<xsl:for-each select="attributeList">
|
197 |
1696
|
tao
|
<xsl:call-template name="spatialVectorAttributeList">
|
198 |
1675
|
tao
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
199 |
1680
|
tao
|
<xsl:with-param name="spatialvectorsubHeaderStyle" select="$spatialvectorsubHeaderStyle"/>
|
200 |
1675
|
tao
|
<xsl:with-param name="docid" select="$docid"/>
|
201 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
202 |
|
|
</xsl:call-template>
|
203 |
|
|
</xsl:for-each>
|
204 |
|
|
<!-- Here to display distribution info-->
|
205 |
|
|
<xsl:for-each select="physical">
|
206 |
|
|
<xsl:call-template name="spatialVectorShowDistribution">
|
207 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
208 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
209 |
|
|
<xsl:with-param name="physicalindex" select="position()"/>
|
210 |
1735
|
tao
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
211 |
|
|
<xsl:with-param name="spatialvectorsubHeaderStyle" select="$spatialvectorsubHeaderStyle"/>
|
212 |
1675
|
tao
|
</xsl:call-template>
|
213 |
|
|
</xsl:for-each>
|
214 |
|
|
</xsl:template>
|
215 |
|
|
|
216 |
|
|
<xsl:template name="spatialVectorShowDistribution">
|
217 |
|
|
<xsl:param name="spatialvectorfirstColStyle"/>
|
218 |
|
|
<xsl:param name="spatialvectorsubHeaderStyle"/>
|
219 |
|
|
<xsl:param name="docid"/>
|
220 |
|
|
<xsl:param name="level">entitylevel</xsl:param>
|
221 |
|
|
<xsl:param name="entitytype">spatialVector</xsl:param>
|
222 |
|
|
<xsl:param name="entityindex"/>
|
223 |
|
|
<xsl:param name="physicalindex"/>
|
224 |
|
|
<xsl:for-each select="distribution">
|
225 |
|
|
<tr><td colspan="2">
|
226 |
|
|
<xsl:call-template name="distribution">
|
227 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
228 |
|
|
<xsl:with-param name="level" select="$level"/>
|
229 |
|
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
230 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
231 |
|
|
<xsl:with-param name="physicalindex" select="$physicalindex"/>
|
232 |
|
|
<xsl:with-param name="distributionindex" select="position()"/>
|
233 |
|
|
<xsl:with-param name="disfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
234 |
1680
|
tao
|
<xsl:with-param name="dissubHeaderStyle" select="$spatialvectorsubHeaderStyle"/>
|
235 |
1675
|
tao
|
</xsl:call-template>
|
236 |
|
|
</td></tr>
|
237 |
|
|
</xsl:for-each>
|
238 |
|
|
</xsl:template>
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
<xsl:template name="spatialVectorAttributeList">
|
242 |
|
|
<xsl:param name="spatialvectorfirstColStyle"/>
|
243 |
|
|
<xsl:param name="spatialvectorsubHeaderStyle"/>
|
244 |
|
|
<xsl:param name="docid"/>
|
245 |
|
|
<xsl:param name="entitytype">spatialVector</xsl:param>
|
246 |
|
|
<xsl:param name="entityindex"/>
|
247 |
1680
|
tao
|
<tr><td class="{$spatialvectorsubHeaderStyle}" colspan="2">
|
248 |
1713
|
tao
|
<xsl:text>Attribute(s) Info:</xsl:text>
|
249 |
1675
|
tao
|
</td></tr>
|
250 |
|
|
<tr><td colspan="2">
|
251 |
|
|
<xsl:call-template name="attributelist">
|
252 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
253 |
|
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
254 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
255 |
|
|
</xsl:call-template>
|
256 |
|
|
</td>
|
257 |
|
|
</tr>
|
258 |
|
|
</xsl:template>
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
|
262 |
|
|
</xsl:stylesheet>
|