Skip to content

Commit

Permalink
do not create a urn if recordID is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteph-de committed Mar 28, 2024
1 parent 97f4f83 commit ae2e15e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
and not(./p:datafield[@tag='004U']/p:subfield[@code='0' and starts-with(., 'urn:nbn:de:gbv:519-')])
and ./p:datafield[@tag='002@']/p:subfield[@code='0' and contains('afFsv', substring(.,2,1))])">
<xsl:variable name="recordID" select="substring-after(substring(./p:datafield[@tag='017C']/p:subfield[@code='u' and contains(., '://purl.uni-rostock.de')][1],9), '/')" /> <!-- 4950 URL (recordID from PURL) -->
<mods:identifier type="urn">
<xsl:if test="string-length($recordID) > 0">
<mods:identifier type="urn">
<xsl:value-of select="pica2mods:createURNWithChecksumForURNBase(concat('urn:nbn:de:gbv:28-', replace($recordID,'/','_'),'-'))" />
</mods:identifier>
</mods:identifier>
</xsl:if>
</xsl:if>

<xsl:for-each
Expand Down

0 comments on commit ae2e15e

Please sign in to comment.