1
|
<?xml version="1.0"?>
|
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"
|
7
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0">
|
8
|
<xsl:template match="gmd:EX_Extent">
|
9
|
<h4>Coverage</h4>
|
10
|
<!-- description -->
|
11
|
<xsl:if test=".//gmd:description">
|
12
|
<div class="control-group">
|
13
|
<label class="control-label">Description</label>
|
14
|
<div class="controls">
|
15
|
<div class="controls-well">
|
16
|
<xsl:apply-templates select=".//gmd:description" />
|
17
|
</div>
|
18
|
</div>
|
19
|
</div>
|
20
|
</xsl:if>
|
21
|
<!-- Geographic -->
|
22
|
<xsl:for-each select=".//gmd:geographicElement">
|
23
|
<!-- Dynamically add the geographicCoverage class depending on
|
24
|
whether this is a bounding box or not because Google Static Maps are
|
25
|
shown if the class is set but the current MetacatUI codebase only
|
26
|
supports rectangular bounding boxes and not geometries like
|
27
|
polygons.
|
28
|
-->
|
29
|
|
30
|
<xsl:element name="div">
|
31
|
<xsl:choose>
|
32
|
<xsl:when test=".//gmd:EX_GeographicBoundingBox">
|
33
|
<xsl:attribute name="class">row-fluid geographicCoverage</xsl:attribute>
|
34
|
</xsl:when>
|
35
|
<xsl:otherwise>
|
36
|
<xsl:attribute name="class">row-fluid</xsl:attribute>
|
37
|
</xsl:otherwise>
|
38
|
</xsl:choose>
|
39
|
|
40
|
<div class="control-group">
|
41
|
<label class="control-label">Geographic</label>
|
42
|
<div class="controls">
|
43
|
<div class="controls-well">
|
44
|
<xsl:apply-templates />
|
45
|
</div>
|
46
|
</div>
|
47
|
</div>
|
48
|
</xsl:element>
|
49
|
</xsl:for-each>
|
50
|
<!-- Temporal -->
|
51
|
<xsl:for-each select=".//gmd:temporalElement">
|
52
|
<div class="control-group">
|
53
|
<label class="control-label">Temporal</label>
|
54
|
<div class="controls">
|
55
|
<div class="controls-well">
|
56
|
<xsl:apply-templates />
|
57
|
</div>
|
58
|
</div>
|
59
|
</div>
|
60
|
</xsl:for-each>
|
61
|
<!-- Vertical -->
|
62
|
<xsl:for-each select=".//gmd:verticalElement">
|
63
|
<div class="control-group">
|
64
|
<label class="control-label">Vertical</label>
|
65
|
<div class="controls">
|
66
|
<div class="controls-well">
|
67
|
<xsl:apply-templates />
|
68
|
</div>
|
69
|
</div>
|
70
|
</div>
|
71
|
</xsl:for-each>
|
72
|
</xsl:template>
|
73
|
<!-- EX_GeographicExtent-->
|
74
|
<xsl:template match="gmd:EX_GeographicExtent">
|
75
|
<xsl:apply-templates />
|
76
|
</xsl:template>
|
77
|
<!-- EX_BoundingPolygon-->
|
78
|
<xsl:template match="gmd:EX_BoundingPolygon">
|
79
|
<xsl:apply-templates />
|
80
|
</xsl:template>
|
81
|
<!-- EX_GeographicDescription-->
|
82
|
<xsl:template match="gmd:EX_GeographicDescription">
|
83
|
<xsl:apply-templates />
|
84
|
</xsl:template>
|
85
|
<!-- EX_GeographicBoundingBox-->
|
86
|
<xsl:template match="gmd:EX_GeographicBoundingBox">
|
87
|
<!-- Set up variables for N E S W -->
|
88
|
<xsl:variable name="north">
|
89
|
<xsl:value-of select="./gmd:northBoundLatitude/gco:Decimal/text()" />
|
90
|
</xsl:variable>
|
91
|
<xsl:variable name="east">
|
92
|
<xsl:value-of select="./gmd:eastBoundLongitude/gco:Decimal/text()" />
|
93
|
</xsl:variable>
|
94
|
<xsl:variable name="south">
|
95
|
<xsl:value-of select="./gmd:southBoundLatitude/gco:Decimal/text()" />
|
96
|
</xsl:variable>
|
97
|
<xsl:variable name="west">
|
98
|
<xsl:value-of select="./gmd:westBoundLongitude/gco:Decimal/text()" />
|
99
|
</xsl:variable>
|
100
|
<div data-value="{$north}" data-content="northBoundingCoordinate" class="control-group northBoundingCoordinate">
|
101
|
<label class="control-label">North</label>
|
102
|
<div class="controls">
|
103
|
<div class="controls-well">
|
104
|
<xsl:value-of select="$north" />  degrees
|
105
|
</div>
|
106
|
</div>
|
107
|
</div>
|
108
|
<div data-value="{$east}" data-content="eastBoundingCoordinate" class="control-group eastBoundingCoordinate">
|
109
|
<label class="control-label">East</label>
|
110
|
<div class="controls">
|
111
|
<div class="controls-well">
|
112
|
<xsl:value-of select="$east" />  degrees
|
113
|
</div>
|
114
|
</div>
|
115
|
</div>
|
116
|
<div data-value="{$south}" data-content="southBoundingCoordinate" class="control-group southBoundingCoordinate">
|
117
|
<label class="control-label">South</label>
|
118
|
<div class="controls">
|
119
|
<div class="controls-well">
|
120
|
<xsl:value-of select="$south" />  degrees
|
121
|
</div>
|
122
|
</div>
|
123
|
</div>
|
124
|
<div data-value="{$west}" data-content="westBoundingCoordinate" class="control-group westBoundingCoordinate">
|
125
|
<label class="control-label">West</label>
|
126
|
<div class="controls">
|
127
|
<div class="controls-well">
|
128
|
<xsl:value-of select="$west" />  degrees
|
129
|
</div>
|
130
|
</div>
|
131
|
</div>
|
132
|
<xsl:apply-templates select="./gmd:extentTypeCode" />
|
133
|
</xsl:template>
|
134
|
<!-- gmd:polygon -->
|
135
|
<xsl:template match="gmd:polygon">
|
136
|
<div class="control-group">
|
137
|
<label class="control-label">Polygon</label>
|
138
|
<div class="controls">
|
139
|
<div class="controls-well">
|
140
|
<xsl:apply-templates />
|
141
|
</div>
|
142
|
</div>
|
143
|
</div>
|
144
|
</xsl:template>
|
145
|
<!-- EX_TemporalExtent -->
|
146
|
<xsl:template match="gmd:EX_TemporalExtent">
|
147
|
<xsl:apply-templates select=".//gmd:extent/*" />
|
148
|
</xsl:template>
|
149
|
<!-- EX_VerticalExtent-->
|
150
|
<xsl:template match="gmd:EX_VerticalExtent">
|
151
|
<div class="control-group">
|
152
|
<label class="control-label">Minimum</label>
|
153
|
<div class="controls">
|
154
|
<div class="controls-well">
|
155
|
<xsl:value-of select="./gmd:minimumValue/gco:Real" />
|
156
|
</div>
|
157
|
</div>
|
158
|
</div>
|
159
|
|
160
|
<div class="control-group">
|
161
|
<label class="control-label">Maximum</label>
|
162
|
<div class="controls">
|
163
|
<div class="controls-well">
|
164
|
<xsl:value-of select="./gmd:maximumValue/gco:Real" />
|
165
|
</div>
|
166
|
</div>
|
167
|
</div>
|
168
|
|
169
|
<div class="control-group">
|
170
|
<label class="control-label">CRS</label>
|
171
|
<div class="controls">
|
172
|
<div class="controls-well">
|
173
|
<xsl:apply-templates select="./gmd:verticalCRS" />
|
174
|
</div>
|
175
|
</div>
|
176
|
</div>
|
177
|
</xsl:template>
|
178
|
|
179
|
<!-- TimeInstant-->
|
180
|
<!-- TODO
|
181
|
- Attributes: frame, calendarEraName, indeterminatePosition
|
182
|
-->
|
183
|
<xsl:template match="gml:TimeInstant">
|
184
|
<label class="control-label">Instant</label>
|
185
|
<div class="controls">
|
186
|
<div class="controls-well">
|
187
|
<xsl:if test="./gmd:description">
|
188
|
<label class="control-label">Description</label>
|
189
|
<div class="controls">
|
190
|
<div class="controls-well">
|
191
|
<xsl:if test="./gmd:description">
|
192
|
<xsl:value-of select=".//gmd:description" />
|
193
|
</xsl:if>
|
194
|
</div>
|
195
|
</div>
|
196
|
</xsl:if>
|
197
|
<label class="control-label">Time Position</label>
|
198
|
<div class="controls">
|
199
|
<div class="controls-well">
|
200
|
<xsl:value-of select=".//gml:timePosition" />
|
201
|
</div>
|
202
|
</div>
|
203
|
<xsl:if test=".//gml:timePosition/@calendarEraName">
|
204
|
<label class="control-label">Calendar Era Name</label>
|
205
|
<div class="controls">
|
206
|
<div class="controls-well">
|
207
|
<xsl:value-of select=".//gml:timePosition/@calendarEraName" />
|
208
|
</div>
|
209
|
</div>
|
210
|
</xsl:if>
|
211
|
<xsl:if test=".//gml:timePosition/@indeterminatePosition">
|
212
|
<label class="control-label">Time Position</label>
|
213
|
<div class="controls">
|
214
|
<div class="controls-well">
|
215
|
<xsl:value-of select=".//gml:timePosition/@indeterminatePosition" />
|
216
|
</div>
|
217
|
</div>
|
218
|
</xsl:if>
|
219
|
</div>
|
220
|
</div>
|
221
|
</xsl:template>
|
222
|
<!-- TimePeriod-->
|
223
|
<!-- TODO:
|
224
|
- All the attributes
|
225
|
- timeInterval units, radix, factor
|
226
|
-->
|
227
|
<xsl:template match="gml:TimePeriod">
|
228
|
<xsl:if test=".//gml:beginPosition">
|
229
|
<div class="control-group">
|
230
|
<label class="control-label">Begin</label>
|
231
|
<div class="controls">
|
232
|
<div class="controls-well">
|
233
|
<xsl:value-of select=".//gml:beginPosition" />
|
234
|
</div>
|
235
|
<xsl:if test=".//gml:beginPosition/@calendarEraName">
|
236
|
<span>
|
237
|
<xsl:value-of select=".//gml:beginPosition/@calendarEraName" /> (calendarEraName)
|
238
|
</span>
|
239
|
</xsl:if>
|
240
|
<xsl:if test=".//gml:beginPosition/@indeterminatePosition">
|
241
|
<span>
|
242
|
<xsl:value-of select=".//gml:beginPosition/@indeterminatePosition" /> (indeterminatePosition)
|
243
|
</span>
|
244
|
</xsl:if>
|
245
|
</div>
|
246
|
</div>
|
247
|
</xsl:if>
|
248
|
<xsl:if test=".//gml:endPosition">
|
249
|
<div class="control-group">
|
250
|
<label class="control-label">End</label>
|
251
|
<div class="controls">
|
252
|
<div class="controls-well">
|
253
|
<xsl:value-of select=".//gml:endPosition" />
|
254
|
</div>
|
255
|
<xsl:if test=".//gml:endPosition/@calendarEraName">
|
256
|
<span>
|
257
|
<xsl:value-of select=".//gml:endPosition/@calendarEraName" /> (calendarEraName)
|
258
|
</span>
|
259
|
</xsl:if>
|
260
|
<xsl:if test=".//gml:endPosition/@indeterminatePosition">
|
261
|
<span>
|
262
|
<xsl:value-of select=".//gml:endPosition/@indeterminatePosition" /> (indeterminatePosition)
|
263
|
</span>
|
264
|
</xsl:if>
|
265
|
</div>
|
266
|
</div>
|
267
|
</xsl:if>
|
268
|
<xsl:if test=".//gml:duration">
|
269
|
<span>duration:
|
270
|
<xsl:value-of select=".//gml:duration" />
|
271
|
</span>
|
272
|
</xsl:if>
|
273
|
<xsl:if test=".//gml:timeInterval">
|
274
|
<span>timeInterval:
|
275
|
<xsl:value-of select=".//gml:timeInterval" />
|
276
|
</span>
|
277
|
</xsl:if>
|
278
|
</xsl:template>
|
279
|
<!-- extentTypeCode -->
|
280
|
<xsl:template match="gmd:extentTypeCode">
|
281
|
<div class="control-group extentTypeCode">
|
282
|
<label class="control-label">Type</label>
|
283
|
<div class="controls">
|
284
|
<xsl:choose>
|
285
|
<xsl:when test="./gco:Boolean = 0">Exclusive</xsl:when>
|
286
|
<xsl:when test="./gco:Boolean = 1">Inclusive</xsl:when>
|
287
|
<xsl:when test="./@nilReason">
|
288
|
<xsl:value-of select="./@nilReason" />
|
289
|
</xsl:when>
|
290
|
</xsl:choose>
|
291
|
</div>
|
292
|
</div>
|
293
|
</xsl:template>
|
294
|
</xsl:stylesheet>
|