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 |
|
|
<table class="tabledefault" width="100%">
|
44 |
|
|
<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 |
|
|
<xsl:call-template name="spatialRastercommon">
|
50 |
|
|
<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 |
|
|
<xsl:call-template name="spatialRastercommon">
|
59 |
|
|
<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 |
|
|
<xsl:call-template name="entityDescription">
|
91 |
|
|
<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 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
97 |
|
|
Physical Structure Description
|
98 |
|
|
</td></tr>
|
99 |
|
|
</xsl:if>
|
100 |
|
|
<tr><td colspan="2">
|
101 |
|
|
<xsl:for-each select="physical">
|
102 |
|
|
<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 |
|
|
</xsl:for-each>
|
107 |
|
|
</td></tr>
|
108 |
|
|
<xsl:if test="coverage">
|
109 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
110 |
|
|
Coverage Description
|
111 |
|
|
</td></tr>
|
112 |
|
|
</xsl:if>
|
113 |
|
|
<xsl:for-each select="coverage">
|
114 |
|
|
<tr><td colspan="2">
|
115 |
|
|
<xsl:call-template name="coverage">
|
116 |
|
|
</xsl:call-template>
|
117 |
|
|
</td></tr>
|
118 |
|
|
</xsl:for-each>
|
119 |
|
|
<xsl:if test="method">
|
120 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
121 |
|
|
Method Description
|
122 |
|
|
</td></tr>
|
123 |
|
|
</xsl:if>
|
124 |
|
|
<xsl:for-each select="method">
|
125 |
|
|
<tr><td colspan="2">
|
126 |
|
|
<xsl:call-template name="method">
|
127 |
|
|
<xsl:with-param name="methodfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
128 |
|
|
<xsl:with-param name="methodsubHeaderStyle" select="$datatablesubHeaderStyle"/>
|
129 |
|
|
</xsl:call-template>
|
130 |
|
|
</td></tr>
|
131 |
|
|
</xsl:for-each>
|
132 |
|
|
<xsl:if test="constraint">
|
133 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
134 |
|
|
Constraint
|
135 |
|
|
</td></tr>
|
136 |
|
|
</xsl:if>
|
137 |
|
|
<xsl:for-each select="constraint">
|
138 |
|
|
<tr><td colspan="2">
|
139 |
|
|
<xsl:call-template name="constraint">
|
140 |
|
|
<xsl:with-param name="constraintfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
141 |
|
|
</xsl:call-template>
|
142 |
|
|
</td></tr>
|
143 |
|
|
</xsl:for-each>
|
144 |
|
|
<xsl:for-each select="geometry">
|
145 |
|
|
<tr><td width="{$firstColWidth}" class="{$spatialfirstColStyle}">
|
146 |
|
|
Geometry
|
147 |
|
|
</td>
|
148 |
|
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
149 |
|
|
<xsl:value-of select="."/>
|
150 |
|
|
</td>
|
151 |
|
|
</tr>
|
152 |
|
|
</xsl:for-each>
|
153 |
|
|
<xsl:for-each select="geometricObjectCount">
|
154 |
|
|
<tr><td width="{$firstColWidth}" class="{$spatialfirstColStyle}">
|
155 |
|
|
Number of Geometric Objects
|
156 |
|
|
</td>
|
157 |
|
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
158 |
|
|
<xsl:value-of select="."/>
|
159 |
|
|
</td>
|
160 |
|
|
</tr>
|
161 |
|
|
</xsl:for-each>
|
162 |
|
|
<xsl:for-each select="topologyLevel">
|
163 |
|
|
<tr><td width="{$firstColWidth}" class="{$spatialfirstColStyle}">
|
164 |
|
|
Topolgy Level
|
165 |
|
|
</td>
|
166 |
|
|
<td width="{$secondColWidth}" class="{$secondColStyle}">
|
167 |
|
|
<xsl:value-of select="."/>
|
168 |
|
|
</td>
|
169 |
|
|
</tr>
|
170 |
|
|
</xsl:for-each>
|
171 |
|
|
<xsl:for-each select="spatialReference">
|
172 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
173 |
|
|
Spatial Reference
|
174 |
|
|
</td></tr>
|
175 |
|
|
<xsl:call-template name="spatialReference">
|
176 |
|
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
177 |
|
|
</xsl:call-template>
|
178 |
|
|
</xsl:for-each>
|
179 |
|
|
<xsl:for-each select="horizontalAccuracy">
|
180 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
181 |
|
|
Horizontal Accuracy
|
182 |
|
|
</td></tr>
|
183 |
|
|
<xsl:call-template name="dataQuality">
|
184 |
|
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
185 |
|
|
</xsl:call-template>
|
186 |
|
|
</xsl:for-each>
|
187 |
|
|
<xsl:for-each select="verticalAccuracy">
|
188 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
189 |
|
|
Vertical Accuracy
|
190 |
|
|
</td></tr>
|
191 |
|
|
<xsl:call-template name="dataQuality">
|
192 |
|
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
193 |
|
|
</xsl:call-template>
|
194 |
|
|
</xsl:for-each>
|
195 |
|
|
<xsl:for-each select="attributeList">
|
196 |
|
|
<xsl:call-template name="spatialRasterAttributeList">
|
197 |
|
|
<xsl:with-param name="spatialvectorfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
198 |
|
|
<xsl:with-param name="spatialrasterHeaderStyle" select="$spatialrasterHeaderStyle"/>
|
199 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
200 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
201 |
|
|
</xsl:call-template>
|
202 |
|
|
</xsl:for-each>
|
203 |
|
|
<!-- Here to display distribution info-->
|
204 |
|
|
<xsl:for-each select="physical">
|
205 |
|
|
<xsl:call-template name="spatialVectorShowDistribution">
|
206 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
207 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
208 |
|
|
<xsl:with-param name="physicalindex" select="position()"/>
|
209 |
|
|
<xsl:with-param name="disfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
210 |
|
|
<xsl:with-param name="dissubHeaderStyle" select="$spatialrasterHeaderStyle"/>
|
211 |
|
|
</xsl:call-template>
|
212 |
|
|
</xsl:for-each>
|
213 |
|
|
</xsl:template>
|
214 |
|
|
|
215 |
|
|
<xsl:template name="spatialVectorShowDistribution">
|
216 |
|
|
<xsl:param name="spatialvectorfirstColStyle"/>
|
217 |
|
|
<xsl:param name="spatialvectorsubHeaderStyle"/>
|
218 |
|
|
<xsl:param name="docid"/>
|
219 |
|
|
<xsl:param name="level">entitylevel</xsl:param>
|
220 |
|
|
<xsl:param name="entitytype">spatialVector</xsl:param>
|
221 |
|
|
<xsl:param name="entityindex"/>
|
222 |
|
|
<xsl:param name="physicalindex"/>
|
223 |
|
|
<xsl:for-each select="distribution">
|
224 |
|
|
<tr><td colspan="2">
|
225 |
|
|
<xsl:call-template name="distribution">
|
226 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
227 |
|
|
<xsl:with-param name="level" select="$level"/>
|
228 |
|
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
229 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
230 |
|
|
<xsl:with-param name="physicalindex" select="$physicalindex"/>
|
231 |
|
|
<xsl:with-param name="distributionindex" select="position()"/>
|
232 |
|
|
<xsl:with-param name="disfirstColStyle" select="$spatialvectorfirstColStyle"/>
|
233 |
|
|
<xsl:with-param name="dissubHeaderStyle" select="$spatialrasterHeaderStyle"/>
|
234 |
|
|
</xsl:call-template>
|
235 |
|
|
</td></tr>
|
236 |
|
|
</xsl:for-each>
|
237 |
|
|
</xsl:template>
|
238 |
|
|
|
239 |
|
|
|
240 |
|
|
<xsl:template name="spatialVectorAttributeList">
|
241 |
|
|
<xsl:param name="spatialvectorfirstColStyle"/>
|
242 |
|
|
<xsl:param name="spatialvectorsubHeaderStyle"/>
|
243 |
|
|
<xsl:param name="docid"/>
|
244 |
|
|
<xsl:param name="entitytype">spatialVector</xsl:param>
|
245 |
|
|
<xsl:param name="entityindex"/>
|
246 |
|
|
<tr><td class="{$spatialrasterHeaderStyle}" colspan="2">
|
247 |
|
|
<xsl:text>Attribute Info:</xsl:text>
|
248 |
|
|
</td></tr>
|
249 |
|
|
<tr><td colspan="2">
|
250 |
|
|
<xsl:call-template name="attributelist">
|
251 |
|
|
<xsl:with-param name="docid" select="$docid"/>
|
252 |
|
|
<xsl:with-param name="entitytype" select="$entitytype"/>
|
253 |
|
|
<xsl:with-param name="entityindex" select="$entityindex"/>
|
254 |
|
|
</xsl:call-template>
|
255 |
|
|
</td>
|
256 |
|
|
</tr>
|
257 |
|
|
</xsl:template>
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
|
261 |
|
|
</xsl:stylesheet>
|