geoblacklight-schema 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/LICENSE +14 -0
- data/README.md +44 -0
- data/bin/fgdc2mods.rb +5 -0
- data/bin/mods2geoblacklight.rb +5 -0
- data/bin/xsltproc-saxon +14 -0
- data/conf/protwords.txt +21 -0
- data/conf/schema.xml +158 -0
- data/conf/solrconfig.xml +160 -0
- data/conf/stopwords_en.txt +34 -0
- data/conf/synonyms.txt +29 -0
- data/examples/Gemfile +4 -0
- data/examples/generate-example-doc.rb +42 -0
- data/examples/selected.json +5787 -0
- data/examples/upload-to-solr.rb +50 -0
- data/geoblacklight-schema.gemspec +23 -0
- data/lib/geoblacklight/gazetteer.csv +1011 -0
- data/lib/geoblacklight/gazetteer.rb +104 -0
- data/lib/xslt/arcgis_to_iso19110.xsl +364 -0
- data/lib/xslt/fgdc2mods.xsl +1007 -0
- data/lib/xslt/iso2mods.xsl +939 -0
- data/lib/xslt/mods2geoblacklight.xsl +268 -0
- data/lib/xslt/mods2ogp.xsl +195 -0
- data/tools/fgdc2html/Gemfile +2 -0
- data/tools/fgdc2html/fgdc2html.css +71 -0
- data/tools/fgdc2html/fgdc2html.js +6 -0
- data/tools/fgdc2html/fgdc2html.xsl +1034 -0
- data/tools/fgdc2html/render.rb +30 -0
- data/tools/iso2html/Gemfile +2 -0
- data/tools/iso2html/iso-html.xsl +1745 -0
- data/tools/iso2html/render.rb +24 -0
- data/tools/iso2html/utils/convert-enumerations.xsl +97 -0
- data/tools/iso2html/utils/convert-latlong.xsl +73 -0
- data/tools/iso2html/utils/decode-uri/base.css +408 -0
- data/tools/iso2html/utils/decode-uri/index.html +29 -0
- data/tools/iso2html/utils/elements-fgdc.xml +824 -0
- data/tools/iso2html/utils/elements-iso.xml +636 -0
- data/tools/iso2html/utils/printFormatted.xsl +267 -0
- data/tools/iso2html/utils/printTextLines.xsl +192 -0
- data/tools/iso2html/utils/replace-newlines.xsl +97 -0
- data/tools/iso2html/utils/replace-string.xsl +80 -0
- data/tools/iso2html/utils/strip-digits.xsl +60 -0
- data/tools/iso2html/utils/url-decode.xsl +87 -0
- data/tools/iso2html/utils/wrap-text.xsl +174 -0
- data/tools/ogp/0_download.rb +96 -0
- data/tools/ogp/1_validate.rb +225 -0
- data/tools/ogp/2_transform.rb +438 -0
- data/tools/ogp/3_stanford.rb +35 -0
- data/tools/ogp/4_select.rb +189 -0
- data/tools/ogp/5_ingest.rb +55 -0
- data/tools/ogp/Gemfile +2 -0
- data/tools/solr/Gemfile +3 -0
- data/tools/solr/purge.rb +33 -0
- data/tools/solr/upload.rb +35 -0
- data/vendor/.keep +0 -0
- metadata +131 -0
@@ -0,0 +1,1007 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!--
|
3
|
+
fgdc2mods.xsl - Transformation from FGDC into MODS v3
|
4
|
+
|
5
|
+
|
6
|
+
Copyright 2013-2014, The Board of Trustees of the Leland Stanford Junior University
|
7
|
+
|
8
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
you may not use this file except in compliance with the License.
|
10
|
+
You may obtain a copy of the License at
|
11
|
+
|
12
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
|
14
|
+
Unless required by applicable law or agreed to in writing, software
|
15
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
See the License for the specific language governing permissions and
|
18
|
+
limitations under the License.
|
19
|
+
|
20
|
+
|
21
|
+
Created by Kim Durante and Darren Hardy, Stanford University Libraries
|
22
|
+
|
23
|
+
Requires parameters:
|
24
|
+
* geometryType: One of Point, LineString, Polygon, Curve, or Grid (Raster).
|
25
|
+
see
|
26
|
+
http://www.schemacentral.com/sc/niem21/t-gml32_GeometryPropertyType.html
|
27
|
+
* purl - e.g., http://purl.stanford.edu/aa111bb2222 or another UUID/URN
|
28
|
+
* format - e.g., MIME type application/x-esri-shapefile
|
29
|
+
|
30
|
+
May need other element sources for formats if not in 'formname' tag
|
31
|
+
|
32
|
+
-->
|
33
|
+
<xsl:stylesheet
|
34
|
+
xmlns="http://www.loc.gov/mods/v3"
|
35
|
+
xmlns:gco="http://www.isotc211.org/2005/gco"
|
36
|
+
xmlns:gmi="http://www.isotc211.org/2005/gmi"
|
37
|
+
xmlns:gmd="http://www.isotc211.org/2005/gmd"
|
38
|
+
xmlns:gml="http://www.opengis.net/gml"
|
39
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
40
|
+
version="2.0" exclude-result-prefixes="gml gmd gco gmi xsl">
|
41
|
+
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
|
42
|
+
<xsl:strip-space elements="*"/>
|
43
|
+
<xsl:param name="format" select="'application/x-esri-shapefile'"/>
|
44
|
+
<xsl:param name="geometryType"/>
|
45
|
+
<xsl:param name="purl"/>
|
46
|
+
<xsl:param name="zipName" select="'data.zip'"/>
|
47
|
+
<!-- The coordinates value for MODS v3 is quite vague,
|
48
|
+
so we have a variety of formats:
|
49
|
+
GMD, WKT, WMS, GML, GeoRSS, MARC034, MARC255 (default)
|
50
|
+
-->
|
51
|
+
<xsl:param name="geoformat" select="'MARC255'"/>
|
52
|
+
<xsl:param name="fileIdentifier" select="''"/>
|
53
|
+
<xsl:template match="metadata">
|
54
|
+
|
55
|
+
<!-- geometryType for dc:type -->
|
56
|
+
<xsl:variable name="geometryType">
|
57
|
+
<xsl:choose>
|
58
|
+
<xsl:when test="idinfo/keywords/theme/themekey[contains(.,'line')]">
|
59
|
+
<xsl:text>Line</xsl:text>
|
60
|
+
</xsl:when>
|
61
|
+
<xsl:when test="idinfo/keywords/theme/themekey[contains(.,'point')]">
|
62
|
+
<xsl:text>Point</xsl:text>
|
63
|
+
</xsl:when>
|
64
|
+
<xsl:when test="idinfo/keywords/theme/themekey[contains(.,'polygon')]">
|
65
|
+
<xsl:text>Polygon</xsl:text>
|
66
|
+
</xsl:when>
|
67
|
+
<xsl:when test="spdoinfo/ptvctinf/esriterm/efeageom">
|
68
|
+
<xsl:value-of select="spdoinfo/ptvctinf/esriterm/efeageom"/>
|
69
|
+
</xsl:when>
|
70
|
+
<xsl:when test="spdoinfo/direct[contains(., 'Raster')]">
|
71
|
+
<xsl:text>Raster</xsl:text>
|
72
|
+
</xsl:when>
|
73
|
+
<xsl:when test="spdoinfo/ptvctinf/sdtsterm/sdtstype[contains(., 'G-polygon')]">
|
74
|
+
<xsl:text>Polygon</xsl:text>
|
75
|
+
</xsl:when>
|
76
|
+
<xsl:when test="spdoinfo/ptvctinf/sdtsterm/sdtstype[contains(., 'String')]">
|
77
|
+
<xsl:text>Line</xsl:text>
|
78
|
+
</xsl:when>
|
79
|
+
<xsl:when test="spdoinfo/ptvctinf/sdtsterm/sdtstype[contains(., 'Entity point')]">
|
80
|
+
<xsl:text>Point</xsl:text>
|
81
|
+
</xsl:when>
|
82
|
+
</xsl:choose>
|
83
|
+
</xsl:variable>
|
84
|
+
|
85
|
+
<!-- institution for mods:recordContentSource -->
|
86
|
+
<xsl:variable name="institution">
|
87
|
+
<xsl:for-each select="distinfo/distrib">
|
88
|
+
<xsl:choose>
|
89
|
+
<xsl:when test="contains(cntinfo/cntorgp/cntorg, 'Harvard')">
|
90
|
+
<xsl:text>Harvard</xsl:text>
|
91
|
+
</xsl:when>
|
92
|
+
<xsl:when test="contains(cntinfo/cntorgp/cntorg, 'Tufts')">
|
93
|
+
<xsl:text>Tufts</xsl:text>
|
94
|
+
</xsl:when>
|
95
|
+
<xsl:when test="contains(cntinfo/cntorgp/cntorg, 'MIT')">
|
96
|
+
<xsl:text>MIT</xsl:text>
|
97
|
+
</xsl:when>
|
98
|
+
<xsl:when test="contains(cntinfo/cntorgp/cntorg, 'Massachusetts')">
|
99
|
+
<xsl:text>MassGIS</xsl:text>
|
100
|
+
</xsl:when>
|
101
|
+
<xsl:when test="contains(//metainfo/metc/cntinfo/cntperp/cntorg, 'MassGIS')">
|
102
|
+
<xsl:text>MassGIS</xsl:text>
|
103
|
+
</xsl:when>
|
104
|
+
<xsl:when test="contains(distinfo/distrib/cntinfo/cntemail, 'state.ma.us')">
|
105
|
+
<xsl:text>MassGIS</xsl:text>
|
106
|
+
</xsl:when>
|
107
|
+
<xsl:when test="contains(//metainfo/metc/cntinfo/cntemail, 'ca.gov')">
|
108
|
+
<xsl:text>Berkeley</xsl:text>
|
109
|
+
</xsl:when>
|
110
|
+
<xsl:when test="contains(//metainfo/metc/cntinfo/cntorgp/cntorg, 'Columbia')">
|
111
|
+
<xsl:text>Columbia</xsl:text>
|
112
|
+
</xsl:when>
|
113
|
+
<xsl:when test="contains(//cntinfo/cntorgp/cntorg, 'Harvard')">
|
114
|
+
<xsl:text>Harvard</xsl:text>
|
115
|
+
</xsl:when>
|
116
|
+
|
117
|
+
</xsl:choose>
|
118
|
+
</xsl:for-each>
|
119
|
+
</xsl:variable>
|
120
|
+
|
121
|
+
<!-- fileidentifier for mods:recordIdentifier -->
|
122
|
+
<xsl:variable name="recordID">
|
123
|
+
<xsl:choose>
|
124
|
+
<xsl:when test="contains($institution, 'Tufts')">
|
125
|
+
<xsl:text>urn:geodata.tufts.edu:Tufts.</xsl:text>
|
126
|
+
<xsl:value-of select="substring-before(tokenize(base-uri(), '/')[last()], '.xml')"/>
|
127
|
+
</xsl:when>
|
128
|
+
<xsl:when test="contains($institution, 'MIT')">
|
129
|
+
<xsl:text>urn:arrowsmith.mit.edu:MIT.SDE_DATA.</xsl:text>
|
130
|
+
<xsl:value-of select="substring-before(tokenize(base-uri(), '/')[last()], '.xml')"/>
|
131
|
+
</xsl:when>
|
132
|
+
<xsl:when test="contains($institution, 'Harvard')">
|
133
|
+
<xsl:text>urn:hul.harvard.edu:HARVARD.</xsl:text>
|
134
|
+
<xsl:value-of select="substring-before(tokenize(base-uri(), '/')[last()], '.xml')"/>
|
135
|
+
</xsl:when>
|
136
|
+
<xsl:when test="contains($institution, 'MassGIS')">
|
137
|
+
<xsl:text>urn:massgis.state.ma.us:MassGIS.</xsl:text>
|
138
|
+
<xsl:value-of select="substring-before(tokenize(base-uri(), '/')[last()], '.xml')"/>
|
139
|
+
</xsl:when>
|
140
|
+
<xsl:when test="contains($institution, 'Berkeley')">
|
141
|
+
<xsl:text>urn:gis.library.berkeley.edu.</xsl:text>
|
142
|
+
<xsl:value-of select="substring-before(tokenize(base-uri(), '/')[last()], '.xml')"/>
|
143
|
+
</xsl:when>
|
144
|
+
<xsl:when test="contains($institution, 'Columbia')">
|
145
|
+
<xsl:text>urn:gis.library.columbia.edu.</xsl:text>
|
146
|
+
<xsl:value-of select="substring-before(tokenize(base-uri(), '/')[last()], '.xml')"/>
|
147
|
+
</xsl:when>
|
148
|
+
</xsl:choose>
|
149
|
+
</xsl:variable>
|
150
|
+
|
151
|
+
|
152
|
+
<mods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/mods/v3" xmlns:xlink="http://www.w3.org/1999/xlink" version="3.4" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd">
|
153
|
+
<titleInfo>
|
154
|
+
<title>
|
155
|
+
<xsl:apply-templates select="idinfo/citation/citeinfo/title"/>
|
156
|
+
</title>
|
157
|
+
</titleInfo>
|
158
|
+
|
159
|
+
<!-- kd: need to map alternate titles
|
160
|
+
<xsl:for-each select="gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:alternateTitle">
|
161
|
+
<titleInfo>
|
162
|
+
<title displayLabel="Alternative title">
|
163
|
+
<xsl:value-of select="."/>
|
164
|
+
</title>
|
165
|
+
</titleInfo>
|
166
|
+
</xsl:for-each> -->
|
167
|
+
|
168
|
+
<xsl:for-each select="idinfo/citation/citeinfo/origin">
|
169
|
+
<name>
|
170
|
+
<namePart>
|
171
|
+
<xsl:value-of select="."/>
|
172
|
+
</namePart>
|
173
|
+
<role>
|
174
|
+
<roleTerm type="text" authority="marcrelator">creator</roleTerm>
|
175
|
+
</role>
|
176
|
+
</name>
|
177
|
+
</xsl:for-each>
|
178
|
+
|
179
|
+
<!-- typeOfResource for SW - see http://www.loc.gov/standards/mods/v3/mods-userguide-elements.html -->
|
180
|
+
<typeOfResource>cartographic</typeOfResource>
|
181
|
+
<typeOfResource>software, multimedia</typeOfResource>
|
182
|
+
|
183
|
+
<genre>
|
184
|
+
<xsl:attribute name="authority">lcgft</xsl:attribute>
|
185
|
+
<xsl:attribute name="valueURI">http://id.loc.gov/authorities/genreForms/gf2011026297</xsl:attribute>
|
186
|
+
<xsl:text>Geospatial data</xsl:text>
|
187
|
+
</genre>
|
188
|
+
<genre>
|
189
|
+
<xsl:attribute name="authority">rdacontent</xsl:attribute>
|
190
|
+
<xsl:attribute name="valueURI">http://rdvocab.info/termList/RDAContentType/1001</xsl:attribute>
|
191
|
+
<xsl:text>cartographic dataset</xsl:text>
|
192
|
+
</genre>
|
193
|
+
|
194
|
+
<originInfo>
|
195
|
+
<xsl:for-each select="idinfo/citation/citeinfo/pubinfo/publish">
|
196
|
+
<publisher>
|
197
|
+
<xsl:value-of select="."/>
|
198
|
+
</publisher>
|
199
|
+
</xsl:for-each>
|
200
|
+
<xsl:for-each select="idinfo/citation/citeinfo/pubinfo/pubplace">
|
201
|
+
<place>
|
202
|
+
<placeTerm type="text">
|
203
|
+
<xsl:value-of select="."/>
|
204
|
+
</placeTerm>
|
205
|
+
</place>
|
206
|
+
</xsl:for-each>
|
207
|
+
<xsl:choose>
|
208
|
+
|
209
|
+
<!-- kd: set up xsl:analysis for dates with text, special characters.... -->
|
210
|
+
|
211
|
+
<!-- converts 8 digit date to YYYY -->
|
212
|
+
<xsl:when test="number(idinfo/citation/citeinfo/pubdate[(string-length()=8)])">
|
213
|
+
<dateIssued encoding="w3cdtf" keyDate="yes">
|
214
|
+
|
215
|
+
<xsl:value-of select="substring(idinfo/citation/citeinfo/pubdate,1,4)"/>
|
216
|
+
</dateIssued>
|
217
|
+
</xsl:when>
|
218
|
+
|
219
|
+
<!-- converts 6 digit date to YYYY -->
|
220
|
+
<xsl:when test="number(idinfo/citation/citeinfo/pubdate[(string-length()=6)])">
|
221
|
+
<dateIssued encoding="w3cdtf" keyDate="yes">
|
222
|
+
<xsl:value-of select="substring(idinfo/citation/citeinfo/pubdate,1,4)"/>
|
223
|
+
</dateIssued>
|
224
|
+
</xsl:when>
|
225
|
+
|
226
|
+
<!-- converts 4 digit date to YYYY -->
|
227
|
+
<xsl:when test="number(idinfo/citation/citeinfo/pubdate[(string-length()=4)])">
|
228
|
+
<dateIssued encoding="w3cdtf" keyDate="yes">
|
229
|
+
<!-- strip MM-DD, oupput YYYY -->
|
230
|
+
<xsl:value-of select="idinfo/citation/citeinfo/pubdate"/>
|
231
|
+
</dateIssued>
|
232
|
+
</xsl:when>
|
233
|
+
|
234
|
+
<!-- all other pubdates -->
|
235
|
+
<xsl:otherwise>
|
236
|
+
<dateIssued encoding="w3cdtf" keyDate="yes">
|
237
|
+
<xsl:value-of select="idinfo/citation/citeinfo/pubdate"/>
|
238
|
+
</dateIssued>
|
239
|
+
</xsl:otherwise>
|
240
|
+
|
241
|
+
</xsl:choose>
|
242
|
+
|
243
|
+
|
244
|
+
<xsl:for-each select="idinfo/timeperd/timeinfo/mdattim/sngdate/caldate | idinfo/timeperd/timeinfo/sngdate/caldate">
|
245
|
+
<dateValid>
|
246
|
+
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
247
|
+
<xsl:value-of select="substring(.,1,4)"/>
|
248
|
+
</dateValid>
|
249
|
+
</xsl:for-each>
|
250
|
+
|
251
|
+
<xsl:for-each select="idinfo/timeperd/timeinfo/rngdates">
|
252
|
+
<dateValid>
|
253
|
+
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
254
|
+
<xsl:attribute name="point">start</xsl:attribute>
|
255
|
+
<xsl:value-of select="substring(begdate,1,4)"/>
|
256
|
+
</dateValid>
|
257
|
+
<dateValid>
|
258
|
+
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
259
|
+
<xsl:attribute name="point">end</xsl:attribute>
|
260
|
+
<xsl:value-of select="substring(enddate,1,4)"/>
|
261
|
+
</dateValid>
|
262
|
+
</xsl:for-each>
|
263
|
+
|
264
|
+
<xsl:for-each select="idinfo/citation/citeinfo/edition">
|
265
|
+
<edition>
|
266
|
+
<xsl:value-of select="."/>
|
267
|
+
</edition>
|
268
|
+
</xsl:for-each>
|
269
|
+
</originInfo>
|
270
|
+
|
271
|
+
<!-- kd: default lang is 'eng' -->
|
272
|
+
<language>
|
273
|
+
<languageTerm authority="iso639-2b">
|
274
|
+
<xsl:text>eng</xsl:text>
|
275
|
+
</languageTerm>
|
276
|
+
</language>
|
277
|
+
|
278
|
+
<physicalDescription>
|
279
|
+
<xsl:choose>
|
280
|
+
<xsl:when test="distinfo/stdorder/digform/digtinfo/formname[contains(.,'SHP')]">
|
281
|
+
<form>
|
282
|
+
<xsl:text>Shapefile</xsl:text>
|
283
|
+
</form>
|
284
|
+
</xsl:when>
|
285
|
+
<xsl:when test="distinfo/stdorder/digform/digtinfo/formname">
|
286
|
+
<form>
|
287
|
+
<xsl:value-of select="distinfo/stdorder/digform/digtinfo/formname"/>
|
288
|
+
</form>
|
289
|
+
</xsl:when>
|
290
|
+
|
291
|
+
<xsl:when test="distInfo/distributor/distorFormat/formatName">
|
292
|
+
<form>
|
293
|
+
<xsl:value-of select="distInfo/distributor/distorFormat/formatName"/>
|
294
|
+
</form>
|
295
|
+
</xsl:when>
|
296
|
+
|
297
|
+
</xsl:choose>
|
298
|
+
<xsl:for-each select="distinfo/stdorder/digform/digtinfo/transize">
|
299
|
+
<extent>
|
300
|
+
<xsl:value-of select="."/>
|
301
|
+
</extent>
|
302
|
+
<!-- The digitalOrigin is coded here:
|
303
|
+
http://www.loc.gov/standards/mods/v3/mods-userguide-elements.html#digitalorigin
|
304
|
+
-->
|
305
|
+
</xsl:for-each>
|
306
|
+
<digitalOrigin>born digital</digitalOrigin>
|
307
|
+
</physicalDescription>
|
308
|
+
<subject>
|
309
|
+
<cartographics>
|
310
|
+
|
311
|
+
<xsl:choose>
|
312
|
+
<xsl:when test="count(dataqual/lineage/srcinfo/srcscale) > 1">
|
313
|
+
<xsl:choose>
|
314
|
+
|
315
|
+
<!-- Multiple scale elements with different values -->
|
316
|
+
<xsl:when test="dataqual/lineage/srcinfo/srcscale != dataqual/lineage/srcinfo/srcscale">
|
317
|
+
|
318
|
+
<scale>
|
319
|
+
<xsl:text>Scale varies.</xsl:text>
|
320
|
+
</scale>
|
321
|
+
|
322
|
+
</xsl:when>
|
323
|
+
|
324
|
+
<!-- Multiple scale elements with the same value -->
|
325
|
+
<xsl:when test="dataqual/lineage/srcinfo/srcscale = dataqual/lineage/srcinfo/srcscale">
|
326
|
+
<xsl:choose>
|
327
|
+
|
328
|
+
<xsl:when test="dataqual/lineage/srcinfo/srcscale = 'Unknown'">
|
329
|
+
<scale>
|
330
|
+
<xsl:text>Scale not given.</xsl:text>
|
331
|
+
</scale>
|
332
|
+
</xsl:when>
|
333
|
+
|
334
|
+
<xsl:otherwise>
|
335
|
+
<scale>
|
336
|
+
<xsl:text>1:</xsl:text>
|
337
|
+
<xsl:value-of select="(dataqual/lineage/srcinfo/srcscale)[1]"/>
|
338
|
+
</scale>
|
339
|
+
</xsl:otherwise>
|
340
|
+
</xsl:choose>
|
341
|
+
</xsl:when>
|
342
|
+
</xsl:choose>
|
343
|
+
</xsl:when>
|
344
|
+
|
345
|
+
<xsl:otherwise>
|
346
|
+
<scale>
|
347
|
+
<xsl:text>Scale not given.</xsl:text>
|
348
|
+
</scale>
|
349
|
+
</xsl:otherwise>
|
350
|
+
</xsl:choose>
|
351
|
+
|
352
|
+
<xsl:choose>
|
353
|
+
<xsl:when test="spref/horizsys/planar/mapproj">
|
354
|
+
<projection>
|
355
|
+
<xsl:value-of select="spref/horizsys/planar/mapproj/mapprojn"/>
|
356
|
+
</projection>
|
357
|
+
</xsl:when>
|
358
|
+
<xsl:when test="spref/horizsys/cordsysn/projcsn">
|
359
|
+
<projection>
|
360
|
+
<xsl:value-of select="spref/horizsys/cordsysn/projcsn"/>
|
361
|
+
</projection>
|
362
|
+
</xsl:when>
|
363
|
+
<xsl:when test="spref/horizsys/geodetic/horizdn">
|
364
|
+
<projection>
|
365
|
+
<xsl:value-of select="spref/horizsys/geodetic/horizdn"/>
|
366
|
+
</projection>
|
367
|
+
</xsl:when>
|
368
|
+
</xsl:choose>
|
369
|
+
|
370
|
+
<xsl:for-each select="idinfo/spdom/bounding">
|
371
|
+
<coordinates>
|
372
|
+
<xsl:choose>
|
373
|
+
<xsl:when test="$geoformat = 'GMD'">
|
374
|
+
|
375
|
+
<xsl:value-of select="westbc"/>
|
376
|
+
<xsl:text> -- </xsl:text>
|
377
|
+
<xsl:value-of select="eastbc"/>
|
378
|
+
<xsl:text>/</xsl:text>
|
379
|
+
<xsl:value-of select="northbc"/>
|
380
|
+
<xsl:text> -- </xsl:text>
|
381
|
+
<xsl:value-of select="southbc"/>
|
382
|
+
</xsl:when>
|
383
|
+
<!-- WKT is x y, x y
|
384
|
+
|
385
|
+
POLYGON((sw, nw, ne, se, sw))
|
386
|
+
-->
|
387
|
+
<xsl:when test="$geoformat = 'WKT'">
|
388
|
+
<xsl:text>POLYGON((</xsl:text>
|
389
|
+
<xsl:value-of select="westbc"/>
|
390
|
+
<xsl:text> </xsl:text>
|
391
|
+
<xsl:value-of select="southbc"/>
|
392
|
+
<xsl:text>, </xsl:text>
|
393
|
+
<xsl:value-of select="westbc"/>
|
394
|
+
<xsl:text> </xsl:text>
|
395
|
+
<xsl:value-of select="northbc"/>
|
396
|
+
<xsl:text>, </xsl:text>
|
397
|
+
<xsl:value-of select="eastbc"/>
|
398
|
+
<xsl:text> </xsl:text>
|
399
|
+
<xsl:value-of select="northbc"/>
|
400
|
+
<xsl:text>, </xsl:text>
|
401
|
+
<xsl:value-of select="eastbc"/>
|
402
|
+
<xsl:text> </xsl:text>
|
403
|
+
<xsl:value-of select="southbc"/>
|
404
|
+
<xsl:text>, </xsl:text>
|
405
|
+
<xsl:value-of select="westbc"/>
|
406
|
+
<xsl:text> </xsl:text>
|
407
|
+
<xsl:value-of select="southbc"/>
|
408
|
+
<xsl:text>))</xsl:text>
|
409
|
+
</xsl:when>
|
410
|
+
<xsl:when test="$geoformat = 'WMS'">
|
411
|
+
<!-- WMS
|
412
|
+
Uses min/max as attributes
|
413
|
+
|
414
|
+
Example:
|
415
|
+
|
416
|
+
<wms:BoundingBox xmlns:wms="http://www.opengis.net/wms"
|
417
|
+
CRS="EPSG:4326"
|
418
|
+
minx="-97.119945" miny="25.467075"
|
419
|
+
maxx="-82.307619" maxy="30.665492"/>
|
420
|
+
-->
|
421
|
+
<wms:BoundingBox xmlns:wms="http://www.opengis.net/wms">
|
422
|
+
<xsl:attribute name="CRS">EPSG:4326</xsl:attribute>
|
423
|
+
<xsl:attribute name="minx">
|
424
|
+
<xsl:value-of select="westbc"/>
|
425
|
+
</xsl:attribute>
|
426
|
+
<xsl:attribute name="miny">
|
427
|
+
<xsl:value-of select="southbc"/>
|
428
|
+
</xsl:attribute>
|
429
|
+
<xsl:attribute name="maxx">
|
430
|
+
<xsl:value-of select="eastbc"/>
|
431
|
+
</xsl:attribute>
|
432
|
+
<xsl:attribute name="maxy">
|
433
|
+
<xsl:value-of select="northbc"/>
|
434
|
+
</xsl:attribute>
|
435
|
+
</wms:BoundingBox>
|
436
|
+
</xsl:when>
|
437
|
+
<xsl:when test="$geoformat = 'GML'">
|
438
|
+
<!-- GML
|
439
|
+
Using SW and NE corners in (x, y) coordinates
|
440
|
+
|
441
|
+
Example:
|
442
|
+
|
443
|
+
<gml:Envelope xmlns:gml="http://www.opengis.net/gml/3.2" srsName="EPSG:4326">
|
444
|
+
<gml:lowerCorner>-97.119945 25.467075</gml:lowerCorner>
|
445
|
+
<gml:upperCorner>-82.307619 30.665492</gml:upperCorner>
|
446
|
+
</gml:Envelope>
|
447
|
+
-->
|
448
|
+
<gml:Envelope xmlns:gml="http://www.opengis.net/gml/3.2">
|
449
|
+
<xsl:attribute name="srsName">
|
450
|
+
<xsl:value-of select="//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:codeSpace/gco:CharacterString"/>
|
451
|
+
<xsl:text>:</xsl:text>
|
452
|
+
<xsl:value-of select="//gmd:referenceSystemInfo/gmd:MD_ReferenceSystem/gmd:referenceSystemIdentifier/gmd:RS_Identifier/gmd:code/gco:CharacterString"/>
|
453
|
+
</xsl:attribute>
|
454
|
+
<gml:lowerCorner>
|
455
|
+
<xsl:value-of select="gmd:westBoundLongitude/gco:Decimal"/>
|
456
|
+
<xsl:text> </xsl:text>
|
457
|
+
<xsl:value-of select="gmd:southBoundLatitude/gco:Decimal"/>
|
458
|
+
</gml:lowerCorner>
|
459
|
+
<gml:upperCorner>
|
460
|
+
<xsl:value-of select="gmd:eastBoundLongitude/gco:Decimal"/>
|
461
|
+
<xsl:text> </xsl:text>
|
462
|
+
<xsl:value-of select="gmd:northBoundLatitude/gco:Decimal"/>
|
463
|
+
</gml:upperCorner>
|
464
|
+
</gml:Envelope>
|
465
|
+
</xsl:when>
|
466
|
+
<xsl:when test="$geoformat = 'GeoRSS'">
|
467
|
+
<!-- GeoRSS:
|
468
|
+
Rectangular envelope property element containing two pairs of coordinates
|
469
|
+
(lower left envelope corner, upper right envelope corner) representing
|
470
|
+
latitude then longitude in the WGS84 coordinate reference system.
|
471
|
+
|
472
|
+
Example:
|
473
|
+
|
474
|
+
<georss:box>42.943 -71.032 43.039 -69.856</georss:box>
|
475
|
+
-->
|
476
|
+
<georss:box xmlns:georss="http://www.georss.org/georss">
|
477
|
+
<xsl:value-of select="southbc"/>
|
478
|
+
<xsl:text> </xsl:text>
|
479
|
+
<xsl:value-of select="westbc"/>
|
480
|
+
<xsl:text> </xsl:text>
|
481
|
+
<xsl:value-of select="northbc"/>
|
482
|
+
<xsl:text> </xsl:text>
|
483
|
+
<xsl:value-of select="eastbc"/>
|
484
|
+
</georss:box>
|
485
|
+
</xsl:when>
|
486
|
+
<xsl:when test="$geoformat = 'MARC034'">
|
487
|
+
<!-- MARC 034
|
488
|
+
Subfields $d, $e, $f, and $g always appear together. The coordinates
|
489
|
+
may be recorded in the form hdddmmss (hemisphere-degrees-minutes-seconds),
|
490
|
+
however, other forms are also allowed, such as decimal degrees.
|
491
|
+
The subelements are each right justified and unused positions contain zeros.
|
492
|
+
|
493
|
+
$d - Coordinates - westernmost longitude (NR)
|
494
|
+
$e - Coordinates - easternmost longitude (NR)
|
495
|
+
$f - Coordinates - northernmost latitude (NR)
|
496
|
+
$g - Coordinates - southernmost latitude (NR)
|
497
|
+
|
498
|
+
Example:
|
499
|
+
|
500
|
+
$d-097.119945$e-082.307619$f+30.665492$g+25.467075
|
501
|
+
|
502
|
+
See http://www.w3.org/TR/1999/REC-xslt-19991116#format-number
|
503
|
+
-->
|
504
|
+
<xsl:text>$d</xsl:text>
|
505
|
+
<xsl:value-of select="format-number(westbc, '+000.000000;-000.000000')"/>
|
506
|
+
<xsl:text>$e</xsl:text>
|
507
|
+
<xsl:value-of select="format-number(eastbc, '+000.000000;-000.000000')"/>
|
508
|
+
<xsl:text>$f</xsl:text>
|
509
|
+
<xsl:value-of select="format-number(nothbc, '+00.000000;-00.000000')"/>
|
510
|
+
<xsl:text>$g</xsl:text>
|
511
|
+
<xsl:value-of select="format-number(southbc, '+00.000000;-00.000000')"/>
|
512
|
+
</xsl:when>
|
513
|
+
<xsl:otherwise>
|
514
|
+
<!-- MARC 255 $c:
|
515
|
+
Coordinates are recorded in the order of
|
516
|
+
westernmost longitude, easternmost longitude,
|
517
|
+
northernmost latitude, and southernmost latitude,
|
518
|
+
and separated with double-hyphen and / characters.
|
519
|
+
|
520
|
+
XXX: Note that this leaves the coordinates in decimal
|
521
|
+
degrees whereas 255c suggests deg-min-sec.
|
522
|
+
|
523
|
+
Example:
|
524
|
+
|
525
|
+
-97.119945 -- -82.307619/30.665492 -- 25.467075
|
526
|
+
|
527
|
+
See http://www.loc.gov/marc/bibliographic/bd255.html $c
|
528
|
+
-->
|
529
|
+
|
530
|
+
<xsl:value-of select="westbc"/>
|
531
|
+
<xsl:text> -- </xsl:text>
|
532
|
+
<xsl:value-of select="eastbc"/>
|
533
|
+
<xsl:text>/</xsl:text>
|
534
|
+
<xsl:value-of select="northbc"/>
|
535
|
+
<xsl:text> -- </xsl:text>
|
536
|
+
<xsl:value-of select="southbc"/>
|
537
|
+
</xsl:otherwise>
|
538
|
+
</xsl:choose>
|
539
|
+
</coordinates>
|
540
|
+
</xsl:for-each>
|
541
|
+
</cartographics>
|
542
|
+
</subject>
|
543
|
+
<xsl:for-each select="idinfo/descript/abstract">
|
544
|
+
<abstract displayLabel="Abstract">
|
545
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
546
|
+
<xsl:value-of select="."/>
|
547
|
+
</abstract>
|
548
|
+
</xsl:for-each>
|
549
|
+
<xsl:for-each select="idinfo/descript/purpose">
|
550
|
+
<abstract displayLabel="Purpose">
|
551
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
552
|
+
<xsl:value-of select="."/>
|
553
|
+
</abstract>
|
554
|
+
</xsl:for-each>
|
555
|
+
|
556
|
+
<!-- Reports, citation, other info, etc.
|
557
|
+
<xsl:for-each select="dataqual">
|
558
|
+
<note displayLabel="Conceptual consistency report">
|
559
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
560
|
+
<xsl:value-of select="."/>
|
561
|
+
</note>
|
562
|
+
</xsl:for-each>
|
563
|
+
<xsl:for-each select="dataqual">
|
564
|
+
<note displayLabel="Attribute accuracy report">
|
565
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
566
|
+
<xsl:value-of select="."/>
|
567
|
+
</note>
|
568
|
+
</xsl:for-each>
|
569
|
+
<xsl:for-each select="idinfo/datacred">
|
570
|
+
<note displayLabel="Preferred citation">
|
571
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
572
|
+
<xsl:value-of select="."/>
|
573
|
+
</note>
|
574
|
+
</xsl:for-each>
|
575
|
+
<xsl:for-each select="idinfo/descript/supplinf">
|
576
|
+
<note displayLabel="Supplemental information">
|
577
|
+
<xsl:value-of select="."/>
|
578
|
+
</note>
|
579
|
+
</xsl:for-each> -->
|
580
|
+
|
581
|
+
|
582
|
+
<!-- MODS relatedItem types: host, series, isReferencedby-->
|
583
|
+
|
584
|
+
<xsl:for-each select="idinfo/citation/citeinfo/lworkcit">
|
585
|
+
<relatedItem>
|
586
|
+
<xsl:attribute name="type">host</xsl:attribute>
|
587
|
+
<titleInfo>
|
588
|
+
<title>
|
589
|
+
<xsl:value-of select="citeinfo/title"/>
|
590
|
+
</title>
|
591
|
+
</titleInfo>
|
592
|
+
|
593
|
+
<xsl:if test="citeinfo/origin">
|
594
|
+
|
595
|
+
<name>
|
596
|
+
<namePart>
|
597
|
+
<xsl:value-of select="citeinfo/origin"/>
|
598
|
+
</namePart>
|
599
|
+
</name>
|
600
|
+
|
601
|
+
</xsl:if>
|
602
|
+
<originInfo>
|
603
|
+
<xsl:if test="citeinfo/pubinfo/publish">
|
604
|
+
<publisher>
|
605
|
+
<xsl:value-of select="citeinfo/pubinfo/publish"/>
|
606
|
+
</publisher>
|
607
|
+
</xsl:if>
|
608
|
+
<xsl:if test="citeinfo/pubdate">
|
609
|
+
<dateIssued encoding="w3cdtf" keyDate="yes">
|
610
|
+
<!-- strip MM-DD, oupput YYYY -->
|
611
|
+
<xsl:value-of select="substring(citeinfo/pubdate,1,4)"/>
|
612
|
+
</dateIssued>
|
613
|
+
</xsl:if>
|
614
|
+
</originInfo>
|
615
|
+
</relatedItem>
|
616
|
+
</xsl:for-each>
|
617
|
+
|
618
|
+
<xsl:for-each select="idinfo/crossref">
|
619
|
+
<relatedItem>
|
620
|
+
<xsl:attribute name="type">isReferencedBy</xsl:attribute>
|
621
|
+
<titleInfo>
|
622
|
+
<title>
|
623
|
+
<xsl:value-of select="citeinfo/title"/>
|
624
|
+
</title>
|
625
|
+
</titleInfo>
|
626
|
+
|
627
|
+
<xsl:if test="citeinfo/origin">
|
628
|
+
<name>
|
629
|
+
<namePart>
|
630
|
+
<xsl:value-of select="citeinfo/origin"/>
|
631
|
+
</namePart>
|
632
|
+
</name>
|
633
|
+
</xsl:if>
|
634
|
+
<originInfo>
|
635
|
+
<xsl:if test="citeinfo/pubinfo/publish">
|
636
|
+
<publisher>
|
637
|
+
<xsl:value-of select="citeinfo/pubinfo/publish"/>
|
638
|
+
</publisher>
|
639
|
+
</xsl:if>
|
640
|
+
<xsl:if test="citeinfo/pubdate">
|
641
|
+
<dateIssued encoding="w3cdtf" keyDate="yes">
|
642
|
+
<!-- strip MM-DD, oupput YYYY -->
|
643
|
+
<xsl:value-of select="substring(citeinfo/pubdate,1,4)"/>
|
644
|
+
</dateIssued>
|
645
|
+
</xsl:if>
|
646
|
+
</originInfo>
|
647
|
+
</relatedItem>
|
648
|
+
</xsl:for-each>
|
649
|
+
|
650
|
+
|
651
|
+
<!-- subjects: topic, geographic, temporal, ISO19115TopicCategory -->
|
652
|
+
|
653
|
+
|
654
|
+
<xsl:for-each select="idinfo/keywords/place">
|
655
|
+
<xsl:choose>
|
656
|
+
<xsl:when test="contains(placekt, 'FIPS')"/>
|
657
|
+
|
658
|
+
<xsl:when test="placekey">
|
659
|
+
<xsl:for-each select="placekey">
|
660
|
+
<subject>
|
661
|
+
<geographic>
|
662
|
+
<!-- adds geonames info through external process -->
|
663
|
+
<xsl:if test="ancestor-or-self::*/placekt">
|
664
|
+
<xsl:attribute name="authority">
|
665
|
+
<xsl:choose>
|
666
|
+
<xsl:when test="ancestor-or-self::*/placekt[contains(.,'LCNH')]">
|
667
|
+
<xsl:text>lcnaf</xsl:text>
|
668
|
+
</xsl:when>
|
669
|
+
<xsl:when test="ancestor-or-self::*/placekt[contains(.,'LCSH')]">
|
670
|
+
<xsl:text>lcsh</xsl:text>
|
671
|
+
</xsl:when>
|
672
|
+
<xsl:otherwise>
|
673
|
+
<xsl:value-of select="ancestor-or-self::*/placekt"/>
|
674
|
+
</xsl:otherwise>
|
675
|
+
</xsl:choose>
|
676
|
+
</xsl:attribute>
|
677
|
+
|
678
|
+
</xsl:if>
|
679
|
+
|
680
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
681
|
+
<xsl:value-of select="."/>
|
682
|
+
|
683
|
+
</geographic>
|
684
|
+
</subject>
|
685
|
+
</xsl:for-each>
|
686
|
+
</xsl:when>
|
687
|
+
</xsl:choose>
|
688
|
+
</xsl:for-each>
|
689
|
+
|
690
|
+
|
691
|
+
<xsl:choose>
|
692
|
+
|
693
|
+
<xsl:when test="idinfo/keywords/temporal/tempkey">
|
694
|
+
<xsl:for-each select="idinfo/keywords/temporal/tempkey">
|
695
|
+
<subject>
|
696
|
+
<temporal>
|
697
|
+
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
698
|
+
<xsl:value-of select="substring(.,1,4)"/>
|
699
|
+
</temporal>
|
700
|
+
</subject>
|
701
|
+
</xsl:for-each>
|
702
|
+
</xsl:when>
|
703
|
+
|
704
|
+
<xsl:when test="idinfo/timeperd/timeinfo/mdattim/sngdate/caldate | idinfo/timeperd/timeinfo/sngdate/caldate">
|
705
|
+
<xsl:for-each select="idinfo/timeperd/timeinfo/mdattim/sngdate/caldate | idinfo/timeperd/timeinfo/sngdate/caldate">
|
706
|
+
<subject>
|
707
|
+
<temporal>
|
708
|
+
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
709
|
+
<xsl:value-of select="substring(.,1,4)"/>
|
710
|
+
</temporal>
|
711
|
+
</subject>
|
712
|
+
</xsl:for-each>
|
713
|
+
</xsl:when>
|
714
|
+
|
715
|
+
<xsl:when test="idinfo/timeperd/timeinfo/rngdates">
|
716
|
+
<xsl:for-each select="idinfo/timeperd/timeinfo/rngdates">
|
717
|
+
<subject>
|
718
|
+
<temporal>
|
719
|
+
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
720
|
+
<xsl:attribute name="point">start</xsl:attribute>
|
721
|
+
<xsl:value-of select="substring(begdate,1,4)"/>
|
722
|
+
</temporal>
|
723
|
+
<temporal>
|
724
|
+
<xsl:attribute name="encoding">w3cdtf</xsl:attribute>
|
725
|
+
<xsl:attribute name="point">end</xsl:attribute>
|
726
|
+
<xsl:value-of select="substring(enddate,1,4)"/>
|
727
|
+
</temporal>
|
728
|
+
</subject>
|
729
|
+
</xsl:for-each>
|
730
|
+
</xsl:when>
|
731
|
+
</xsl:choose>
|
732
|
+
|
733
|
+
|
734
|
+
<xsl:for-each select="idinfo/keywords/theme">
|
735
|
+
<xsl:choose>
|
736
|
+
<xsl:when test="themekt[contains(.,'19115')]">
|
737
|
+
<xsl:for-each select="themekey">
|
738
|
+
<subject>
|
739
|
+
<topic>
|
740
|
+
<xsl:attribute name="authority">ISO19115TopicCategory</xsl:attribute>
|
741
|
+
|
742
|
+
<xsl:variable name="iso_topic"><xsl:text>http://www.isotc211.org/2005/resources/Codelist/gmxCodelists#MD_TopicCategoryCode_</xsl:text></xsl:variable>
|
743
|
+
|
744
|
+
<xsl:attribute name="valueURI">
|
745
|
+
<xsl:if test="contains(.,'farming')">
|
746
|
+
<xsl:text>Farming</xsl:text>
|
747
|
+
</xsl:if>
|
748
|
+
<xsl:if test="contains(.,'biota')">
|
749
|
+
|
750
|
+
<xsl:text>Biology and Ecology</xsl:text>
|
751
|
+
</xsl:if>
|
752
|
+
<xsl:if test="contains(.,'climatologyMeteorologyAtmosphere')">
|
753
|
+
|
754
|
+
<xsl:text>Climatology, Meteorology and Atmosphere</xsl:text>
|
755
|
+
</xsl:if>
|
756
|
+
|
757
|
+
<xsl:if test="contains(.,'boundaries')">
|
758
|
+
|
759
|
+
<xsl:text>Boundaries</xsl:text>
|
760
|
+
</xsl:if>
|
761
|
+
<xsl:if test="contains(.,'elevation')">
|
762
|
+
|
763
|
+
<xsl:text>Elevation</xsl:text>
|
764
|
+
</xsl:if>
|
765
|
+
<xsl:if test="contains(.,'environment')">
|
766
|
+
|
767
|
+
<xsl:text>Environment</xsl:text>
|
768
|
+
</xsl:if>
|
769
|
+
<xsl:if test="contains(.,'geoscientificinformation')">
|
770
|
+
|
771
|
+
<xsl:text>Geoscientific Information</xsl:text>
|
772
|
+
</xsl:if>
|
773
|
+
<xsl:if test="contains(.,'health')">
|
774
|
+
|
775
|
+
<xsl:text>Health</xsl:text>
|
776
|
+
</xsl:if>
|
777
|
+
<xsl:if test="contains(.,'imageryBaseMapsEarthCover')">
|
778
|
+
|
779
|
+
<xsl:text>Imagery and Base Maps</xsl:text>
|
780
|
+
</xsl:if>
|
781
|
+
<xsl:if test="contains(.,'intelligenceMilitary')">
|
782
|
+
|
783
|
+
<xsl:text>Military</xsl:text>
|
784
|
+
</xsl:if>
|
785
|
+
<xsl:if test="contains(.,'inlandWaters')">
|
786
|
+
|
787
|
+
<xsl:text>Inland Waters</xsl:text>
|
788
|
+
</xsl:if>
|
789
|
+
<xsl:if test="contains(.,'location')">
|
790
|
+
|
791
|
+
<xsl:text>Location</xsl:text>
|
792
|
+
</xsl:if>
|
793
|
+
<xsl:if test="contains(.,'oceans')">
|
794
|
+
|
795
|
+
<xsl:text>Oceans</xsl:text>
|
796
|
+
</xsl:if>
|
797
|
+
<xsl:if test="contains(.,'planningCadastre')">
|
798
|
+
|
799
|
+
<xsl:text>Planning and Cadastral</xsl:text>
|
800
|
+
</xsl:if>
|
801
|
+
<xsl:if test="contains(.,'structure')">
|
802
|
+
|
803
|
+
<xsl:text>Structures</xsl:text>
|
804
|
+
</xsl:if>
|
805
|
+
<xsl:if test="contains(.,'transportation')">
|
806
|
+
|
807
|
+
<xsl:text>Transportation</xsl:text>
|
808
|
+
</xsl:if>
|
809
|
+
<xsl:if test="contains(.,'utilitiesCommunication')">
|
810
|
+
|
811
|
+
<xsl:text>Utilities and Communication</xsl:text>
|
812
|
+
</xsl:if>
|
813
|
+
<xsl:if test="contains(.,'society')">
|
814
|
+
|
815
|
+
<xsl:text>Society</xsl:text>
|
816
|
+
</xsl:if>
|
817
|
+
</xsl:attribute>
|
818
|
+
<xsl:if test="contains(.,'farming')">
|
819
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
820
|
+
<xsl:text>Farming</xsl:text>
|
821
|
+
</xsl:if>
|
822
|
+
<xsl:if test="contains(.,'biota')">
|
823
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
824
|
+
<xsl:text>Biology and Ecology</xsl:text>
|
825
|
+
</xsl:if>
|
826
|
+
<xsl:if test="contains(.,'climatologyMeteorologyAtmosphere')">
|
827
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
828
|
+
<xsl:text>Climatology, Meteorology and Atmosphere</xsl:text>
|
829
|
+
</xsl:if>
|
830
|
+
<xsl:if test="contains(.,'boundaries')">
|
831
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
832
|
+
<xsl:text>Boundaries</xsl:text>
|
833
|
+
</xsl:if>
|
834
|
+
<xsl:if test="contains(.,'elevation')">
|
835
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
836
|
+
<xsl:text>Elevation</xsl:text>
|
837
|
+
</xsl:if>
|
838
|
+
<xsl:if test="contains(.,'environment')">
|
839
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
840
|
+
<xsl:text>Environment</xsl:text>
|
841
|
+
</xsl:if>
|
842
|
+
<xsl:if test="contains(.,'geoscientificinformation')">
|
843
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
844
|
+
<xsl:text>Geoscientific Information</xsl:text>
|
845
|
+
</xsl:if>
|
846
|
+
<xsl:if test="contains(.,'health')">
|
847
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
848
|
+
<xsl:text>Health</xsl:text>
|
849
|
+
</xsl:if>
|
850
|
+
<xsl:if test="contains(.,'imageryBaseMapsEarthCover')">
|
851
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
852
|
+
<xsl:text>Imagery and Base Maps</xsl:text>
|
853
|
+
</xsl:if>
|
854
|
+
<xsl:if test="contains(.,'intelligenceMilitary')">
|
855
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
856
|
+
<xsl:text>Military</xsl:text>
|
857
|
+
</xsl:if>
|
858
|
+
<xsl:if test="contains(.,'inlandWaters')">
|
859
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
860
|
+
<xsl:text>Inland Waters</xsl:text>
|
861
|
+
</xsl:if>
|
862
|
+
<xsl:if test="contains(.,'location')">
|
863
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
864
|
+
<xsl:text>Location</xsl:text>
|
865
|
+
</xsl:if>
|
866
|
+
<xsl:if test="contains(.,'oceans')">
|
867
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
868
|
+
<xsl:text>Oceans</xsl:text>
|
869
|
+
</xsl:if>
|
870
|
+
<xsl:if test="contains(.,'planningCadastre')">
|
871
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
872
|
+
<xsl:text>Planning and Cadastral</xsl:text>
|
873
|
+
</xsl:if>
|
874
|
+
<xsl:if test="contains(.,'structure')">
|
875
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
876
|
+
<xsl:text>Structures</xsl:text>
|
877
|
+
</xsl:if>
|
878
|
+
<xsl:if test="contains(.,'transportation')">
|
879
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
880
|
+
<xsl:text>Transportation</xsl:text>
|
881
|
+
</xsl:if>
|
882
|
+
<xsl:if test="contains(.,'utilitiesCommunication')">
|
883
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
884
|
+
<xsl:text>Utilities and Communication</xsl:text>
|
885
|
+
</xsl:if>
|
886
|
+
<xsl:if test="contains(.,'society')">
|
887
|
+
<xsl:attribute name="valueURI"><xsl:value-of select="$iso_topic"/><xsl:value-of select="."/></xsl:attribute>
|
888
|
+
<xsl:text>Society</xsl:text>
|
889
|
+
</xsl:if>
|
890
|
+
</topic>
|
891
|
+
</subject>
|
892
|
+
</xsl:for-each>
|
893
|
+
</xsl:when>
|
894
|
+
|
895
|
+
<xsl:when test="contains(themekt, 'LCSH')">
|
896
|
+
<xsl:for-each select="themekey">
|
897
|
+
<subject>
|
898
|
+
<topic>
|
899
|
+
<xsl:attribute name="authority">lcsh</xsl:attribute>
|
900
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
901
|
+
<xsl:value-of select="."/>
|
902
|
+
</topic>
|
903
|
+
</subject>
|
904
|
+
</xsl:for-each>
|
905
|
+
</xsl:when>
|
906
|
+
|
907
|
+
<xsl:when test="contains(themekt, 'FGDC')"/>
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
|
912
|
+
<!-- GCMD keywords -->
|
913
|
+
<xsl:when test="contains(themekt, 'GCMD')">
|
914
|
+
<xsl:for-each select="tokenize(themekey, ' > ')">
|
915
|
+
<subject>
|
916
|
+
<topic>
|
917
|
+
<xsl:attribute name="authority">gcmd</xsl:attribute>
|
918
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
919
|
+
<xsl:value-of select="."/>
|
920
|
+
</topic>
|
921
|
+
</subject>
|
922
|
+
</xsl:for-each>
|
923
|
+
</xsl:when>
|
924
|
+
<xsl:otherwise>
|
925
|
+
|
926
|
+
<xsl:for-each select="themekey">
|
927
|
+
<subject>
|
928
|
+
<topic>
|
929
|
+
<xsl:attribute name="lang">eng</xsl:attribute>
|
930
|
+
<xsl:value-of select="."/>
|
931
|
+
</topic>
|
932
|
+
</subject>
|
933
|
+
</xsl:for-each>
|
934
|
+
</xsl:otherwise>
|
935
|
+
</xsl:choose>
|
936
|
+
</xsl:for-each>
|
937
|
+
|
938
|
+
<!-- TODO: Need a metadata practice for GIS Dataset's Online Resource. -->
|
939
|
+
<!-- access rights to be mapped from restrictionCode/otherRestrictions/APO -->
|
940
|
+
<xsl:for-each select="idinfo/accconst">
|
941
|
+
<accessCondition type="restriction on access">
|
942
|
+
<xsl:value-of select=". "/>
|
943
|
+
</accessCondition>
|
944
|
+
</xsl:for-each>
|
945
|
+
<xsl:for-each select="idinfo/useconst">
|
946
|
+
<accessCondition type="use and reproduction">
|
947
|
+
<xsl:value-of select=". "/>
|
948
|
+
</accessCondition>
|
949
|
+
</xsl:for-each>
|
950
|
+
|
951
|
+
<!-- MODS recordInfo -->
|
952
|
+
|
953
|
+
<recordInfo>
|
954
|
+
<recordContentSource>
|
955
|
+
<xsl:value-of select="$institution"/>
|
956
|
+
</recordContentSource>
|
957
|
+
<recordIdentifier>
|
958
|
+
<xsl:value-of select="$recordID"/>
|
959
|
+
</recordIdentifier>
|
960
|
+
<recordOrigin>This record was translated from FGDC Content Standards for Digital Geospatial Metadata to MODS v.3 using an xsl transformation.</recordOrigin>
|
961
|
+
<languageOfCataloging>
|
962
|
+
<languageTerm authority="iso639-2b" type="code">eng</languageTerm>
|
963
|
+
</languageOfCataloging>
|
964
|
+
</recordInfo>
|
965
|
+
|
966
|
+
<!-- Output minimal geo extension to MODS -->
|
967
|
+
<xsl:if test="idinfo/spdom/bounding">
|
968
|
+
<extension displayLabel="geo" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
969
|
+
<rdf:RDF xmlns:gml="http://www.opengis.net/gml/3.2/" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
970
|
+
<rdf:Description>
|
971
|
+
<xsl:attribute name="rdf:about">
|
972
|
+
<xsl:value-of select="$purl"/>
|
973
|
+
</xsl:attribute>
|
974
|
+
<!-- Output MIME type -->
|
975
|
+
<dc:format>
|
976
|
+
<xsl:value-of select="$format"/>
|
977
|
+
</dc:format>
|
978
|
+
<!-- Output Dataset# point, linestring, polygon, raster, etc. -->
|
979
|
+
<dc:type>
|
980
|
+
<xsl:text>Dataset#</xsl:text>
|
981
|
+
<xsl:value-of select="$geometryType"/>
|
982
|
+
</dc:type>
|
983
|
+
<gml:boundedBy>
|
984
|
+
<gml:Envelope>
|
985
|
+
<xsl:attribute name="gml:srsName">
|
986
|
+
<xsl:text>EPSG:4326</xsl:text>
|
987
|
+
</xsl:attribute>
|
988
|
+
<gml:lowerCorner>
|
989
|
+
<xsl:value-of select="idinfo/spdom/bounding/westbc"/>
|
990
|
+
<xsl:text> </xsl:text>
|
991
|
+
<xsl:value-of select="idinfo/spdom/bounding/southbc"/>
|
992
|
+
</gml:lowerCorner>
|
993
|
+
<gml:upperCorner>
|
994
|
+
<xsl:value-of select="idinfo/spdom/bounding/eastbc"/>
|
995
|
+
<xsl:text> </xsl:text>
|
996
|
+
<xsl:value-of select="idinfo/spdom/bounding/northbc"/>
|
997
|
+
</gml:upperCorner>
|
998
|
+
</gml:Envelope>
|
999
|
+
</gml:boundedBy>
|
1000
|
+
</rdf:Description>
|
1001
|
+
</rdf:RDF>
|
1002
|
+
</extension>
|
1003
|
+
</xsl:if>
|
1004
|
+
|
1005
|
+
</mods>
|
1006
|
+
</xsl:template>
|
1007
|
+
</xsl:stylesheet>
|