Display objectWorkType via tags in EODEM and LIDO 1.1 exports, and only

that in case both object_type tags exist and an object type is present
in md

See #5

Background for the disabling of exports of the regular object type in
case both exist: The German Digital Library (DDB) is unable to handle
duplicate names in work types unless both contain different links to
norm data repositories. This fix allows the DDB to more easily import
while supposedly not losing meaningful data.
This commit is contained in:
Joshua Ramon Enslin 2023-08-03 23:11:08 +02:00
parent 2ff939c6db
commit c9c7b63434
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
3 changed files with 374 additions and 213 deletions

View File

@ -34,6 +34,64 @@
</xsl:if>
<lido:objectClassificationWrap>
<lido:objectWorkTypeWrap>
<xsl:choose>
<xsl:when test="
tagSet[0]/relation_type[. = 'object_type']
| tagSet[1]/relation_type[. = 'object_type']
| tagSet[2]/relation_type[. = 'object_type']
| tagSet[3]/relation_type[. = 'object_type']
| tagSet[4]/relation_type[. = 'object_type']
| tagSet[5]/relation_type[. = 'object_type']
| tagSet[6]/relation_type[. = 'object_type']
| tagSet[7]/relation_type[. = 'object_type']
| tagSet[8]/relation_type[. = 'object_type']
| tagSet[9]/relation_type[. = 'object_type']
| tagSet[10]/relation_type[. = 'object_type']
| tagSet[11]/relation_type[. = 'object_type']
| tagSet[12]/relation_type[. = 'object_type']
| tagSet[13]/relation_type[. = 'object_type']
| tagSet[14]/relation_type[. = 'object_type']
| tagSet[15]/relation_type[. = 'object_type']
| tagSet[16]/relation_type[. = 'object_type']
| tagSet[17]/relation_type[. = 'object_type']
| tagSet[18]/relation_type[. = 'object_type']
">
<!-- objectWorkType exists via tags -->
<xsl:for-each select="tagSet/tag_id">
<xsl:if test="../relation_type = 'object_type'">
<lido:objectWorkType>
<xsl:for-each select="../noda_tag_Set/noda_source">
<xsl:if test="string-length(../noda_link)!=0">
<lido:conceptID>
<xsl:attribute name="lido:source">
<xsl:value-of select="../noda_source"/>
</xsl:attribute>
<xsl:attribute name="lido:type">uri</xsl:attribute>
<xsl:value-of select="../noda_link"/>
</lido:conceptID>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="../tag_name">
<lido:term>
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
<xsl:if test="string-length(./@lang)!=0">
<xsl:attribute name="xml:lang">
<xsl:value-of select="./@lang"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="."/>
<xsl:variable name="objektartschlagwort" select="." />
</lido:term>
</xsl:for-each>
</lido:objectWorkType>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<lido:objectWorkType>
<xsl:for-each select="objektart_gnd">
<lido:conceptID>
@ -98,6 +156,11 @@
</xsl:for-each>
</xsl:if>
</lido:objectWorkType>
</xsl:otherwise>
</xsl:choose>
</lido:objectWorkTypeWrap>
<lido:classificationWrap>
<xsl:for-each select="collectionSet">

View File

