Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/plugin/dcat-ap/process/parent-remove.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ Stylesheet used to remove a reference to a parent record.
-->
<xsl:stylesheet version="2.0"
xmlns:dcat="http://www.w3.org/ns/dcat#"
xmlns:dcatutil="java:org.fao.geonet.schema.dcatap.util.XslUtil"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:geonet="http://www.fao.org/geonetwork">
<!-- Parent metadata record UUID -->
<xsl:param name="parentUuid"/>

<xsl:variable name="seriesURI" select="dcatutil:getRecordResourceURI($parentUuid)"/>

<!-- Do a copy of every nodes and attributes -->
<xsl:template match="@*|node()">
Expand All @@ -41,5 +44,5 @@ Stylesheet used to remove a reference to a parent record.
</xsl:template>

<!-- Remove geonet:* elements or any DCAT inSeries reference. -->
<xsl:template match="geonet:*|dcat:inSeries" priority="2"/>
<xsl:template match="geonet:*|dcat:inSeries[@rdf:resource = $seriesURI]" priority="2"/>
</xsl:stylesheet>
Loading