1 |
1 |
<?xml version="1.0"?>
|
2 |
2 |
<xsl:stylesheet
|
3 |
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
4 |
|
xmlns:gmd="http://www.isotc211.org/2005/gmd"
|
5 |
|
xmlns:gco="http://www.isotc211.org/2005/gco"
|
6 |
|
xmlns:gml="http://www.opengis.net/gml/3.2" version="1.0">
|
7 |
|
|
|
3 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
4 |
xmlns:gmd="http://www.isotc211.org/2005/gmd"
|
|
5 |
xmlns:gco="http://www.isotc211.org/2005/gco"
|
|
6 |
xmlns:gml="http://www.opengis.net/gml/3.2" version="1.0">
|
8 |
7 |
<xsl:template match="gmd:EX_Extent">
|
9 |
|
<h4>Coverage</h4>
|
10 |
|
|
11 |
|
<!-- description -->
|
12 |
|
<xsl:if test=".//gmd:description">
|
13 |
|
<div class="control-group">
|
14 |
|
<label class="control-label">Description</label>
|
15 |
|
<div class="controls">
|
16 |
|
<div class="controls-well">
|
17 |
|
<xsl:apply-templates />
|
|
8 |
<h4>Coverage</h4>
|
|
9 |
<!-- description -->
|
|
10 |
<xsl:if test=".//gmd:description">
|
|
11 |
<div class="control-group">
|
|
12 |
<label class="control-label">Description</label>
|
|
13 |
<div class="controls">
|
|
14 |
<div class="controls-well">
|
|
15 |
<xsl:apply-templates />
|
|
16 |
</div>
|
|
17 |
</div>
|
18 |
18 |
</div>
|
19 |
|
</div>
|
20 |
|
</div>
|
21 |
|
</xsl:if>
|
|
19 |
</xsl:if>
|
22 |
20 |
|
23 |
|
<!-- Geographic -->
|
24 |
|
<xsl:for-each select=".//gmd:geographicElement">
|
25 |
|
<div class="row-fluid geographicCoverage">
|
26 |
|
<div class="control-group">
|
27 |
|
<label class="control-label">Geographic</label>
|
28 |
|
<div class="controls">
|
29 |
|
<div class="controls-well">
|
30 |
|
<xsl:apply-templates />
|
31 |
|
</div>
|
|
21 |
<!-- Geographic -->
|
|
22 |
<xsl:for-each select=".//gmd:geographicElement">
|
|
23 |
<div class="row-fluid geographicCoverage">
|
|
24 |
<div class="control-group">
|
|
25 |
<label class="control-label">Geographic</label>
|
|
26 |
<div class="controls">
|
|
27 |
<div class="controls-well">
|
|
28 |
<xsl:apply-templates />
|
|
29 |
</div>
|
|
30 |
</div>
|
|
31 |
</div>
|
32 |
32 |
</div>
|
33 |
|
</div>
|
34 |
|
</div>
|
35 |
|
</xsl:for-each>
|
|
33 |
</xsl:for-each>
|
36 |
34 |
|
37 |
|
<!-- Temporal -->
|
38 |
|
<xsl:for-each select=".//gmd:temporalElement">
|
39 |
|
<div class="control-group">
|
40 |
|
<label class="control-label">Temporal</label>
|
41 |
|
<div class="controls">
|
42 |
|
<div class="controls-well">
|
43 |
|
<xsl:apply-templates />
|
|
35 |
<!-- Temporal -->
|
|
36 |
<xsl:for-each select=".//gmd:temporalElement">
|
|
37 |
<div class="control-group">
|
|
38 |
<label class="control-label">Temporal</label>
|
|
39 |
<div class="controls">
|
|
40 |
<div class="controls-well">
|
|
41 |
<xsl:apply-templates />
|
|
42 |
</div>
|
|
43 |
</div>
|
44 |
44 |
</div>
|
45 |
|
</div>
|
46 |
|
</div>
|
47 |
|
</xsl:for-each>
|
|
45 |
</xsl:for-each>
|
48 |
46 |
|
49 |
|
<!-- Vertical -->
|
50 |
|
<xsl:for-each select=".//gmd:verticalElement">
|
51 |
|
<div class="control-group">
|
52 |
|
<label class="control-label">Vertical</label>
|
53 |
|
<div class="controls">
|
54 |
|
<div class="controls-well">
|
55 |
|
<xsl:apply-templates />
|
|
47 |
<!-- Vertical -->
|
|
48 |
<xsl:for-each select=".//gmd:verticalElement">
|
|
49 |
<div class="control-group">
|
|
50 |
<label class="control-label">Vertical</label>
|
|
51 |
<div class="controls">
|
|
52 |
<div class="controls-well">
|
|
53 |
<xsl:apply-templates />
|
|
54 |
</div>
|
|
55 |
</div>
|
56 |
56 |
</div>
|
57 |
|
</div>
|
58 |
|
</div>
|
59 |
|
</xsl:for-each>
|
|
57 |
</xsl:for-each>
|
60 |
58 |
</xsl:template>
|
61 |
59 |
|
62 |
|
<!-- EX_GeographicExtent-->
|
63 |
|
<xsl:template match="gmd:EX_GeographicExtent">
|
64 |
|
<xsl:apply-templates />
|
65 |
|
</xsl:template>
|
|
60 |
<!-- EX_GeographicExtent-->
|
|
61 |
<xsl:template match="gmd:EX_GeographicExtent">
|
|
62 |
<xsl:apply-templates />
|
|
63 |
</xsl:template>
|
66 |
64 |
|
67 |
|
<!-- EX_BoundingPolygon-->
|
68 |
|
<xsl:template match="gmd:EX_BoundingPolygon">
|
69 |
|
<xsl:apply-templates />
|
70 |
|
</xsl:template>
|
|
65 |
<!-- EX_BoundingPolygon-->
|
|
66 |
<xsl:template match="gmd:EX_BoundingPolygon">
|
|
67 |
<xsl:apply-templates />
|
|
68 |
</xsl:template>
|
71 |
69 |
|
72 |
|
<!-- EX_GeographicDescription-->
|
73 |
|
<xsl:template match="gmd:EX_GeographicDescription">
|
74 |
|
<xsl:apply-templates />
|
75 |
|
</xsl:template>
|
|
70 |
<!-- EX_GeographicDescription-->
|
|
71 |
<xsl:template match="gmd:EX_GeographicDescription">
|
|
72 |
<xsl:apply-templates />
|
|
73 |
</xsl:template>
|
76 |
74 |
|
|
75 |
<!-- EX_GeographicBoundingBox-->
|
|
76 |
<xsl:template match="gmd:EX_GeographicBoundingBox">
|
|
77 |
<!-- Set up variables for N E S W -->
|
|
78 |
<xsl:variable name="north">
|
|
79 |
<xsl:value-of select="./gmd:northBoundLatitude/gco:Decimal/text()" />
|
|
80 |
</xsl:variable>
|
|
81 |
<xsl:variable name="east">
|
|
82 |
<xsl:value-of select="./gmd:eastBoundLongitude/gco:Decimal/text()" />
|
|
83 |
</xsl:variable>
|
|
84 |
<xsl:variable name="south">
|
|
85 |
<xsl:value-of select="./gmd:southBoundLatitude/gco:Decimal/text()" />
|
|
86 |
</xsl:variable>
|
|
87 |
<xsl:variable name="west">
|
|
88 |
<xsl:value-of select="./gmd:westBoundLongitude/gco:Decimal/text()" />
|
|
89 |
</xsl:variable>
|
|
90 |
<div data-value="{$north}" data-content="northBoundingCoordinate" class="control-group northBoundingCoordinate">
|
|
91 |
<label class="control-label">North</label>
|
|
92 |
<div class="controls">
|
|
93 |
<div class="controls-well">
|
|
94 |
<xsl:value-of select="$north" />  degrees
|
|
95 |
</div>
|
|
96 |
</div>
|
|
97 |
</div>
|
|
98 |
<div data-value="{$east}" data-content="eastBoundingCoordinate" class="control-group eastBoundingCoordinate">
|
|
99 |
<label class="control-label">East</label>
|
|
100 |
<div class="controls">
|
|
101 |
<div class="controls-well">
|
|
102 |
<xsl:value-of select="$east" />  degrees
|
|
103 |
</div>
|
|
104 |
</div>
|
|
105 |
</div>
|
|
106 |
<div data-value="{$south}" data-content="southBoundingCoordinate" class="control-group southBoundingCoordinate">
|
|
107 |
<label class="control-label">South</label>
|
|
108 |
<div class="controls">
|
|
109 |
<div class="controls-well">
|
|
110 |
<xsl:value-of select="$south" />  degrees
|
|
111 |
</div>
|
|
112 |
</div>
|
|
113 |
</div>
|
|
114 |
<div data-value="{$west}" data-content="westBoundingCoordinate" class="control-group westBoundingCoordinate">
|
|
115 |
<label class="control-label">West</label>
|
|
116 |
<div class="controls">
|
|
117 |
<div class="controls-well">
|
|
118 |
<xsl:value-of select="$west" />  degrees
|
|
119 |
</div>
|
|
120 |
</div>
|
|
121 |
</div>
|
|
122 |
<xsl:apply-templates select="./gmd:extentTypeCode" />
|
|
123 |
</xsl:template>
|
77 |
124 |
|
78 |
|
|
79 |
|
<!-- EX_GeographicBoundingBox-->
|
80 |
|
<xsl:template match="gmd:EX_GeographicBoundingBox">
|
81 |
|
<!-- Set up variables for N E S W -->
|
82 |
|
<xsl:variable name="north"><xsl:value-of select="./gmd:northBoundLatitude/gco:Decimal/text()" /></xsl:variable>
|
83 |
|
<xsl:variable name="east"><xsl:value-of select="./gmd:eastBoundLongitude/gco:Decimal/text()" /></xsl:variable>
|
84 |
|
<xsl:variable name="south"><xsl:value-of select="./gmd:southBoundLatitude/gco:Decimal/text()" /></xsl:variable>
|
85 |
|
<xsl:variable name="west"><xsl:value-of select="./gmd:westBoundLongitude/gco:Decimal/text()" /></xsl:variable>
|
86 |
|
|
87 |
|
<div data-value="{$north}" data-content="northBoundingCoordinate" class="control-group northBoundingCoordinate">
|
88 |
|
<label class="control-label">North</label>
|
89 |
|
<div class="controls">
|
90 |
|
<div class="controls-well">
|
91 |
|
<xsl:value-of select="$north" />  degrees
|
92 |
|
</div>
|
93 |
|
</div>
|
94 |
|
</div>
|
95 |
|
|
96 |
|
<div data-value="{$east}" data-content="eastBoundingCoordinate" class="control-group eastBoundingCoordinate">
|
97 |
|
<label class="control-label">East</label>
|
98 |
|
<div class="controls">
|
99 |
|
<div class="controls-well">
|
100 |
|
<xsl:value-of select="$east" />  degrees
|
101 |
|
</div>
|
102 |
|
</div>
|
103 |
|
</div>
|
104 |
|
|
105 |
|
<div data-value="{$south}" data-content="southBoundingCoordinate" class="control-group southBoundingCoordinate">
|
106 |
|
<label class="control-label">South</label>
|
107 |
|
<div class="controls">
|
108 |
|
<div class="controls-well">
|
109 |
|
<xsl:value-of select="$south" />  degrees
|
110 |
|
</div>
|
111 |
|
</div>
|
112 |
|
</div>
|
113 |
|
|
114 |
|
<div data-value="{$west}" data-content="westBoundingCoordinate" class="control-group westBoundingCoordinate">
|
115 |
|
<label class="control-label">West</label>
|
116 |
|
<div class="controls">
|
117 |
|
<div class="controls-well">
|
118 |
|
<xsl:value-of select="$west" />  degrees
|
119 |
|
</div>
|
120 |
|
</div>
|
121 |
|
</div>
|
122 |
|
|
123 |
|
<xsl:apply-templates select="./gmd:extentTypeCode" />
|
124 |
|
</xsl:template>
|
125 |
|
|
126 |
|
<xsl:template match="gmd:polygon">
|
127 |
|
<div class="control-group">
|
128 |
|
<label class="control-label">Polygon</label>
|
129 |
|
<div class="controls">
|
130 |
|
<div class="controls-well">
|
131 |
|
<xsl:apply-templates />
|
|
125 |
<!-- gmd:polygon -->
|
|
126 |
<xsl:template match="gmd:polygon">
|
|
127 |
<div class="control-group">
|
|
128 |
<label class="control-label">Polygon</label>
|
|
129 |
<div class="controls">
|
|
130 |
<div class="controls-well">
|
|
131 |
<xsl:apply-templates />
|
|
132 |
</div>
|
|
133 |
</div>
|
132 |
134 |
</div>
|
133 |
|
</div>
|
134 |
|
</div>
|
135 |
|
</xsl:template>
|
|
135 |
</xsl:template>
|
136 |
136 |
|
137 |
|
<!-- EX_TemporalExtent -->
|
138 |
|
<xsl:template match="gmd:EX_TemporalExtent">
|
139 |
|
<xsl:apply-templates select=".//gmd:extent/*" />
|
140 |
|
</xsl:template>
|
|
137 |
<!-- EX_TemporalExtent -->
|
|
138 |
<xsl:template match="gmd:EX_TemporalExtent">
|
|
139 |
<xsl:apply-templates select=".//gmd:extent/*" />
|
|
140 |
</xsl:template>
|
141 |
141 |
|
142 |
|
<!-- EX_VerticalExtent-->
|
143 |
|
<!-- TODO: Improve DOM structure -->
|
144 |
|
<xsl:template name="verticalextent" match="gmd:EX_VerticalExtent">
|
145 |
|
<span>minimumValue:
|
146 |
|
<xsl:value-of select="./gmd:minimumValue/gco:Real" />
|
147 |
|
</span>
|
148 |
|
<span>maximumValue:
|
149 |
|
<xsl:value-of select="./gmd:maximumValue/gco:Real" />
|
150 |
|
</span>
|
151 |
|
<!-- TODO: Flesh this out a bit more -->
|
152 |
|
<span>verticalCRS:
|
153 |
|
<xsl:value-of select="./gmd:verticalCRS" />
|
154 |
|
</span>
|
155 |
|
</xsl:template>
|
|
142 |
<!-- EX_VerticalExtent-->
|
|
143 |
<!-- TODO: Improve DOM structure -->
|
|
144 |
<!-- TODO: Flesh this out a bit more... -->
|
|
145 |
<xsl:template match="gmd:EX_VerticalExtent">
|
|
146 |
<span>minimumValue:
|
|
147 |
<xsl:value-of select="./gmd:minimumValue/gco:Real" />
|
|
148 |
</span>
|
|
149 |
<span>maximumValue:
|
|
150 |
<xsl:value-of select="./gmd:maximumValue/gco:Real" />
|
|
151 |
</span>
|
|
152 |
<span>verticalCRS:
|
|
153 |
<xsl:value-of select="./gmd:verticalCRS" />
|
|
154 |
</span>
|
|
155 |
</xsl:template>
|
156 |
156 |
|
157 |
|
<!-- TimeInstant-->
|
158 |
|
<!-- TODO
|
|
157 |
<!-- TimeInstant-->
|
|
158 |
<!-- TODO
|
159 |
159 |
- Attributes: frame, calendarEraName, indeterminatePosition
|
160 |
160 |
-->
|
161 |
|
<xsl:template name="timeinstant" match="gml:TimeInstant">
|
162 |
|
<span>time instant</span>
|
163 |
|
<span>description:
|
164 |
|
<xsl:value-of select=".//gmd:description" />
|
165 |
|
</span>
|
166 |
|
<span>
|
167 |
|
<span>timePosition:
|
168 |
|
<xsl:value-of select=".//gml:timePosition" />
|
169 |
|
</span>
|
170 |
|
<xsl:if test=".//gml:timePosition/@calendarEraName">
|
171 |
|
<span>
|
172 |
|
<xsl:value-of select=".//gml:timePosition/@calendarEraName" /> (calendarEraName)
|
|
161 |
<xsl:template match="gml:TimeInstant">
|
|
162 |
<span>time instant</span>
|
|
163 |
<span>description:
|
|
164 |
<xsl:value-of select=".//gmd:description" />
|
173 |
165 |
</span>
|
174 |
|
</xsl:if>
|
175 |
|
<xsl:if test=".//gml:timePosition/@indeterminatePosition">
|
176 |
|
<span>
|
177 |
|
<xsl:value-of select=".//gml:timePosition/@indeterminatePosition" /> (indeterminatePosition)
|
178 |
|
</span>
|
179 |
|
</xsl:if>
|
180 |
|
</span>
|
181 |
|
</xsl:template>
|
|
166 |
<div>
|
|
167 |
<span>timePosition:
|
|
168 |
<xsl:value-of select=".//gml:timePosition" />
|
|
169 |
</span>
|
|
170 |
<xsl:if test=".//gml:timePosition/@calendarEraName">
|
|
171 |
<span>
|
|
172 |
<xsl:value-of select=".//gml:timePosition/@calendarEraName" /> (calendarEraName)
|
|
173 |
</span>
|
|
174 |
</xsl:if>
|
|
175 |
<xsl:if test=".//gml:timePosition/@indeterminatePosition">
|
|
176 |
<span>
|
|
177 |
<xsl:value-of select=".//gml:timePosition/@indeterminatePosition" /> (indeterminatePosition)
|
|
178 |
</span>
|
|
179 |
</xsl:if>
|
|
180 |
</div>
|
|
181 |
</xsl:template>
|
182 |
182 |
|
183 |
|
<!-- TimePeriod-->
|
184 |
|
<!-- TODO:
|
|
183 |
<!-- TimePeriod-->
|
|
184 |
<!-- TODO:
|
185 |
185 |
- All the attributes
|
186 |
186 |
- timeInterval units, radix, factor
|
187 |
187 |
-->
|
188 |
|
<xsl:template name="timeperiod" match="gml:TimePeriod">
|
|
188 |
<xsl:template match="gml:TimePeriod">
|
|
189 |
<xsl:if test=".//gml:beginPosition">
|
|
190 |
<div class="control-group">
|
|
191 |
<label class="control-label">Begin</label>
|
|
192 |
<div class="controls">
|
|
193 |
<span>
|
|
194 |
<xsl:value-of select=".//gml:beginPosition" />
|
|
195 |
</span>
|
|
196 |
<xsl:if test=".//gml:beginPosition/@calendarEraName">
|
|
197 |
<span>
|
|
198 |
<xsl:value-of select=".//gml:beginPosition/@calendarEraName" /> (calendarEraName)
|
|
199 |
</span>
|
|
200 |
</xsl:if>
|
|
201 |
<xsl:if test=".//gml:beginPosition/@indeterminatePosition">
|
|
202 |
<span>
|
|
203 |
<xsl:value-of select=".//gml:beginPosition/@indeterminatePosition" /> (indeterminatePosition)
|
|
204 |
</span>
|
|
205 |
</xsl:if>
|
|
206 |
</div>
|
|
207 |
</div>
|
|
208 |
</xsl:if>
|
|
209 |
<xsl:if test=".//gml:endPosition">
|
|
210 |
<div class="control-group">
|
|
211 |
<label class="control-label">End</label>
|
|
212 |
<div class="controls">
|
|
213 |
<span>
|
|
214 |
<xsl:value-of select=".//gml:endPosition" />
|
|
215 |
</span>
|
|
216 |
<xsl:if test=".//gml:endPosition/@calendarEraName">
|
|
217 |
<span>
|
|
218 |
<xsl:value-of select=".//gml:endPosition/@calendarEraName" /> (calendarEraName)
|
|
219 |
</span>
|
|
220 |
</xsl:if>
|
|
221 |
<xsl:if test=".//gml:endPosition/@indeterminatePosition">
|
|
222 |
<span>
|
|
223 |
<xsl:value-of select=".//gml:endPosition/@indeterminatePosition" /> (indeterminatePosition)
|
|
224 |
</span>
|
|
225 |
</xsl:if>
|
|
226 |
</div>
|
|
227 |
</div>
|
|
228 |
</xsl:if>
|
|
229 |
<xsl:if test=".//gml:duration">
|
|
230 |
<span>duration:
|
|
231 |
<xsl:value-of select=".//gml:duration" />
|
|
232 |
</span>
|
|
233 |
</xsl:if>
|
|
234 |
<xsl:if test=".//gml:timeInterval">
|
|
235 |
<span>timeInterval:
|
|
236 |
<xsl:value-of select=".//gml:timeInterval" />
|
|
237 |
</span>
|
|
238 |
</xsl:if>
|
|
239 |
</xsl:template>
|
189 |
240 |
|
190 |
|
|
191 |
|
|
192 |
|
|
193 |
|
<xsl:if test=".//gml:beginPosition">
|
194 |
|
<div class="control-group">
|
195 |
|
<label class="control-label">Begin</label>
|
196 |
|
<div class="controls">
|
197 |
|
<span><xsl:value-of select=".//gml:beginPosition" /></span>
|
198 |
|
<xsl:if test=".//gml:beginPosition/@calendarEraName">
|
199 |
|
<span><xsl:value-of select=".//gml:beginPosition/@calendarEraName" /> (calendarEraName)</span>
|
200 |
|
</xsl:if>
|
201 |
|
<xsl:if test=".//gml:beginPosition/@indeterminatePosition">
|
202 |
|
<span><xsl:value-of select=".//gml:beginPosition/@indeterminatePosition" /> (indeterminatePosition)</span>
|
203 |
|
</xsl:if>
|
|
241 |
<!-- extentTypeCode -->
|
|
242 |
<xsl:template match="gmd:extentTypeCode">
|
|
243 |
<div class="control-group extentTypeCode">
|
|
244 |
<label class="control-label">Type</label>
|
|
245 |
<div class="controls">
|
|
246 |
<xsl:choose>
|
|
247 |
<xsl:when test="./gco:Boolean = 0">Exclusive</xsl:when>
|
|
248 |
<xsl:when test="./gco:Boolean = 1">Inclusive</xsl:when>
|
|
249 |
<xsl:when test="./@nilReason">
|
|
250 |
<xsl:value-of select="./@nilReason" />
|
|
251 |
</xsl:when>
|
|
252 |
</xsl:choose>
|
|
253 |
</div>
|
204 |
254 |
</div>
|
205 |
|
</div>
|
206 |
|
</xsl:if>
|
207 |
|
|
208 |
|
<xsl:if test=".//gml:endPosition">
|
209 |
|
<div class="control-group">
|
210 |
|
<label class="control-label">End</label>
|
211 |
|
<div class="controls">
|
212 |
|
<span><xsl:value-of select=".//gml:endPosition" /></span>
|
213 |
|
<xsl:if test=".//gml:endPosition/@calendarEraName">
|
214 |
|
<span><xsl:value-of select=".//gml:endPosition/@calendarEraName" /> (calendarEraName)</span>
|
215 |
|
</xsl:if>
|
216 |
|
<xsl:if test=".//gml:endPosition/@indeterminatePosition">
|
217 |
|
<span><xsl:value-of select=".//gml:endPosition/@indeterminatePosition" /> (indeterminatePosition)</span>
|
218 |
|
</xsl:if>
|
219 |
|
</div>
|
220 |
|
</div>
|
221 |
|
</xsl:if>
|
222 |
|
|
223 |
|
<xsl:if test=".//gml:duration">
|
224 |
|
<span>duration:
|
225 |
|
<xsl:value-of select=".//gml:duration" />
|
226 |
|
</span>
|
227 |
|
</xsl:if>
|
228 |
|
|
229 |
|
<xsl:if test=".//gml:timeInterval">
|
230 |
|
<span>timeInterval:
|
231 |
|
<xsl:value-of select=".//gml:timeInterval" />
|
232 |
|
</span>
|
233 |
|
</xsl:if>
|
234 |
|
</xsl:template>
|
235 |
|
|
236 |
|
<!-- extentTypeCode -->
|
237 |
|
<xsl:template match="gmd:extentTypeCode">
|
238 |
|
<div class="control-group extentTypeCode">
|
239 |
|
<label class="control-label">Type</label>
|
240 |
|
<div class="controls">
|
241 |
|
<xsl:choose>
|
242 |
|
<xsl:when test="./gco:Boolean = 0">Exclusion</xsl:when>
|
243 |
|
<xsl:when test="./gco:Boolean = 1">Inclusion</xsl:when>
|
244 |
|
<xsl:when test="./@nilReason"><xsl:value-of select="./@nilReason" /></xsl:when>
|
245 |
|
</xsl:choose>
|
246 |
|
</div>
|
247 |
|
</div>
|
248 |
|
</xsl:template>
|
|
255 |
</xsl:template>
|
249 |
256 |
</xsl:stylesheet>
|
Clean up ISO stylesheet formatting