1 |
10046
|
mecum
|
<?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" version="1.0">
|
7 |
|
|
|
8 |
10058
|
mecum
|
<xsl:template match="gmd:EX_Extent">
|
9 |
|
|
<h4>Extent</h4>
|
10 |
10046
|
mecum
|
|
11 |
10058
|
mecum
|
<!-- 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 />
|
18 |
|
|
</div>
|
19 |
10046
|
mecum
|
</div>
|
20 |
|
|
</div>
|
21 |
10058
|
mecum
|
</xsl:if>
|
22 |
10046
|
mecum
|
|
23 |
10058
|
mecum
|
<!-- Geographic -->
|
24 |
|
|
<xsl:for-each select=".//gmd:geographicElement">
|
25 |
|
|
<div class="control-group">
|
26 |
|
|
<label class="control-label">Geographic</label>
|
27 |
|
|
<div class="controls">
|
28 |
|
|
<div class="controls-well">
|
29 |
|
|
<xsl:apply-templates />
|
30 |
|
|
</div>
|
31 |
10046
|
mecum
|
</div>
|
32 |
|
|
</div>
|
33 |
10058
|
mecum
|
</xsl:for-each>
|
34 |
10046
|
mecum
|
|
35 |
10058
|
mecum
|
<!-- 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 |
10046
|
mecum
|
</div>
|
44 |
|
|
</div>
|
45 |
10058
|
mecum
|
</xsl:for-each>
|
46 |
10049
|
mecum
|
|
47 |
10058
|
mecum
|
<!-- 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 |
10046
|
mecum
|
</div>
|
56 |
|
|
</div>
|
57 |
10058
|
mecum
|
</xsl:for-each>
|
58 |
|
|
</xsl:template>
|
59 |
|
|
|
60 |
|
|
<!-- EX_GeographicExtent-->
|
61 |
|
|
<xsl:template match="gmd:EX_GeographicExtent">
|
62 |
|
|
<xsl:apply-templates />
|
63 |
10046
|
mecum
|
</xsl:template>
|
64 |
|
|
|
65 |
10058
|
mecum
|
<!-- EX_BoundingPolygon-->
|
66 |
|
|
<xsl:template match="gmd:EX_BoundingPolygon">
|
67 |
|
|
<xsl:apply-templates />
|
68 |
|
|
</xsl:template>
|
69 |
|
|
|
70 |
|
|
<!-- EX_GeographicDescription-->
|
71 |
|
|
<xsl:template match="gmd:EX_GeographicDescription">
|
72 |
|
|
<xsl:apply-templates />
|
73 |
|
|
</xsl:template>
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
10046
|
mecum
|
<!-- EX_GeographicBoundingBox-->
|
78 |
10058
|
mecum
|
<xsl:template match="gmd:EX_GeographicBoundingBox">
|
79 |
|
|
<!-- Set up variables for N E S W -->
|
80 |
|
|
<xsl:variable name="north"><xsl:value-of select="./gmd:northBoundLatitude/gco:Decimal/text()" /></xsl:variable>
|
81 |
10059
|
mecum
|
<xsl:variable name="east"><xsl:value-of select="./gmd:eastBoundLongitude/gco:Decimal/text()" /></xsl:variable>
|
82 |
10058
|
mecum
|
<xsl:variable name="south"><xsl:value-of select="./gmd:southBoundLatitude/gco:Decimal/text()" /></xsl:variable>
|
83 |
|
|
<xsl:variable name="west"><xsl:value-of select="./gmd:westBoundLongitude/gco:Decimal/text()" /></xsl:variable>
|
84 |
10049
|
mecum
|
|
85 |
|
|
<div data-value="{$north}" data-content="northBoundingCoordinate" class="control-group northBoundingCoordinate">
|
86 |
|
|
<label class="control-label">North</label>
|
87 |
|
|
<div class="controls"><xsl:value-of select="$north" />  degrees</div>
|
88 |
|
|
</div>
|
89 |
|
|
|
90 |
|
|
<div data-value="{$east}" data-content="eastBoundingCoordinate" class="control-group eastBoundingCoordinate">
|
91 |
|
|
<label class="control-label">East</label>
|
92 |
|
|
<div class="controls"><xsl:value-of select="$east" />  degrees</div>
|
93 |
|
|
</div>
|
94 |
|
|
|
95 |
|
|
<div data-value="{$south}" data-content="southBoundingCoordinate" class="control-group southBoundingCoordinate">
|
96 |
|
|
<label class="control-label">South</label>
|
97 |
|
|
<div class="controls"><xsl:value-of select="$south" />  degrees</div>
|
98 |
|
|
</div>
|
99 |
|
|
|
100 |
|
|
<div data-value="{$west}" data-content="westBoundingCoordinate" class="control-group westBoundingCoordinate">
|
101 |
|
|
<label class="control-label">West</label>
|
102 |
|
|
<div class="controls"><xsl:value-of select="$west" />  degrees</div>
|
103 |
|
|
</div>
|
104 |
|
|
|
105 |
10058
|
mecum
|
<xsl:apply-templates select="./gmd:extentTypeCode" />
|
106 |
10046
|
mecum
|
</xsl:template>
|
107 |
|
|
|
108 |
10058
|
mecum
|
<xsl:template match="gmd:polygon">
|
109 |
|
|
<div class="control-group">
|
110 |
|
|
<label class="control-label">Polygon</label>
|
111 |
|
|
<div class="controls">
|
112 |
|
|
<div class="controls-well">
|
113 |
|
|
<xsl:apply-templates />
|
114 |
|
|
</div>
|
115 |
|
|
</div>
|
116 |
|
|
</div>
|
117 |
10046
|
mecum
|
</xsl:template>
|
118 |
|
|
|
119 |
|
|
<!-- EX_TemporalExtent -->
|
120 |
10058
|
mecum
|
<xsl:template match="gmd:EX_TemporalExtent">
|
121 |
10046
|
mecum
|
<span>temporal extent
|
122 |
|
|
<xsl:apply-templates select=".//gmd:extent/*" />
|
123 |
|
|
</span>
|
124 |
|
|
</xsl:template>
|
125 |
|
|
|
126 |
|
|
<!-- EX_VerticalExtent-->
|
127 |
|
|
<!-- TODO: Improve DOM structure -->
|
128 |
|
|
<xsl:template name="verticalextent" match="gmd:EX_VerticalExtent">
|
129 |
|
|
<span>minimumValue:
|
130 |
|
|
<xsl:value-of select="./gmd:minimumValue/gco:Real" />
|
131 |
|
|
</span>
|
132 |
|
|
<span>maximumValue:
|
133 |
|
|
<xsl:value-of select="./gmd:maximumValue/gco:Real" />
|
134 |
|
|
</span>
|
135 |
|
|
<!-- TODO: Flesh this out a bit more -->
|
136 |
|
|
<span>verticalCRS:
|
137 |
|
|
<xsl:value-of select="./gmd:verticalCRS" />
|
138 |
|
|
</span>
|
139 |
|
|
</xsl:template>
|
140 |
|
|
|
141 |
|
|
<!-- TimeInstant-->
|
142 |
|
|
<!-- TODO
|
143 |
|
|
- Attributes: frame, calendarEraName, indeterminatePosition
|
144 |
|
|
-->
|
145 |
|
|
<xsl:template name="timeinstant" match="gml:TimeInstant">
|
146 |
|
|
<span>time instant</span>
|
147 |
|
|
<span>description:
|
148 |
|
|
<xsl:value-of select=".//gmd:description" />
|
149 |
|
|
</span>
|
150 |
|
|
<span>
|
151 |
|
|
<span>timePosition:
|
152 |
|
|
<xsl:value-of select=".//gml:timePosition" />
|
153 |
|
|
</span>
|
154 |
|
|
<xsl:if test=".//gml:timePosition/@calendarEraName">
|
155 |
|
|
<span>
|
156 |
|
|
<xsl:value-of select=".//gml:timePosition/@calendarEraName" /> (calendarEraName)
|
157 |
|
|
</span>
|
158 |
|
|
</xsl:if>
|
159 |
|
|
<xsl:if test=".//gml:timePosition/@indeterminatePosition">
|
160 |
|
|
<span>
|
161 |
|
|
<xsl:value-of select=".//gml:timePosition/@indeterminatePosition" /> (indeterminatePosition)
|
162 |
|
|
</span>
|
163 |
|
|
</xsl:if>
|
164 |
|
|
</span>
|
165 |
|
|
</xsl:template>
|
166 |
|
|
|
167 |
|
|
<!-- TimePeriod-->
|
168 |
|
|
<!-- TODO:
|
169 |
|
|
- All the attributes
|
170 |
|
|
- timeInterval units, radix, factor
|
171 |
|
|
-->
|
172 |
|
|
<xsl:template name="timeperiod" match="gml:TimePeriod">
|
173 |
10049
|
mecum
|
|
174 |
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
10046
|
mecum
|
<xsl:if test=".//gml:beginPosition">
|
178 |
10049
|
mecum
|
<div class="control-group">
|
179 |
|
|
<label class="control-label">Begin</label>
|
180 |
|
|
<div class="controls">
|
181 |
|
|
<span><xsl:value-of select=".//gml:beginPosition" /></span>
|
182 |
|
|
<xsl:if test=".//gml:beginPosition/@calendarEraName">
|
183 |
|
|
<span><xsl:value-of select=".//gml:beginPosition/@calendarEraName" /> (calendarEraName)</span>
|
184 |
|
|
</xsl:if>
|
185 |
|
|
<xsl:if test=".//gml:beginPosition/@indeterminatePosition">
|
186 |
|
|
<span><xsl:value-of select=".//gml:beginPosition/@indeterminatePosition" /> (indeterminatePosition)</span>
|
187 |
|
|
</xsl:if>
|
188 |
|
|
</div>
|
189 |
|
|
</div>
|
190 |
10046
|
mecum
|
</xsl:if>
|
191 |
|
|
|
192 |
|
|
<xsl:if test=".//gml:endPosition">
|
193 |
10049
|
mecum
|
<div class="control-group">
|
194 |
|
|
<label class="control-label">End</label>
|
195 |
|
|
<div class="controls">
|
196 |
|
|
<span><xsl:value-of select=".//gml:endPosition" /></span>
|
197 |
|
|
<xsl:if test=".//gml:endPosition/@calendarEraName">
|
198 |
|
|
<span><xsl:value-of select=".//gml:endPosition/@calendarEraName" /> (calendarEraName)</span>
|
199 |
|
|
</xsl:if>
|
200 |
|
|
<xsl:if test=".//gml:endPosition/@indeterminatePosition">
|
201 |
|
|
<span><xsl:value-of select=".//gml:endPosition/@indeterminatePosition" /> (indeterminatePosition)</span>
|
202 |
|
|
</xsl:if>
|
203 |
|
|
</div>
|
204 |
|
|
</div>
|
205 |
10046
|
mecum
|
</xsl:if>
|
206 |
|
|
|
207 |
|
|
<xsl:if test=".//gml:duration">
|
208 |
10056
|
mecum
|
<span>duration:
|
209 |
10046
|
mecum
|
<xsl:value-of select=".//gml:duration" />
|
210 |
|
|
</span>
|
211 |
|
|
</xsl:if>
|
212 |
|
|
|
213 |
|
|
<xsl:if test=".//gml:timeInterval">
|
214 |
|
|
<span>timeInterval:
|
215 |
|
|
<xsl:value-of select=".//gml:timeInterval" />
|
216 |
|
|
</span>
|
217 |
|
|
</xsl:if>
|
218 |
|
|
</xsl:template>
|
219 |
|
|
|
220 |
|
|
<!-- extentTypeCode -->
|
221 |
10058
|
mecum
|
<xsl:template match="gmd:extentTypeCode">
|
222 |
|
|
<div class="control-group extentTypeCode">
|
223 |
|
|
<label class="control-label">Type</label>
|
224 |
|
|
<div class="controls">
|
225 |
|
|
<xsl:choose>
|
226 |
|
|
<xsl:when test="./gco:Boolean = 0">Exclusion</xsl:when>
|
227 |
|
|
<xsl:when test="./gco:Boolean = 1">Inclusion</xsl:when>
|
228 |
|
|
<xsl:when test="./@nilReason"><xsl:value-of select="./@nilReason" /></xsl:when>
|
229 |
|
|
</xsl:choose>
|
230 |
|
|
</div>
|
231 |
|
|
</div>
|
232 |
10046
|
mecum
|
</xsl:template>
|
233 |
|
|
</xsl:stylesheet>
|