lib/geohydra/mods2ogp.xsl in geohydra-0.3.1 vs lib/geohydra/mods2ogp.xsl in geohydra-0.3.3
- old
+ new
@@ -22,16 +22,15 @@
- geoserver_root - URL prefix to the geoserver
- purl - complete URL with aa111bb1111 (len = 11)
-->
-<xsl:stylesheet xmlns="http://lucene.apache.org/solr/4/document" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="gmd gco gml mods rdf xsl">
+<xsl:stylesheet xmlns="http://lucene.apache.org/solr/4/document" xmlns:gml="http://www.opengis.net/gml/3.2/" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" exclude-result-prefixes="gml mods rdf xsl">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/mods:mods">
<xsl:variable name="druid" select="substring($purl, string-length($purl)-10)"/>
- <xsl:variable name="datatype" select="substring-after(mods:extension/rdf:RDF[@rdf:type='geo']/rdf:Description[@rdf:type='geo#geometryType']/text(), 'gml:')"/>
<add>
<doc>
<field name="LayerId">
<!-- REQUIRED -->
<xsl:value-of select="$druid"/>
@@ -45,12 +44,12 @@
</field>
<field name="CollectionId">
<xsl:value-of select="mods:relatedItem/mods:titleInfo/mods:title"/>
</field>
<field name="Access">
- <!-- REQUIRED -->
- <xsl:text>Restricted</xsl:text>
+ <!-- REQUIRED: Uses Public due to GIS-7 -->
+ <xsl:text>Public</xsl:text>
</field>
<field name="Institution">
<!-- REQUIRED -->
<xsl:text>Stanford</xsl:text>
</field>
@@ -127,15 +126,13 @@
</field>
<field name="PlaceKeywords">
<xsl:for-each select="mods:subject/mods:geographic">
<xsl:value-of select="text()"/>
- <xsl:if test="position()!=last()">
- <xsl:text>; </xsl:text>
- </xsl:if>
+ <xsl:text>; </xsl:text>
</xsl:for-each>
</field>
- <xsl:for-each select="mods:extension/rdf:RDF[@rdf:type='geo']/rdf:Description[@rdf:type='geo#boundingBox']/gml:Envelope">
+ <xsl:for-each select="mods:extension[@displayLabel='geo']/rdf:RDF/rdf:Description/gml:boundedBy/gml:Envelope">
<xsl:variable name="x2" select="number(substring-before(gml:upperCorner/text(), ' '))"/>
<xsl:variable name="x1" select="number(substring-before(gml:lowerCorner/text(), ' '))"/>
<xsl:variable name="y2" select="number(substring-after(gml:upperCorner/text(), ' '))"/>
<xsl:variable name="y1" select="number(substring-after(gml:lowerCorner/text(), ' '))"/>
<field name="MinX">