Skip to content

Commit

Permalink
Standards / ISO / Formatters / DCAT / Documentation and entry point f…
Browse files Browse the repository at this point in the history
…or license mapping.
  • Loading branch information
fxprunayre committed Apr 30, 2024
1 parent d5755c8 commit 5f34876
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,16 @@
<xsl:if test="count(../preceding-sibling::mri:resourceConstraints/*[mco:useConstraints]) = 0">
<xsl:variable name="useConstraints"
as="node()*">
<xsl:copy-of select="../../mri:resourceConstraints/*[mco:useConstraints]/mco:otherConstraints"/>
<xsl:copy-of select="../../mri:resourceConstraints/*[mco:useConstraints]/mco:useLimitation"/>
<xsl:copy-of select="ancestor::mri:resourceConstraints/*[mco:useConstraints]/mco:otherConstraints"/>
<xsl:copy-of select="ancestor::mri:resourceConstraints/*[mco:useConstraints]/mco:useLimitation"/>
</xsl:variable>
<xsl:for-each select="$useConstraints">
<xsl:choose>
<xsl:when test="position() = 1">
<dct:license>
<dct:LicenseDocument>
<xsl:choose>
<!-- TODO: isMappingResourceConstraintsToEuVocabulary -->
<xsl:when test="gcx:Anchor/@xlink:href">
<xsl:attribute name="rdf:about" select="gcx:Anchor/@xlink:href"/>
</xsl:when>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,27 @@
<xsl:import href="../dcat/dcat-core.xsl"/>
<xsl:import href="eu-dcat-ap-core-dataset.xsl"/>

<!--
If true, all resource constraints are preserved in the output.
The first one is a license, others are dct:rights.
See iso19115-3-to-dcat-license in dcat-core-access-and-use.xsl
-->
<xsl:variable name="isPreservingAllResourceConstraints"
as="xs:boolean"
select="false()"/>

<!--
If true, the mapping of resource constraints to the EU DCAT-AP vocabulary is enabled.
eg. http://creativecommons.org/licenses/by/4.0/ is replaced by http://publications.europa.eu/resource/authority/licence/CC_BY_4.0
-->
<xsl:variable name="isMappingResourceConstraintsToEuVocabulary"
as="xs:boolean"
select="true()"/>

<!--
If true, the ISO resource scope is preserved in the output.
See iso19115-3-to-dcat-metadataScope in dcat-core.xsl
-->
<xsl:variable name="isPreservingIsoType"
as="xs:boolean"
select="false()"/>
Expand Down Expand Up @@ -116,18 +133,6 @@
* keep only first.
* Use dct:license for the first useLimitation and then dct:rights?
-->
<xsl:template mode="iso19115-3-to-dcat"
match="mdb:identificationInfo/*/mri:resourceConstraints/*[mco:useConstraints]/mco:otherConstraints
|mdb:identificationInfo/*/mri:resourceConstraints/*[mco:useConstraints]/mco:useLimitation"
priority="2">
<xsl:variable name="allLicenseStatements"
select="ancestor::mri:resourceConstraints/*[mco:useConstraints]/(mco:otherConstraints|mco:useLimitation)"/>

<!-- Keep first constraints statement / Ignore others -->
<xsl:if test="current()/generate-id() = $allLicenseStatements[1]/generate-id()">
<xsl:call-template name="iso19115-3-to-dcat-license"/>
</xsl:if>
</xsl:template>


<!-- [o] provenance Provenance Statement 0..* A statement about the lineage of a Dataset.
Expand Down

0 comments on commit 5f34876

Please sign in to comment.