Skip to content

Commit

Permalink
Create a copy of iso19115-3.2018 to provide a base for GNSS profile. …
Browse files Browse the repository at this point in the history
…Modify template names to avoid conflicts
  • Loading branch information
ByronCinNZ committed Aug 15, 2023
1 parent b581f40 commit 9157545
Show file tree
Hide file tree
Showing 44 changed files with 295 additions and 258 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="../../../WEB-INF/data/config/schema_plugins/iso19115-3.2018/convert/ISO19139/fromISO19115-3.2014.xsl"/>
</xsl:stylesheet>
<xsl:include href="../../../WEB-INF/data/config/schema_plugins/iso19115-3.2018GNSS/convert/ISO19139/fromISO19115-3.2014.xsl"/>
</xsl:stylesheet>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:include href="../../../WEB-INF/data/config/schema_plugins/iso19115-3.2018/convert/ISO19139/fromISO19139.xsl"/>
<xsl:include href="../../../WEB-INF/data/config/schema_plugins/iso19115-3.2018GNSS/convert/ISO19139/fromISO19139.xsl"/>
</xsl:stylesheet>
4 changes: 2 additions & 2 deletions schemas/iso19115-3.2018GNSS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ Nevertheless, the citation code is also indexed.

### Validation

Validation steps are first XSD validation made on the schema, then the schematron validation defined in folder [iso19115-3.2018/schematron](https://github.com/geonetwork/core-geonetwork/tree/master/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/schematron). 2 famillies of rules are available:
Validation steps are first XSD validation made on the schema, then the schematron validation defined in folder [iso19115-3.2018GNSS/schematron](https://github.com/geonetwork/core-geonetwork/tree/master/schemas/iso19115-3.2018GNSS/src/main/plugin/iso19115-3.2018GNSS/schematron). 2 famillies of rules are available:
* ISO rules (defined by TC211)
* INSPIRE rules


## CSW requests:

If requesting using output schema http://www.isotc211.org/2005/gmd an ISO19139 record is returned.
To retrieve the record in ISO19115-3.2018, use http://standards.iso.org/iso/19115/-3/mdb/2.0 output schema.
To retrieve the record in ISO19115-3.2018GNSS, use http://standards.iso.org/iso/19115/-3/mdb/2.0 output schema.
```xml
<?xml version="1.0"?>
<csw:GetRecordById xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
Expand Down
2 changes: 1 addition & 1 deletion schemas/iso19115-3.2018GNSS/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/main/plugin/iso19115-3.2018</directory>
<directory>src/main/plugin/iso19115-3.2018GNSS</directory>
</testResource>
</testResources>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:gco="http://standards.iso.org/iso/19115/-3/gco/1.0"
xmlns:gmx="http://standards.iso.org/iso/19115/-3/gmx"
xmlns:gn="http://www.fao.org/geonetwork"
xmlns:gn-fn-iso19115-3.2018="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018"
xmlns:gn-fn-iso19115-3.2018GNSS="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018GNSS"
xmlns:mdb="http://standards.iso.org/iso/19115/-3/mdb/2.0"
xmlns:lan="http://standards.iso.org/iso/19115/-3/lan/1.0"
xmlns:mcc="http://standards.iso.org/iso/19115/-3/mcc/1.0"
Expand All @@ -30,11 +30,11 @@
<item>
<id><xsl:value-of select="mcc:fileName/gco:CharacterString"/></id>
<url>
<xsl:apply-templates mode="get-iso19115-3.2018-localized-string"
<xsl:apply-templates mode="get-iso19115-3.2018GNSS-localized-string"
select="mcc:fileName"/>
</url>
<title>
<xsl:apply-templates mode="get-iso19115-3.2018-localized-string"
<xsl:apply-templates mode="get-iso19115-3.2018GNSS-localized-string"
select="mcc:fileDescription"/>
</title>
<type>thumbnail</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gn-fn-iso19115-3.2018="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018"
xmlns:gn-fn-iso19115-3.2018GNSS="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018GNSS"
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon"
exclude-result-prefixes="#all">
Expand All @@ -18,12 +18,12 @@
<xsl:import href="../../layout/utility-tpl-multilingual.xsl"/>
<xsl:import href="../../layout/utility-fn.xsl"/>

<xsl:template name="get-iso19115-3.2018-citation">
<xsl:template name="get-iso19115-3.2018GNSS-citation">
<xsl:param name="metadata" as="node()"/>
<xsl:param name="language" as="xs:string"/>

<xsl:variable name="langId"
select="gn-fn-iso19115-3.2018:getLangId($metadata, $language)"/>
select="gn-fn-iso19115-3.2018GNSS:getLangId($metadata, $language)"/>

<!-- Who is the creator of the data set? This can be an individual, a group of individuals, or an organization. -->
<xsl:variable name="authorRoles"
Expand All @@ -38,13 +38,13 @@
select=".//cit:individual/*/cit:name[1]"/>

<xsl:for-each select="$name">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="normalize-space($name) != ''">(</xsl:if>
<xsl:for-each select="cit:party/*/cit:name">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
Expand All @@ -59,7 +59,7 @@

<xsl:variable name="translatedTitle">
<xsl:for-each select="$title">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
Expand Down Expand Up @@ -99,13 +99,13 @@
select=".//cit:individual/*/cit:name[1]"/>

<xsl:for-each select="$name">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="normalize-space($name) != ''">(</xsl:if>
<xsl:for-each select="cit:party/*/cit:name">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
Expand Down Expand Up @@ -144,7 +144,7 @@
<xsl:variable name="translatedKeywords">
<xsl:for-each select="$keywords">
<keyword>
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</keyword>
Expand All @@ -153,7 +153,7 @@

<xsl:variable name="additionalCitation">
<xsl:for-each select=".//mrd:onLine/*[cit:protocol/* = 'WWW:LINK-1.0-http--publication-URL']/cit:description">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:util="java:org.fao.geonet.util.XslUtil"
xmlns:tr="java:org.fao.geonet.api.records.formatters.SchemaLocalizations"
xmlns:gn-fn-render="http://geonetwork-opensource.org/xsl/functions/render"
xmlns:gn-fn-iso19115-3.2018="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018"
xmlns:gn-fn-iso19115-3.2018GNSS="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018GNSS"
xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata"
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
xmlns:mri="http://standards.iso.org/iso/19115/-3/mri/1.0"
xmlns:mrd="http://standards.iso.org/iso/19115/-3/mrd/1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gn-fn-iso19115-3.2018="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018"
xmlns:gn-fn-iso19115-3.2018GNSS="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018GNSS"
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon"
exclude-result-prefixes="#all">
Expand All @@ -25,7 +25,7 @@

<xsl:template match="/">
<xsl:variable name="citationInfo">
<xsl:call-template name="get-iso19115-3.2018-citation">
<xsl:call-template name="get-iso19115-3.2018GNSS-citation">
<xsl:with-param name="metadata" select="$metadata"/>
<xsl:with-param name="language" select="$language"/>
</xsl:call-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
~ Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
~ Rome - Italy. email: [email protected]
-->
<!-- Conversion from iso19115-3.2018 to Datacite
<!-- Conversion from iso19115-3.2018GNSS to Datacite
See http://schema.datacite.org/meta/kernel-4.1/doc/DataCite-MetadataKernel_v4.1.pdf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<xsl:output method="text"/>

<xsl:include href="iso19115-3.2018-to-jsonld.xsl"/>
<xsl:include href="iso19115-3.2018GNSS-to-jsonld.xsl"/>

<xsl:template match="/">
<textResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
xmlns:util="java:org.fao.geonet.util.XslUtil"
xmlns:tr="java:org.fao.geonet.api.records.formatters.SchemaLocalizations"
xmlns:gn-fn-render="http://geonetwork-opensource.org/xsl/functions/render"
xmlns:gn-fn-iso19115-3.2018="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018"
xmlns:gn-fn-iso19115-3.2018GNSS="http://geonetwork-opensource.org/xsl/functions/profiles/iso19115-3.2018GNSS"
xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata"
xmlns:saxon="http://saxon.sf.net/"
extension-element-prefixes="saxon"
Expand Down Expand Up @@ -58,7 +58,7 @@
<xsl:include href="../../layout/evaluate.xsl"/>
<xsl:include href="../../layout/utility-tpl-multilingual.xsl"/>
<xsl:include href="../../layout/utility-fn.xsl"/>
<xsl:include href="../jsonld/iso19115-3.2018-to-jsonld.xsl"/>
<xsl:include href="../jsonld/iso19115-3.2018GNSS-to-jsonld.xsl"/>
<xsl:include href="../citation/base.xsl"/>
<xsl:include href="../citation/common.xsl"/>

Expand All @@ -70,10 +70,10 @@
<xsl:variable name="metadata"
select="/root/mdb:MD_Metadata"/>

<xsl:variable name="langId" select="gn-fn-iso19115-3.2018:getLangId($metadata, $language)"/>
<xsl:variable name="langId" select="gn-fn-iso19115-3.2018GNSS:getLangId($metadata, $language)"/>

<xsl:variable name="allLanguages">
<xsl:call-template name="get-iso19115-3.2018-other-languages"/>
<xsl:call-template name="get-iso19115-3.2018GNSS-other-languages"/>
</xsl:variable>

<xsl:variable name="isOnlyFeatureCatalog"
Expand All @@ -92,7 +92,7 @@
<xsl:for-each select="if ($isOnlyFeatureCatalog)
then mdb:contentInfo/*/mrc:featureCatalogue/*/cat:name
else mdb:identificationInfo/*/mri:citation/*/cit:title">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
Expand All @@ -103,7 +103,7 @@
then mdb:contentInfo/*/mrc:featureCatalogue/*/cat:scope
else mdb:identificationInfo/*/mri:abstract">
<xsl:variable name="txt">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:variable>
Expand All @@ -127,14 +127,14 @@
text() != '')]">
<xsl:variable name="thesaurusTitle">
<xsl:for-each select="mri:thesaurusName/*/cit:title">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="mri:keyword">
<xsl:variable name="keyword">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:variable>
Expand Down Expand Up @@ -255,7 +255,7 @@

<xsl:for-each select="mcc:fileDescription">
<div class="gn-img-thumbnail-caption">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</div>
Expand All @@ -272,7 +272,7 @@
then mdb:contentInfo/*/mrc:featureCatalogue/*/cat:scope
else mdb:identificationInfo/*/mri:abstract">
<xsl:variable name="txt">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:variable>
Expand Down Expand Up @@ -313,7 +313,7 @@
<xsl:when test="$language = 'all'">

<xsl:variable name="citationInfo">
<xsl:call-template name="get-iso19115-3.2018-citation">
<xsl:call-template name="get-iso19115-3.2018GNSS-citation">
<xsl:with-param name="metadata" select="$metadata"/>
<xsl:with-param name="language" select="$language"/>
</xsl:call-template>
Expand Down Expand Up @@ -348,7 +348,7 @@
<xsl:when test="count($forcedCitation) > 0">
<xsl:variable name="txt">
<xsl:for-each select="$forcedCitation">
<xsl:call-template name="get-iso19115-3.2018-localised">
<xsl:call-template name="get-iso19115-3.2018GNSS-localised">
<xsl:with-param name="langId" select="$langId"/>
</xsl:call-template>
</xsl:for-each>
Expand Down Expand Up @@ -649,7 +649,7 @@

<div class="row">
<div class="col-md-6">
<!-- Needs improvements as contact/org are more flexible in iso19115-3.2018 -->
<!-- Needs improvements as contact/org are more flexible in iso19115-3.2018GNSS -->
<address>
<strong>
<xsl:choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<!-- Convert an element gco:CharacterString
to the GN localized string structure -->
<xsl:template mode="get-iso19115-3.2018-localized-string" match="*">
<xsl:template mode="get-iso19115-3.2018GNSS-localized-string" match="*">
<xsl:param name="defaultLanguage" select="'eng'" as="xs:string?"/>

<xsl:variable name="mainLanguage"
Expand Down Expand Up @@ -42,11 +42,11 @@
<xsl:value-of select="cit:linkage/gco:CharacterString"/>
</id>
<title>
<xsl:apply-templates mode="get-iso19115-3.2018-localized-string"
<xsl:apply-templates mode="get-iso19115-3.2018GNSS-localized-string"
select="cit:name"/>
</title>
<url>
<xsl:apply-templates mode="get-iso19115-3.2018-localized-string"
<xsl:apply-templates mode="get-iso19115-3.2018GNSS-localized-string"
select="cit:linkage"/>
</url>
<function>
Expand All @@ -56,7 +56,7 @@
<xsl:value-of select="cit:applicationProfile/gco:CharacterString"/>
</applicationProfile>
<description>
<xsl:apply-templates mode="get-iso19115-3.2018-localized-string"
<xsl:apply-templates mode="get-iso19115-3.2018GNSS-localized-string"
select="cit:description"/>
</description>
<protocol>
Expand Down
Loading

0 comments on commit 9157545

Please sign in to comment.