Skip to content

Commit

Permalink
Function for creating selflink based on record URI. Refs #8
Browse files Browse the repository at this point in the history
  • Loading branch information
twagoo committed Jul 25, 2018
1 parent 57dbb7e commit 6e20285
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions edm-cmdi/edm2cmdi.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
<xsl:variable name="selfLink">
<xsl:choose>
<xsl:when test="edm:EuropeanaAggregation">
<xsl:value-of select="replace(edm:EuropeanaAggregation/@rdf:about, '^.*://(data.europeana.eu/)?', 'europeana:')"/>
<xsl:value-of select="func:selfLinkForRecord(edm:EuropeanaAggregation/@rdf:about)"/>
</xsl:when>
<xsl:when test="edm:ProvidedCHO">
<xsl:value-of select="replace(edm:ProvidedCHO/@rdf:about, '^.*://(data.europeana.eu/)?', 'europeana:')"/>
<xsl:value-of select="func:selfLinkForRecord(edm:ProvidedCHO/@rdf:about)"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
Expand Down Expand Up @@ -705,6 +705,11 @@
<xsl:value-of select="concat($node/local-name(), '_', generate-id($node))"/>
</xsl:function>

<xsl:function name="func:selfLinkForRecord">
<xsl:param name="id" />
<xsl:value-of select="replace($id, '^.*://(data.europeana.eu/)?', 'europeana:')"/>
</xsl:function>

<xsl:function name="func:sanitiseCollectionName">
<xsl:param name="collectionName" />

Expand Down

0 comments on commit 6e20285

Please sign in to comment.