Commit e3314638 authored by Kim Mortimer's avatar Kim Mortimer
Browse files

Cleanup of core folder files based on comparison with core plugin

parent c7c55252
......@@ -179,8 +179,7 @@
<xsl:variable name="identification" select="/*[name(.)='gmi:MI_Metadata' or
name() = 'gmi:MI_Metadata' or
@gco:isoType='gmd:MD_Metadata' or
@gco:isoType='gmi:MI_Metadata']/gmd:identificationInfo/*"></xsl:variable>
@gco:isoType='gmd:MD_Metadata']/gmd:identificationInfo/*"></xsl:variable>
<xsl:variable name="docLangTitle"
select="$identification/gmd:citation/*/gmd:title//gmd:LocalisedCharacterString[@locale=$poundLangId]"/>
<xsl:variable name="charStringTitle"
......
......@@ -7,7 +7,7 @@ xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="gmi:MI_Metadata">
<dateStamp><xsl:value-of select="gmd:dateStamp"/></dateStamp>
<dateStamp><xsl:value-of select="gmd:dateStamp/*"/></dateStamp>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -32,7 +32,7 @@ xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:dcterms="http://purl.org/dc/t
xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:dwr="http://rs.tdwg.org/dwc/dwcrecord/"
xmlns:MER="https://meridian.cs.dal.ca/">
<xsl:template match="gmi:MI_Metadata">
<xsl:template match="gmi:MI_Metadata|*[contains(@gco:isoType, 'MD_Metadata')]">
<thumbnail>
<xsl:for-each select="gmd:identificationInfo/MER:MD_DataIdentification/gmd:graphicOverview/gmd:MD_BrowseGraphic">
<xsl:choose>
......
......@@ -78,6 +78,7 @@
<!-- gml (both known places for 3.1.1) -->
<!-- will this one let us link to our 3.2 implementation automatically? -->
<!-- todo: check if this causes issues with gml mismatch -->
<system systemId="http://www.opengis.net/gml"
uri="schema/gml/gml.xsd"/>
<system systemId="http://www.opengis.net/gml/3.2"
......
......@@ -35,6 +35,7 @@
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
xmlns:math="http://exslt.org/math"
xmlns:MER="https://meridian.cs.dal.ca/"
version="2.0"
exclude-result-prefixes="srv gco gmd gmi MER dcterms dwr dwc exslt geonet math">
......
......@@ -33,6 +33,7 @@
in the convert dir of the schema
-->
<conversions>
<!-- TODO important: is the XML convertor strictly necessary? -->
<converter
name="xml_iso19139.MERIDIAN"
nsUri="http://standards.iso.org/iso/19115/-2/gmi/1.0/"
......
......@@ -22,7 +22,8 @@ xmlns:gmi="http://standards.iso.org/iso/19115/-2/gmi/1.0">
</schemaLocation>
<autodetect xmlns:gmi="http://standards.iso.org/iso/19115/-2/gmi/1.0"
xmlns:gmd="http://www.isotc211.org/2005/gmd"
xmlns:gco="http://www.isotc211.org/2005/gco">
xmlns:gco="http://www.isotc211.org/2005/gco"
xmlns:MER="https://meridian.cs.dal.ca/">
<!-- xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
xmlns:dwr="http://rs.tdwg.org/dwc/dwcrecord/"
......
......@@ -91,7 +91,7 @@ xmlns:MER="https://meridian.cs.dal.ca/">
<!-- ================================================================= -->
<xsl:template match="MER:MD_DataIdentification|gmd:MD_DataIdentification">
<xsl:template match="MER:MD_DataIdentification|gmd:MD_DataIdentification|*[contains(@gco:isoType, 'MD_DataIdentification')]">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="gmd:citation"/>
......@@ -101,8 +101,9 @@ xmlns:MER="https://meridian.cs.dal.ca/">
<xsl:apply-templates select="gmd:status"/>
<xsl:apply-templates select="gmd:pointOfContact"/>
<xsl:apply-templates select="gmd:resourceMaintenance"/>
<xsl:apply-templates select="gmd:graphicOverview[gmd:MD_BrowseGraphic/gmd:fileDescription/gco:CharacterString != /root/env/type]"/>
<xsl:apply-templates
select="gmd:graphicOverview[not(gmd:MD_BrowseGraphic/gmd:fileDescription) or gmd:MD_BrowseGraphic/gmd:fileDescription/gco:CharacterString != /root/env/type]"/>
<xsl:call-template name="fill"/>
<xsl:apply-templates select="gmd:resourceFormat"/>
......@@ -118,39 +119,68 @@ xmlns:MER="https://meridian.cs.dal.ca/">
<xsl:apply-templates select="gmd:environmentDescription"/>
<xsl:apply-templates select="gmd:extent"/>
<xsl:apply-templates select="gmd:supplementalInformation"/>
<!-- **these don't exist in ours, but we could call on some of the MI_AcquisitionInformation classes too if we want - though the exact position might be weird
<xsl:apply-templates select="mcp:samplingFrequency"/>
<xsl:apply-templates select="mcp:sensor"/>
<xsl:apply-templates select="mcp:sensorCalibrationProcess"/>
<xsl:apply-templates select="mcp:dataParameters"/> -->
</xsl:copy>
<xsl:copy-of select="*[namespace-uri()!='http://www.isotc211.org/2005/gmd']"/>
</xsl:copy>
</xsl:template>
<xsl:template
match="srv:SV_ServiceIdentification|*[contains(@gco:isoType, 'SV_ServiceIdentification')]">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="gmd:citation"/>
<xsl:apply-templates select="gmd:abstract"/>
<xsl:apply-templates select="gmd:purpose"/>
<xsl:apply-templates select="gmd:credit"/>
<xsl:apply-templates select="gmd:status"/>
<xsl:apply-templates select="gmd:pointOfContact"/>
<xsl:apply-templates select="gmd:resourceMaintenance"/>
<xsl:apply-templates
select="gmd:graphicOverview[not(gmd:MD_BrowseGraphic/gmd:fileDescription) or gmd:MD_BrowseGraphic/gmd:fileDescription/gco:CharacterString != /root/env/type]"/>
<xsl:call-template name="fill"/>
<xsl:apply-templates select="gmd:resourceFormat"/>
<xsl:apply-templates select="gmd:descriptiveKeywords"/>
<xsl:apply-templates select="gmd:resourceSpecificUsage"/>
<xsl:apply-templates select="gmd:resourceConstraints"/>
<xsl:apply-templates select="gmd:aggregationInfo"/>
<xsl:apply-templates select="srv:*"/>
<xsl:copy-of
select="*[namespace-uri()!='http://www.isotc211.org/2005/gmd' and namespace-uri()!='http://www.isotc211.org/2005/srv']"/>
</xsl:copy>
</xsl:template>
<!-- ================================================================= -->
<xsl:template name="fill">
<gmd:graphicOverview>
<gmd:MD_BrowseGraphic>
<gmd:fileName>
<xsl:variable name="metadataId" select="/root/*/gmd:fileIdentifier/gco:CharacterString/text()" />
<xsl:variable name="serverProtocol" select="/root/env/protocol" />
<xsl:variable name="serverHost" select="/root/env/host" />
<xsl:variable name="serverPort" select="/root/env/port" />
<xsl:variable name="baseUrl" select="/root/env/baseUrl" />
<xsl:variable name="serverPrefix" select="concat($serverProtocol, '://',$serverHost,':',$serverPort, $baseUrl, '/srv/eng/resources.get?')"/>
<gmd:graphicOverview>
<gmd:MD_BrowseGraphic>
<gmd:fileName>
<xsl:variable name="metadataId"
select="/root/*/gmd:fileIdentifier/gco:CharacterString/text()"/>
<gco:CharacterString>
<xsl:value-of select="$serverPrefix"/><xsl:text>uuid=</xsl:text><xsl:value-of select="$metadataId" /><xsl:text>&amp;fname=</xsl:text><xsl:value-of select="/root/env/file"/>
</gco:CharacterString>
</gmd:fileName>
<gmd:fileDescription>
<gco:CharacterString><xsl:value-of select="/root/env/type"/></gco:CharacterString>
</gmd:fileDescription>
<gmd:fileType>
<gco:CharacterString><xsl:value-of select="/root/env/ext"/></gco:CharacterString>
</gmd:fileType>
</gmd:MD_BrowseGraphic>
</gmd:graphicOverview>
</xsl:template>
<xsl:value-of select="concat(
/root/env/url, '/resources.get?',
'uuid=', $metadataId,
'&amp;fname=', /root/env/file)"/>
</gco:CharacterString>
</gmd:fileName>
<gmd:fileDescription>
<gco:CharacterString>
<xsl:value-of select="/root/env/type"/>
</gco:CharacterString>
</gmd:fileDescription>
<gmd:fileType>
<gco:CharacterString>
<xsl:value-of select="/root/env/ext"/>
</gco:CharacterString>
</gmd:fileType>
</gmd:MD_BrowseGraphic>
</gmd:graphicOverview>
</xsl:template>
<!-- ================================================================= -->
......
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:import href="../iso19139/suggest.xsl"/>
</xsl:stylesheet>
\ No newline at end of file
<!--
~ Copyright (C) 2001-2016 Food and Agriculture Organization of the
~ United Nations (FAO-UN), United Nations World Food Programme (WFP)
~ and United Nations Environment Programme (UNEP)
~
~ This program is free software; you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation; either version 2 of the License, or (at
~ your option) any later version.
~
~ This program is distributed in the hope that it will be useful, but
~ WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program; if not, write to the Free Software
~ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
~
~ Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
~ Rome - Italy. email: geonetwork@osgeo.org
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon"
version="2.0">
<!-- Register here the list of process for the schema-->
<xsl:include href="process/keywords-comma-exploder.xsl"/>
<xsl:include href="process/scale-denominator-formatter.xsl"/>
<xsl:include href="process/add-extent-from-geokeywords.xsl"/>
<xsl:include href="process/add-info-from-wms.xsl"/>
<xsl:include href="process/add-service-info-from-wxs.xsl"/>
<xsl:include href="process/linked-data-checker.xsl"/>
<xsl:include href="process/related-metadata-checker.xsl"/>
<xsl:include href="process/add-resource-id.xsl"/>
<!--<xsl:include href="process/vacuum.xsl"/>-->
<!-- Disabled by default because related to INSPIRE only
<xsl:include href="process/inspire-add-conformity.xsl"/>
<xsl:include href="process/inspire-add-dq-toporeport.xsl"/>
<xsl:include href="process/inspire-themes-and-topiccategory.xsl"/>
-->
<xsl:variable name="processes">
<p>keywords-comma-exploder</p>
<p>scale-denominator-formatter</p>
<p>add-extent-from-geokeywords</p>
<p>add-info-from-wms</p>
<p>add-service-info-from-wxs</p>
<p>linked-data-checker</p>
<p>related-metadata-checker</p>
<p>add-resource-id</p>
<!--<p>vacuum</p>-->
<!-- Disabled by default because related to INSPIRE only
<p>inspire-add-conformity</p>
<p>inspire-add-dq-toporeport</p>
<p>inspire-themes-and-topiccategory</p>
-->
</xsl:variable>
<xsl:param name="action" select="'list'"/>
<xsl:param name="process" select="''"/>
<!-- Analyze or process -->
<xsl:template match="/">
<xsl:choose>
<xsl:when test="$action= 'list' or $action = 'analyze'">
<xsl:variable name="root" select="/"/>
<suggestions>
<!-- Filter process if user ask for a specific one. If not loop over all. -->
<xsl:for-each select="if ($process='') then $processes/p else $processes/p[.=$process]">
<xsl:variable name="tplName" select="concat($action, '-',.)"/>
<saxon:call-template name="{$tplName}">
<xsl:with-param name="root" select="$root"/>
<xsl:fallback>
<xsl:message>Fall back as no saxon:call-template exists</xsl:message>
</xsl:fallback>
</saxon:call-template>
</xsl:for-each>
</suggestions>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
......@@ -31,7 +31,8 @@ xmlns:gsr="http://www.isotc211.org/2005/gsr" xmlns:gco="http://www.isotc211.org/
xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:gss="http://www.isotc211.org/2005/gss"
xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2"
xmlns:srv="http://www.isotc211.org/2005/srv" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:dwr="http://rs.tdwg.org/dwc/dwcrecord/">
xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:dwr="http://rs.tdwg.org/dwc/dwcrecord/"
xmlns:MER="https://meridian.cs.dal.ca/">
<!-- ================================================================= -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment