Skip to content

Commit

Permalink
add transformation from fiv categories in pica to mods:subject
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBorchert committed Jan 16, 2024
1 parent 955bcbc commit 67fa647
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/main/resources/xsl/pica2mods_dfi.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,36 @@
<xsl:call-template name="modsNote" />
<xsl:call-template name="modsRelatedItem" />
<xsl:call-template name="modsSubject" />
<xsl:call-template name="modsDfiFIVSubject" />
</mods:mods>
</xsl:template>

<xsl:template name="modsDfiFIVSubject" >
<xsl:for-each select="./p:datafield[@tag='045N'][not(@occurrence)]" >
<mods:subject xlink:type="simple">
<xsl:variable name="valueURI" select="concat('http://bartoc.org/en/node/20447#',./p:subfield[@code='a'])"/>
<mods:geographic authorityURI="http://bartoc.org/en/node/20447" valueURI="{$valueURI}"/>
</mods:subject>
</xsl:for-each>
<xsl:for-each select="./p:datafield[@tag='045N'][@occurrence='01']" >
<mods:subject xlink:type="simple">
<xsl:variable name="valueURI" select="concat('http://bartoc.org/en/node/20446#',./p:subfield[@code='a'])"/>
<mods:topic authorityURI="http://bartoc.org/en/node/20446" valueURI="{$valueURI}"/>
</mods:subject>
</xsl:for-each>
<xsl:for-each select="./p:datafield[@tag='045N'][@occurrence='02']" >
<mods:subject xlink:type="simple">
<xsl:variable name="valueURI" select="concat('http://repo.dfi.de/api/v1/classifications/fivdfi#',./p:subfield[@code='a'])"/>
<mods:topic authorityURI="http://repo.dfi.de/api/v1/classifications/fivdfi" valueURI="{$valueURI}"/>
</mods:subject>
</xsl:for-each>

<xsl:for-each select="./p:datafield[@tag='045D'][@occurrence='60' or @occurrence='70']" >
<mods:subject xlink:type="simple">
<mods:topic><xsl:value-of select="./p:subfield[@code='a']"/></mods:topic>
</mods:subject>
</xsl:for-each>
</xsl:template>

<xsl:template match="zs:searchRetrieveResponse">
<xsl:apply-templates select="//p:record" />
Expand Down

0 comments on commit 67fa647

Please sign in to comment.