@ -33,6 +33,64 @@
</xsl:if>
<lido:objectClassificationWrap>
<lido:objectWorkTypeWrap>
<xsl:choose>
<xsl:when test="
tagSet[0]/relation_type[. = 'object_type']
| tagSet[1]/relation_type[. = 'object_type']
| tagSet[2]/relation_type[. = 'object_type']
| tagSet[3]/relation_type[. = 'object_type']
| tagSet[4]/relation_type[. = 'object_type']
| tagSet[5]/relation_type[. = 'object_type']
| tagSet[6]/relation_type[. = 'object_type']
| tagSet[7]/relation_type[. = 'object_type']
| tagSet[8]/relation_type[. = 'object_type']
| tagSet[9]/relation_type[. = 'object_type']
| tagSet[10]/relation_type[. = 'object_type']
| tagSet[11]/relation_type[. = 'object_type']
| tagSet[12]/relation_type[. = 'object_type']
| tagSet[13]/relation_type[. = 'object_type']
| tagSet[14]/relation_type[. = 'object_type']
| tagSet[15]/relation_type[. = 'object_type']
| tagSet[16]/relation_type[. = 'object_type']
| tagSet[17]/relation_type[. = 'object_type']
| tagSet[18]/relation_type[. = 'object_type']
">
<!-- objectWorkType exists via tags -->
<xsl:for-each select="tagSet/tag_id">
<xsl:if test="../relation_type = 'object_type'">
<lido:objectWorkType>
<xsl:for-each select="../noda_tag_Set/noda_source">
<xsl:if test="string-length(../noda_link)!=0">
<lido:conceptID>
<xsl:attribute name="lido:source">
<xsl:value-of select="../noda_source"/>
</xsl:attribute>
<xsl:attribute name="lido:type">uri</xsl:attribute>
<xsl:value-of select="../noda_link"/>
</lido:conceptID>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="../tag_name">
<lido:term>
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
<xsl:if test="string-length(./@lang)!=0">
<xsl:attribute name="xml:lang">
<xsl:value-of select="./@lang"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="."/>
<xsl:variable name="objektartschlagwort" select="." />
</lido:term>
</xsl:for-each>
</lido:objectWorkType>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<lido:objectWorkType>
<xsl:for-each select="objektart_gnd">
<lido:conceptID>
@ -97,34 +155,11 @@
</xsl:for-each>
</xsl:if>
</lido:objectWorkType>
<xsl:for-each select="tagSet/tag_id">
<xsl:if test="../relation_type = 'object_type'">
<lido:objectWorkType>
<xsl:for-each select="../noda_tag_Set/noda_source">
<xsl:if test="string-length(../noda_link)!=0">
<lido:conceptID>
<xsl:attribute name="lido:source">
<xsl:value-of select="../noda_source"/>
</xsl:attribute>
<xsl:attribute name="lido:type">uri</xsl:attribute>
<xsl:value-of select="../noda_link"/>
</lido:conceptID>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="../tag_name">
<lido:term>
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
<xsl:if test="string-length(./@lang)!=0">
<xsl:attribute name="xml:lang">
<xsl:value-of select="./@lang"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="."/>
</lido:term>
</xsl:for-each>
</lido:objectWorkType>
</xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</lido:objectWorkTypeWrap>
<lido:classificationWrap>
<xsl:for-each select="collectionSet">

View File

@ -33,6 +33,64 @@
</xsl:if>
<lido:objectClassificationWrap>
<lido:objectWorkTypeWrap>
<xsl:choose>
<xsl:when test="
tagSet[0]/relation_type[. = 'object_type']
| tagSet[1]/relation_type[. = 'object_type']
| tagSet[2]/relation_type[. = 'object_type']
| tagSet[3]/relation_type[. = 'object_type']
| tagSet[4]/relation_type[. = 'object_type']
| tagSet[5]/relation_type[. = 'object_type']
| tagSet[6]/relation_type[. = 'object_type']
| tagSet[7]/relation_type[. = 'object_type']
| tagSet[8]/relation_type[. = 'object_type']
| tagSet[9]/relation_type[. = 'object_type']
| tagSet[10]/relation_type[. = 'object_type']
| tagSet[11]/relation_type[. = 'object_type']
| tagSet[12]/relation_type[. = 'object_type']
| tagSet[13]/relation_type[. = 'object_type']
| tagSet[14]/relation_type[. = 'object_type']
| tagSet[15]/relation_type[. = 'object_type']
| tagSet[16]/relation_type[. = 'object_type']
| tagSet[17]/relation_type[. = 'object_type']
| tagSet[18]/relation_type[. = 'object_type']
">
<!-- objectWorkType exists via tags -->
<xsl:for-each select="tagSet/tag_id">
<xsl:if test="../relation_type = 'object_type'">
<lido:objectWorkType>
<xsl:for-each select="../noda_tag_Set/noda_source">
<xsl:if test="string-length(../noda_link)!=0">
<lido:conceptID>
<xsl:attribute name="lido:source">
<xsl:value-of select="../noda_source"/>
</xsl:attribute>
<xsl:attribute name="lido:type">uri</xsl:attribute>
<xsl:value-of select="../noda_link"/>
</lido:conceptID>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="../tag_name">
<lido:term>
<xsl:attribute name="lido:addedSearchTerm">no</xsl:attribute>
<xsl:if test="string-length(./@lang)!=0">
<xsl:attribute name="xml:lang">
<xsl:value-of select="./@lang"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="."/>
<xsl:variable name="objektartschlagwort" select="." />
</lido:term>
</xsl:for-each>
</lido:objectWorkType>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<lido:objectWorkType>
<xsl:for-each select="objektart_gnd">
<lido:conceptID>
@ -97,6 +155,11 @@
</xsl:for-each>
</xsl:if>
</lido:objectWorkType>
</xsl:otherwise>
</xsl:choose>
</lido:objectWorkTypeWrap>
<lido:classificationWrap>
<xsl:for-each select="collectionSet">