Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
7696 lines (7270 sloc) 362 KB
<?xml version="1.0" encoding="UTF-8"?>
<metamorph xmlns="http://www.culturegraph.org/metamorph" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1">
<!-- Aleph MAB2 XML to RDF - a mapping of the hbz01 catalog to lobid-resources -->
<!-- beware: the sequence of the rules are semantically important! Don't change the order. -->
<!-- Aleph MAB differs from MAB in that: -->
<!-- an indicator2 exists -->
<!-- most fields have a subfield 'a' -->
<!-- => structure of aleph MAB: $field$indicator1$indicator2$subfield -->
<vars>
<var name="ns-lobid-resource" value="http://lobid.org/resources/"/>
<var name="ns-lobid-vocab" value="http://purl.org/lobid/lv#"/>
<var name="ns-lobid-organisation" value="http://lobid.org/organisations/"/>
<var name="ns-zdb-services" value="http://ld.zdb-services.de/resource/"/>
<var name="ns-gnd" value="http://d-nb.info/standards/elementset/gnd#"/>
<var name="ns-bibo" value="http://purl.org/ontology/bibo/"/>
</vars>
<macros>
<macro name="setRdfSubjectDescribedBy">
<combine name="~rdf:subject" value="${a}">
<data source="$[field]"/>
<data source="@id" name="a">
<regexp match="(.*)" format="$[ns-lobid-resource]${1}"/>
</data>
</combine>
</macro>
<macro name="setProvenance">
<combine name="$[field_1]" value="$[ns-lobid-organisation]${a}#!" flushWith="$[field_2]">
<choose name="a" flushWith="$[field_2]">
<data source="$[field_2]" name="a">
<lookup in="sigel2isilMap"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="^[hH][bB][zZ]" format="DE-605"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="^NRW$|^NRW/Hist.Buch$" format="DE-605"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="5\/NWBib" format="DE-5"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="51\/NWBib" format="DE-51"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="6\/NWBib" format="DE-6"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="61\/NWBib" format="DE-61"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="([1-9][0-9]{1,5})/Inst" format="DE-${1}"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="[0]{1,3}([1-9][0-9]{1,4})/Inst" format="DE-${1}"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="^([1-9])\/Inst$" format="DE-${1}"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="([1-9][0-9]{1,4})" format="DE-${1}"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="0([1-9][0-9]{1,4})" format="DE-${1}"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="0{1,3}([1-9])$" format="DE-${1}"/>
</data>
<data source="$[field_2]" name="a">
<regexp match="^292$" format="DE-101b"/>
</data>
</choose>
</combine>
</macro>
<macro name="setRdfSubject">
<combine name="~rdf:subject" value="${a}">
<data source="$[field]" name="a">
<regexp match="(.*)" format="$[ns-lobid-resource]${1}#!"/>
</data>
</combine>
</macro>
<macro name="setGNDPersonId">
<data source="$[field][-amn][12].9" name="@GNDPersonId$[field]">
<regexp match="\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}"/>
<sanitizeUrl></sanitizeUrl>
</data>
</macro>
<macro name="setCreatorPersonLabel">
<combine name="@creatorPersonLabel$[field]" value="${a}">
<data source="$[field][-aemn][12].[pa]" name="a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
</combine>
</macro>
<macro name="setContributorPersonLabel">
<combine name="@contributorPersonLabel$[field]" value="${a}">
<data source="$[field][-bcf]1.[pa]" name="a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
</combine>
</macro>
<macro name="setBnodeCreatorPersonLabel">
<combine name="@bnodeCreatorPersonLabel$[field]" value="_:$[field]${a}">
<if>
<none>
<data source="@GNDPersonId$[field]"/>
</none>
</if>
<data source="@creatorPersonLabel$[field]" name="a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
</combine>
</macro>
<macro name="setBnodeContributorPersonLabel">
<combine name="@bnodeContributorPersonLabel$[field]" value="_:$[field]${a}">
<if>
<none>
<data source="@GNDPersonId$[field]"/>
</none>
</if>
<data source="@contributorPersonLabel$[field]" name="a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
</combine>
</macro>
<macro name="chooseRelatorNotFrom100sRoleFields">
<choose name="@relatorNotFrom100sRoleFields$[field]">
<data source="$[field]f1.p" name="a">
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/hnr"/>
</data>
<data source="$[field]e[1234].p" name="a"> <!-- see #150 -->
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/prf"/>
</data>
<!-- default -->
<data source="$[field][bcf][12].[pa]" name="a">
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/ctb"/>
</data>
<data source="$[field][-amn][12].9">
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/cre"/>
</data>
<data source="$[field][-aemn][12].[pa]">
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/cre"/>
</data>
</choose>
</macro>
<macro name="setRelatorNotFrom100sRoleFields">
<combine name="@relator$[field]" value="${a}">
<if>
<none>
<data source="@relator$[field]"/>
</none>
</if>
<data source="@relatorNotFrom100sRoleFields$[field]" name="a"/>
</combine>
</macro>
<macro name="setCreatorPersonBnodeOrId">
<choose name="@creatorPersonBnodeOrId$[field]" flushWith="@GNDPersonId$[field]|@bnodeCreatorPersonLabel$[field]">
<data source="@GNDPersonId$[field]"/>
<data source="@bnodeCreatorPersonLabel$[field]"/>
</choose>
</macro>
<macro name="setContributorPersonBnodeOrId">
<choose name="@contributorPersonBnodeOrId$[field]">
<data source="@contributorPersonId$[field]"/>
<data source="@bnodeContributorPersonLabel$[field]"/>
</choose>
</macro>
<macro name="setContributorCorporateBodyBnode">
<combine name="@contributorCorporateBodyBnode$[field]" value="_:$[field]${a}">
<data source="@contributorCorporateBodyLabel$[field]" name="a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
</combine>
</macro>
<macro name="setContributorCorporateBodyBnodeOrId">
<choose name="@contributorCorporateBodyBnodeOrId$[field]" flushWith="$[field][bcefp][12].[a9]">
<data source="@contributingCorporateBodyId$[field]"/>
<data source="@contributorCorporateBodyBnode$[field]"/>
</choose>
</macro>
<macro name="setCreatorCorporateBodyBnodeOrId">
<choose name="@creatorCorporateBodyBnodeOrId$[field]">
<data source="@creatorCorporateBodyId$[field]"/>
<data
source="@creatorCorporateBodyLabelPA$[field]|@nameOfCreatingCorporateBodyG$[field]|@preferredNameConcatEventE$[field]">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
<regexp match="(.*)" format="_:$[field]${1}"/>
</data>
</choose>
</macro>
<macro name="setLabelMAB451-491ToId">
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="$[field_1]">
<choose name="a" flushWith="$[field_1]">
<data source="$[field_2]" name="a">
<replace pattern="&lt;&lt;|&gt;&gt;|\[|\]" with=""/>
<regexp match="(.* ; [0-9].* [a-zA-Z]*$)" format="${1}"/>
</data>
<data source="$[field_2]" name="a">
<replace pattern="&lt;&lt;|&gt;&gt;|\[|\]" with=""/>
<regexp match="(.*) ; [0-9]$" format="${1}"/>
</data>
<data source="$[field_2]">
<replace pattern="&lt;&lt;|&gt;&gt;|\[|\]" with=""/>
<regexp match="(.*) ; (.*) [0-9]$" format="${1}"/>
</data>
<data source="$[field_2]">
<replace pattern="&lt;&lt;|&gt;&gt;|\[|\]" with=""/>
<regexp match="(.*) ; (.*)[0-9]$" format="${1}"/>
</data>
<data source="$[field_2]">
<replace pattern="&lt;&lt;|&gt;&gt;|\[|\]" with=""/>
<regexp match="(.*); [0-9]" format="${1}"/>
</data>
<data source="$[field_2]">
<replace pattern="&lt;&lt;|&gt;&gt;|\[|\]" with=""/>
<regexp match="(.*)[a-zA-Z]$"/>
</data>
</choose>
</combine>
</macro>
<macro name="createEntityForHasSuperordinateWithoutIdWithNumbering">
<entity name="$[ns-lobid-vocab]isPartOf">
<entity name="$[ns-lobid-vocab]hasSuperordinate">
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${isPartOfLiteral}">
<if>
<none>
<data source="$[field_1]"/>
</none>
</if>
<data source="$[field_2]" name="isPartOfLiteral">
<replace pattern="^http" with="Siehe: http"/>
<regexp match="(.*) ; (.*)" format="${1}"/>
</data>
</combine>
</entity>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="$[ns-lobid-vocab]IsPartOfRelation">
<if>
<none>
<data source="$[field_1]"/>
</none>
</if>
<data source="$[field_2]"/>
</combine>
<data source="@numberingOfHasSuperordinate$[numbering]" name="$[ns-lobid-vocab]numbering"/>
</entity>
</macro>
<macro name="createEntityForHasSuperordinateWithIdAndWithoutNumbering">
<entity name="$[ns-lobid-vocab]isPartOf">
<combine name="$[ns-lobid-vocab]hasSuperordinate" value="${a}">
<if>
<none>
<data source="$[field_1]" name="a">
<regexp match="(.*) +;.*" format="${1}"/>
</data>
<data source="$[field_5]">
<regexp match=".*\d.*"/>
</data>
</none>
</if>
<data source="$[field_3]" name="a">
<regexp match="(.*)" format="$[ns-lobid-resource]${1}#!"/>
</data>
</combine>
<data source="$[field_1]" name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<regexp match=".*" format="$[ns-lobid-vocab]IsPartOfRelation"/>
</data>
</entity>
</macro>
<macro name="createNumberingForHasSuperordinate">
<choose name="@numberingOfHasSuperordinate$[field]">
<data source="$[field]5[-ab]1.a">
<regexp match=".*\d.*"/>
</data>
<data source="$[field]1[-ab]1.a" name="a">
<regexp match=".*; (.*)" format="${1}"/>
<trim></trim>
<replace pattern="\[|\]" with=""/>
</data>
</choose>
</macro>
<macro name="createEntityForHasSuperordinateWithIdAndNumbering">
<entity name="$[ns-lobid-vocab]isPartOf">
<data source="$[field_3]" name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<regexp match=".*" format="$[ns-lobid-vocab]IsPartOfRelation"/>
</data>
<combine name="$[ns-lobid-vocab]hasSuperordinate" value="$[ns-lobid-resource]${a}#!"
flushWith="@numberingOfHasSuperordinate45">
<data source="$[field_3]" name="a"/>
</combine>
<combine name="$[ns-lobid-vocab]numbering" value="${a}"
flushWith="@numberingOfHasSuperordinate$[numbering]">
<data source="@numberingOfHasSuperordinate$[numbering]" name="a"/>
</combine>
</entity>
</macro>
<macro name="createEntityForHasSuperordinateWithoutIdAndNumbering">
<entity name="$[ns-lobid-vocab]isPartOf">
<entity name="$[ns-lobid-vocab]hasSuperordinate">
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}">
<if>
<none>
<data source="$[field_1]"/>
<data source="$[field_2]" name="a">
<regexp match="(.*) +;.*" format="${1}"/>
</data>
</none>
</if>
<data source="$[field_2]" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
</entity>
<data source="$[field_2]" name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<regexp match=".*" format="$[ns-lobid-vocab]IsPartOfRelation"/>
</data>
</entity>
</macro>
<!-- nwbib speciality: doublette subfields => also subject chain -->
<macro name="doubledPreferredNameSubjectChain">
<combine name="@doubledPreferredNameSubjectChain$[field]" value="${a}"
flushWith="$[field]-1">
<concat delimiter="@" name="a" flushWith="$[field]-1">
<data source="$[field]-1.a"/>
</concat>
</combine>
</macro>
<macro name="nwbibComplexSubjectRswkLabel">
<combine name="@nwbibComplexSubjectRswkLabel$[field]" value="${a}" flushWith="$[field]-1">
<data source="@doubledPreferredNameSubjectChain$[field]" name="a">
<replace pattern="&gt;&gt;" with=""/>
<replace pattern="&lt;&lt;" with=""/>
<replace pattern=" " with=""/>
<regexp match="^(.*)@.*" format="${1}"/>
</data>
</combine>
</macro>
<macro name="makeNwbibComplexSubjectId">
<data source="@nwbibComplexSubjectRswkLabel$[field]" name="@nwbibComplexSubjectRswkId$[field]">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
<regexp match="(.*)" format="_:$[field]${1}"/>
</data>
</macro>
<macro name="setNwbibRdfSubject">
<combine name="~rdf:subject" value="${subject}">
<data source="@nwbibComplexSubjectRswkLabel$[field]"/>
<data source="@nwbibComplexSubjectRswkId$[field]" name="subject"/>
</combine>
</macro>
<macro name="nwbibSetLobidSubject">
<combine name="~rdf:subject" value="$[ns-lobid-resource]${subject}#!">
<data source="@nwbibComplexSubjectRswkId$[field]"/>
<data source="@nwbibComplexSubjectRswkLabel$[field]"/>
<data source="@id" name="subject"/>
</combine>
</macro>
<!-- / nwbib speciality -->
<macro name="setBackRdfSubject">
<combine name="~rdf:subject" value="$[ns-lobid-resource]${subject}#!">
<data source="@id" name="subject"/>
<data source="$[field]"/>
</combine>
</macro>
<macro name="subject-chain-name1">
<combine name="@preferredNameSubjectChain$[field_1]-1" value="${a}">
<choose name="a" flushWith="$[field_1]??|$[field_2]-1.a" sameEntity="true">
<data source="@preferredNameConcatEventENDC"/>
<data source="@preferredNameSemicolon"/>
<data source="@preferredNamePersonConcatSubject"/>
<data source="@preferredNameConcatTitleWithNumberingSubject"/>
<data source="@preferredNameConcatTitleWithoutNumberingSubject"/>
<concat delimiter=" | " name="a" flushWith="$[field_1]??">
<data source="$[field_1]-[-1].a"/>
</concat>
<concat delimiter="" name="a" flushWith="$[field_1]??|$[field_2]-1.a">
<data source="$[field_1]-[-1].[bfghknpskxz-]">
<replace pattern="^" with=", "/>
</data>
<concat delimiter="" name="e" flushWith="$[field_1]??">
<data source="$[field_1]-[-1].e">
<replace pattern="^" with=""/>
<replace pattern="$" with=""/>
</data>
<concat delimiter="" name="d" flushWith="$[field_1]??">
<data source="$[field_1]-[-1].d">
<replace pattern="^" with=" ("/>
<replace pattern="$" with=")"/>
</data>
</concat>
</concat>
<concat delimiter="" name="c" flushWith="$[field_1]??">
<data source="$[field_1]-[-1].c">
<regexp match="(.*)" format=", ${1}"/>
</data>
<data source="$[field_1]-[-1].t">
<regexp match="(.*)" format=": ${1}"/>
</data>
</concat>
<data source="$[field_2]-1.a" name="perm">
<regexp match="(.*)" format="(${1})"/>
</data>
</concat>
</choose>
</combine>
</macro>
<macro name="subject-chain-name2">
<combine name="@preferredNameSubjectChain$[field_1]-2" value="${a}">
<choose name="a" flushWith="$[field_1]??|$[field_2]-2.a" sameEntity="true">
<data source="@preferredNameConcatEventENDC"/>
<data source="@preferredNameSemicolon"/>
<data source="@preferredNamePersonConcatSubject"/>
<data source="@preferredNameConcatTitleWithNumberingSubject"/>
<data source="@preferredNameConcatTitleWithoutNumberingSubject"/>
<concat delimiter="" name="a" flushWith="$[field_1]??|$[field_2]-2.a">
<data source="$[field_1]-2.[abfghknpskxz-]">
<replace pattern="^" with=", "/>
</data>
<concat delimiter="" name="e" flushWith="$[field_1]??">
<data source="$[field_1]-2.e">
<replace pattern="^" with=""/>
<replace pattern="$" with=""/>
</data>
<concat delimiter="" name="d" flushWith="$[field_1]??">
<data source="$[field_1]-2.d">
<replace pattern="^" with=" ("/>
<replace pattern="$" with=")"/>
</data>
</concat>
</concat>
<concat delimiter="" name="c" flushWith="$[field_1]??">
<data source="$[field_1]-2.c">
<regexp match="(.*)" format=", ${1}"/>
</data>
<data source="$[field_1]-2.t">
<regexp match="(.*)" format=": ${1}"/>
</data>
</concat>
</concat>
</choose>
</combine>
</macro>
<macro name="subject-chain-perm1">
<combine name="@subjectChainPerm$[field]-1" value="${a}">
<concat delimiter=" | " name="a">
<data source="@preferredNameSubjectChain$[field]-1">
<replace pattern="^, " with=""/>
<replace pattern=", $" with=""/>
</data>
</concat>
</combine>
</macro>
<macro name="subject-chain-perm2">
<combine name="@subjectChainPerm$[field]-2" value="${a}">
<concat delimiter=" | " name="a">
<data source="@preferredNameSubjectChain$[field]-2">
<replace pattern="^, " with=""/>
<replace pattern=", $" with=""/>
</data>
</concat>
</combine>
</macro>
<!-- prefer gnd subjects IDs to literals -->
<macro name="subjectRswkId">
<combine name="@complexSubjectRswkId$[field]-$[indicator2]" value="${a}"
flushWith="$[field]-$[indicator2]">
<choose name="a" flushWith="$[field]-$[indicator2]">
<data source="$[field]-[-12].9" name="a">
<regexp match="\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}"/>
</data>
<data source="$[field]-$[indicator2].[acfghkpstkz-]" name="a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
<regexp match="(.*)" format="_:$[field]-$[indicator2].${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="setConcatComplexSubjectRswkId">
<combine name="@concatComplexSubjectRswkId$[field]" value="_:${a}">
<concat delimiter="|" name="a">
<data source="@complexSubjectRswkId$[field]"/>
</concat>
</combine>
</macro>
<macro name="subjectRswkIdSetDctSubject">
<combine name="http://purl.org/dc/terms/subject" value="_:$[field]-$[indicator2]"
flushWith="@concatComplexSubjectRswkId$[field]-$[indicator2]">
<data source="@concatComplexSubjectRswkId$[field]-$[indicator2]"/>
</combine>
</macro>
<macro name="subjectRswkIdSetRdfSubject">
<combine name="~rdf:subject" value="_:$[field]-$[indicator2]"
flushWith="@concatComplexSubjectRswkId$[field]-$[indicator2]" reset="true">
<data source="@concatComplexSubjectRswkId$[field]-$[indicator2]"/>
</combine>
</macro>
<macro name="subjectRswkIdSetType">
<data name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" source="@concatComplexSubjectRswkId$[field]-$[indicator2]">
<constant value="http://www.loc.gov/mads/rdf/v1#ComplexSubject"/>
</data>
</macro>
<macro name="complexSubjectRswkId">
<entity name="~rdf:list@concatComplexSubjectRswkId-$[field]$[indicator2]"
flushWith="@concatComplexSubjectRswkId$[field]-$[indicator2]">
<data name="http://www.loc.gov/mads/rdf/v1#componentList"
source="@complexSubjectRswkId$[field]-$[indicator2]|@nwbibComplexSubjectRswkId$[field]"/>
</entity>
</macro>
<macro name="setRdfSubjectComplexSubjectRswkId">
<combine name="~rdf:subject" value="_:$[field]_${subject}" flushWith="@subjectChainPerm$[field]"
reset="true">
<data source="@concatComplexSubjectRswkId$[field]" name="subject"/>
</combine>
</macro>
<macro name="setSubjectChainInLabel">
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@concatComplexSubjectRswkId$[field]">
<data source="@subjectChainPerm$[field]" name="a">
<replace pattern="\) \| \(" with=" | "/>
<replace pattern=" \| \(" with=" \("/>
<replace pattern="&gt;&gt;" with=""/>
<replace pattern="&lt;&lt;" with=""/>
<replace pattern=", :" with=":"/>
<replace pattern="^: " with=""/>
<replace pattern="\([0-9]*\)$" with=""/>
<replace pattern="\([0-9]{1,6} \|" with=""/>
<replace pattern=" [0-9]{1,6} \|" with=""/>
<replace pattern="[0-9]{1,6}\)$" with=""/>
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
</macro>
<!-- subjects without ID -->
<macro name="dctSubject">
<combine name="@rdfTypeSubject" value="${a}" flushWith="$[field]-[-12]" reset="true"
sameEntity="true">
<choose name="a" flushWith="$[field]-[-12]" sameEntity="true">
<data source="$[field]-[-12].9">
<regexp match="\(DE-588\)(.*)" format=""/> <!-- will be ignored -->
</data>
<data source="$[field]-[-12].e" name="a">
<constant value="http://d-nb.info/standards/elementset/gnd#ConferenceOrEvent"/>
</data>
<data source="$[field]-[-12].g" name="a">
<constant value="http://d-nb.info/standards/elementset/gnd#PlaceOrGeographicName"/>
</data>
<data source="$[field]-[-12].k" name="a">
<constant value="http://d-nb.info/standards/elementset/gnd#CorporateBody"/>
</data>
<data source="$[field]-[-12].p" name="a">
<constant value="http://d-nb.info/standards/elementset/gnd#Person"/>
</data>
<data source="$[field]-[-12].t" name="a">
<constant value="http://d-nb.info/standards/elementset/gnd#Work"/>
</data>
<data source="$[field]-[-12].?" name="a">
<constant value="http://d-nb.info/standards/elementset/gnd#SubjectHeading"/>
</data>
</choose>
</combine>
</macro>
<!-- altLabel -->
<macro name="altLabel">
<combine name="@altLabel$[type]" value="${a}" flushWith="$[field]??">
<choose name="a" flushWith="$[field]??">
<data source="@preferredNameConcatEventENDC"/>
<data source="@preferredNameConcatEventEDC"/>
<data source="@altLabelEC"/>
<concat delimiter=", " name="a" sameEntity="true" flushWith="$[field][-abcefmn][12].c">
<data source="$[field][-abcefmn][12].p"/>
<data source="$[field][-abcefmn][12].c"/>
</concat>
<data source="@altLabelEBH"/>
<data source="@altLabelKB"/>
<data source="@altLabelKH"/>
<data source="$[field][-abcefmn][12].[aepk]" name="a">
<replace pattern="&gt;&gt;" with=""/>
<replace pattern="&lt;&lt;" with=""/>
</data>
</choose>
</combine>
</macro>
<!-- setting dateOfBirth and dateOfDeath for MAB 100s -->
<macro name="livingStatisticsSetRdfSubject">
<combine name="~rdf:subject" value="${a}">
<data source="$[field]"/>
<data source="$[gndId]" name="a">
<regexp match="\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}"/>
</data>
</combine>
</macro>
<macro name="dateOfBirthMAB100s">
<combine name="$[ns-gnd]dateOfBirth" value="${a}" sameEntity="true">
<choose name="a" flushWith="$[gndId]" sameEntity="true">
<data source="$[field]">
<regexp match="^([012][0-9]{3})-" format="${1}"/>
</data>
<data source="$[field]">
<regexp match="^([1-9][0-9]{2})-" format="0${1}"/>
</data>
<data source="$[field]">
<regexp match="^([1-9][0-9])-" format="00${1}"/>
</data>
<data source="$[field]">
<regexp match="^([0-9])-" format="000${1}"/>
</data>
<data source="$[field]">
<regexp match="^v([012][0-9]{3})-" format="-${1}"/>
</data>
<data source="$[field]">
<regexp match="^v([1-9][0-9]{2})-" format="-0${1}"/>
</data>
<data source="$[field]">
<regexp match="^v([1-9][0-9])-" format="-00${1}"/>
</data>
<data source="$[field]">
<regexp match="^v([0-9])-" format="-000${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="dateOfDeathMAB100s">
<combine name="$[ns-gnd]dateOfDeath" value="${a}" sameEntity="true">
<choose name="a" flushWith="$[gndId]" sameEntity="true">
<data source="$[field]">
<regexp match="-([012][0-9]{3})$" format="${1}"/>
</data>
<data source="$[field]">
<regexp match="-([1-9][0-9]{2})$" format="0${1}"/>
</data>
<data source="$[field]">
<regexp match="-([1-9][0-9])$" format="00${1}"/>
</data>
<data source="$[field]">
<regexp match="-([0-9])$" format="000${1}"/>
</data>
<data source="$[field]">
<regexp match="-v([012][0-9]{3})$" format="-${1}"/>
</data>
<data source="$[field]">
<regexp match="-v([1-9][0-9]{2})$" format="-0${1}"/>
</data>
<data source="$[field]">
<regexp match="-v([1-9][0-9])$" format="-00${1}"/>
</data>
<data source="$[field]">
<regexp match="-v([0-9])$" format="-000${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="nonYearLivingStatistics">
<combine name="$[ns-gnd]dateOfBirthAndDeath" value="${a}" sameEntity="true"
flushWith="$[gndId]">
<data source="$[field]" name="a">
<regexp match="^ca\..*|.*Jh\."/>
</data>
</combine>
</macro>
<macro name="setRSWKSubjectId">
<combine name="@$[field]Id" value="${a}">
<data source="$[field]-[-12].9" name="a">
<regexp match="\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}"/>
</data>
<data source="$[field]-[-12].p"/>
</combine>
</macro>
<macro name="setRdfSubjectForRSWKSubject">
<combine name="~rdf:subject" value="${a}" sameEntity="true">
<data source="@$[field]Id" name="a"/>
</combine>
</macro>
<macro name="setRSWKSubjectDateOfBirth">
<combine name="$[ns-gnd]dateOfBirth" value="${a}" flushWith="@$[field]Id"
sameEntity="true">
<choose name="a" flushWith="@$[field]Id" sameEntity="true">
<data source="$[field]-[-12].t">
<regexp match=".*" format=""/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^([012][0-9]{3})-" format="${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^([1-9][0-9]{2})-" format="0${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^([1-9][0-9])-" format="00${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^([0-9])-" format="000${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^v([012][0-9]{3})-" format="-${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^v([1-9][0-9]{2})-" format="-0${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^v([1-9][0-9])-" format="-00${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^v([0-9])-" format="-000${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="setRSWKSubjectDateOfDeath">
<combine name="$[ns-gnd]dateOfDeath" value="${a}" flushWith="@$[field]Id"
sameEntity="true">
<choose name="a" flushWith="@$[field]Id" sameEntity="true">
<data source="$[field]-[-12].t">
<regexp match=".*" format=""/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-([012][0-9]{3})$" format="${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-([1-9][0-9]{2})$" format="0${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-([1-9][0-9])$" format="00${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-([0-9])$" format="000${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-v([012][0-9]{3})$" format="-${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-v([1-9][0-9]{2})$" format="-0${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-v([1-9][0-9])$" format="-00${1}"/>
</data>
<data source="$[field]-[-12].d">
<regexp match="-v([0-9])$" format="-000${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="setRSWKSubjectDateOfBirthAndDeath">
<combine name="$[ns-gnd]dateOfBirthAndDeath" value="${a}" flushWith="@$[field]Id"
sameEntity="true">
<choose name="a" flushWith="@$[field]Id" sameEntity="true">
<data source="$[field]-[-12].t">
<regexp match=".*" format=""/>
</data>
<data source="$[field]-[-12].d">
<regexp match="^ca\..*|.*Jh\."/>
</data>
</choose>
</combine>
</macro>
<macro name="setBackRdfSubjectForRSWKSubject">
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="@$[field]Id">
<data source="@id" name="id"/>
<data source="@$[field]Id" name="a"/>
</combine>
</macro>
<macro name="addTypeCollection">
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="${a}">
<data source="$[field]" name="a">
<constant value="http://id.loc.gov/ontologies/bibframe/Collection"/>
</data>
</combine>
</macro>
<macro name="setAlternativeTitleWithoutAddition">
<combine name="http://purl.org/dc/terms/alternative" value="${a}">
<if>
<none>
<data source="$[excludeField]"/>
</none>
</if>
<data source="$[field]" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
</macro>
<macro name="setLabelVariableForPersonsWithoutGNDId">
<combine name="@preferredNameForThePerson$[field]" value="${a}"
flushWith="$[field][-amn][12].9|$[field][bcefp][1234].9|$[field][-aemn][12].[pa]|$[field][bcf]1.[pa]">
<data source="$[field][-aemn][12].[pa]|$[field][bcf]1.[pa]" name="a">
<replace pattern="&gt;&gt;" with=""/>
<replace pattern="&lt;&lt;" with=""/>
</data>
<data
source="$[field][-amn][12].9|$[field][bcefp][1234].9|$[field][-aemn][12].[pa]|$[field][bcf]1.[pa]"/>
</combine>
</macro>
<macro name="setRelatorPerson">
<combine name="@relator$[field]" value="${a}" flushWith="$[field]?[12].[b4]">
<choose name="a" flushWith="$[field]?[12].[b4]">
<!-- map literals to marc relator property -->
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[dD]ars|^\[act\]$|^act$" format="http://id.loc.gov/vocabulary/relators/act"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^\[aut\]$|^(aut)$" format="http://id.loc.gov/vocabulary/relators/cre"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[nN]ach|^\[aft\]$|^aft$" format="http://id.loc.gov/vocabulary/relators/aft"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[vV]orl|^\[ant\]$|^ant$" format="http://id.loc.gov/vocabulary/relators/ant"/>
</data>
<data source="$[field]?[12].4">
<regexp match="^arr$" format="http://id.loc.gov/vocabulary/relators/arr"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[aA]rtist|Künstler|^\[art\]$|^art$" format="http://id.loc.gov/vocabulary/relators/art"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[vV]orw|^\[aui\]$|^aui$" format="http://id.loc.gov/vocabulary/relators/aui"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[dD]rehb|^\[aus\]$|^aus$" format="http://id.loc.gov/vocabulary/relators/aus"/>
</data>
<data source="$[field]?[12].b" name="a">
<regexp match="B[ü|ue]hnenbild" format="http://purl.org/lobid/lv#StageDesign"/>
</data>
<data source="$[field]?[12].b" name="a">
<regexp match="Choreinstud" format="http://purl.org/lobid/lv#ChoirTraining"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[cC]horeogr" format="http://id.loc.gov/vocabulary/relators/chr"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[mM]itarb|^\[clb\]$|^clb$" format="http://id.loc.gov/vocabulary/relators/clb"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^com$" format="http://id.loc.gov/vocabulary/relators/com"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[bB]eitr|^\[ctb\]$|^ctb$|[mM]itarb" format="http://id.loc.gov/vocabulary/relators/ctb"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^cmm$" format="http://id.loc.gov/vocabulary/relators/cmm"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[kK]omp|^\[cmp\]$|^cmp$" format="http://id.loc.gov/vocabulary/relators/cmp"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match=".*[dD]ir|^\[cnd\]$|^cnd$|Chorleit" format="http://id.loc.gov/vocabulary/relators/cnd"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="^\[cng\]$|^cng$" format="http://id.loc.gov/vocabulary/relators/cng"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[sS]ammler|^\[col\]$|^col$" format="http://id.loc.gov/vocabulary/relators/col"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="author|Verfasser|^cre$|^\[cre\]$" format="http://id.loc.gov/vocabulary/relators/cre"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^cst$" format="http://id.loc.gov/vocabulary/relators/cst"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="Beitr|Komm\.|^oth$|^wst$" format="http://id.loc.gov/vocabulary/relators/ctb"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[kK]artogra|^\[ctg\]$|^ctg$" format="http://id.loc.gov/vocabulary/relators/ctg"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^dgs$" format="http://id.loc.gov/vocabulary/relators/dgs"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="Tänzer" format="http://id.loc.gov/vocabulary/relators/dnc"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[rR]egi|^\[drt\]$|^drt$" format="http://id.loc.gov/vocabulary/relators/drt"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[wW]idmun|^\[dte\]$|^dte$" format="http://id.loc.gov/vocabulary/relators/dte"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[hH]rsg|^\[edt\]$|^edt$|editor|Herausg|^[eE]d\.$" format="http://id.loc.gov/vocabulary/relators/edt"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[sS]techer|^\[egr\]$|^egr$" format="http://id.loc.gov/vocabulary/relators/egr"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^fmd$" format="http://id.loc.gov/vocabulary/relators/fmd"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="^\[hnr\]$|^hnr$|Widmungsempfänger" format="http://id.loc.gov/vocabulary/relators/hnr"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[iI]ll|[zZ]eichn" format="http://id.loc.gov/vocabulary/relators/ill"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="^\[isb\]$|^isb$" format="http://id.loc.gov/vocabulary/relators/isb"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[iI]nterviewter|^\[ive\]$|^ive$" format="http://id.loc.gov/vocabulary/relators/ive"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[iI]nterviewer|^\[ivr\]$|^ivr$" format="http://id.loc.gov/vocabulary/relators/ivr"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp
match="^itr$|^\[itr\]$|[iI]nstr|[cC]embalo|Fagott|Flöte|(Gitarre|guitar)|(Harfe|harp)|Horn|(Klarinette|clarinet)|(Klavier|[pP]iano)|Kontrabass|Laute|Oboe|Org|Posaune|Saxophon|(Schlagzeug|drums)|Tromp|[vV]ioloncello|Violine"
format="http://id.loc.gov/vocabulary/relators/itr"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[lL]ibr|^lbt$|^\[lbt\]$" format="http://id.loc.gov/vocabulary/relators/lbt"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[lL]tg" format="http://id.loc.gov/vocabulary/relators/led"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^lyr$" format="http://id.loc.gov/vocabulary/relators/lyr"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="Moderation" format="http://id.loc.gov/vocabulary/relators/mod"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[mM]usi|^\[mus\]$|^mus$" format="http://id.loc.gov/vocabulary/relators/mus"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^nrt$" format="http://id.loc.gov/vocabulary/relators/nrt"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[bB]egr" format="http://id.loc.gov/vocabulary/relators/org"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^orm$" format="http://id.loc.gov/vocabulary/relators/orm"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match=".*[oO]togr.*|^\[pht\]$|^pht$" format="http://id.loc.gov/vocabulary/relators/pht"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[iI]nterpr|^\[prf\]$|^prf$" format="http://id.loc.gov/vocabulary/relators/prf"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[pP]rod|^\[pro\]$|^pro$" format="http://id.loc.gov/vocabulary/relators/pro"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="Adressat|^rcp$" format="http://id.loc.gov/vocabulary/relators/rcp"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[rR]ed" format="http://id.loc.gov/vocabulary/relators/red"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp
match="[gG]esang|^sng$|^\[sng\]$|Alt|Bariton|Bass|Baß|Counterten|Mezzosopr|Sopr|Ten"
format="http://id.loc.gov/vocabulary/relators/sng"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="[sS]precher" format="http://id.loc.gov/vocabulary/relators/spk"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="bers|^\[trl\]$|^trl$" format="http://id.loc.gov/vocabulary/relators/trl"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^wac$" format="http://id.loc.gov/vocabulary/relators/wac"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^wat$" format="http://id.loc.gov/vocabulary/relators/wat"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="Vorwort|^win$" format="http://id.loc.gov/vocabulary/relators/win"/>
</data>
<data source="$[field]?[12].[b4]" name="a">
<regexp match="Vorwort|^wpr$" format="http://id.loc.gov/vocabulary/relators/wpr"/>
</data>
</choose>
</combine>
</macro>
<macro name="chooseRelatorNotFrom200sRoleFields">
<choose name="@relatorNotFrom200sRoleFields$[field]">
<data source="$[field][bcefp][12].?">
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/ctb"/>
</data>
<data source="$[field][-a][12].?">
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/cre"/>
</data>
</choose>
</macro>
<macro name="setRelatorNotFrom200sRoleFields">
<combine name="@relator$[field]" value="${a}">
<if>
<none>
<data source="@relator$[field]"/>
</none>
</if>
<data source="@relatorNotFrom200sRoleFields$[field]" name="a"/>
</combine>
</macro>
<macro name="setRelatorNonPerson">
<combine name="@relator$[field]" value="${a}" flushWith="$[field]?[12].4">
<choose name="a" flushWith="$[field]?[12].4">
<data source="$[field]?[12].4">
<regexp match="^arr$" format="http://id.loc.gov/vocabulary/relators/arr"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^com$" format="http://id.loc.gov/vocabulary/relators/com"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^cst$" format="http://id.loc.gov/vocabulary/relators/cst"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^wst$" format="http://id.loc.gov/vocabulary/relators/ctb"/>
</data>
<data source="$[field]?[12].4">
<regexp match="^dgg$" format="http://id.loc.gov/vocabulary/relators/dgg"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^his$" format="http://id.loc.gov/vocabulary/relators/his"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^isb$" format="http://id.loc.gov/vocabulary/relators/isb"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^orm$" format="http://id.loc.gov/vocabulary/relators/orm"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^pat$" format="http://id.loc.gov/vocabulary/relators/pat"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^rcp$" format="http://id.loc.gov/vocabulary/relators/rcp"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^wac$" format="http://id.loc.gov/vocabulary/relators/wac"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^wat$" format="http://id.loc.gov/vocabulary/relators/wat"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^win$" format="http://id.loc.gov/vocabulary/relators/win"/>
</data>
<data source="$[field]?[12].4" name="a">
<regexp match="^wpr$" format="http://id.loc.gov/vocabulary/relators/wpr"/>
</data>
<data source="$[field][bcefp][12].?">
<regexp match=".*" format="http://id.loc.gov/vocabulary/relators/ctb"/>
</data>
</choose>
</combine>
</macro>
<macro name="setContributingCorporateBodyId">
<combine name="@contributingCorporateBodyId$[field]" value="${a}">
<data source="$[field][bcefp][12].9" name="a">
<regexp match="\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}"/>
</data>
</combine>
</macro>
<macro name="setCreatorCorporateBodyId">
<combine name="@creatorCorporateBodyId$[field]" value="${a}">
<data source="$[field][-a][12].9" name="a">
<regexp match="\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}"/>
</data>
</combine>
</macro>
<macro name="setNonPersonEntityDataWithoutGNDId">
<combine name="@nonPersonEntityDataWithoutGNDId$[field]" value="${a}">
<if>
<none>
<data source="$[field][-ab]1.9"/>
</none>
</if>
<data source="$[field][-ab]1.a" name="a"/>
</combine>
</macro>
<macro name="setRelatorConcat">
<combine name="@relator$[field]concat" value="${a}">
<concat delimiter="|" name="a">
<data source="@relator$[field]"/>
</concat>
</combine>
</macro>
<macro name="setFirstRelator">
<combine name="@relatorNode$[field]first" value="${a}">
<data source="@agentId$[field]"/>
<choose name="a">
<data source="@relator$[field]concat">
<regexp match="^(http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3})\|"
format="${1}"/>
</data>
<data source="@relator$[field]concat">
<regexp match="^(http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining))\|"
format="${1}"/>
</data>
<data source="@relator$[field]concat" name="b">
<regexp match="^http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3}$"/>
</data>
<data source="@relator$[field]concat">
<regexp match="^http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining)$"/>
</data>
</choose>
</combine>
</macro>
<macro name="setSecondRelator">
<combine name="@relatorNode$[field]second" value="${a}">
<data source="@agentId$[field]"/>
<choose name="a">
<data source="@relator$[field]concat" name="a">
<regexp match="\|(http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3})\|"
format="${1}"/>
</data>
<data source="@relator$[field]concat" name="a">
<regexp match="\|(http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining))\|"
format="${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="setLastRelator">
<combine name="@relatorNode$[field]last" value="${a}">
<data source="@agentId$[field]"/>
<choose name="a">
<data source="@relator$[field]concat" name="a">
<regexp match="\|(http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3})$"
format="${1}"/>
</data>
<data source="@relator$[field]concat" name="a">
<regexp match="\|(http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining))\|"
format="${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="setFirstContributionBnodeOfEntityField">
<combine name="@contributionBnode$[field]first" value="_:$[field]${a}${b}">
<data source="@agentId$[field]" name="a"/>
<choose name="b">
<data source="@relator$[field]concat">
<regexp match="^(http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3})\|"
format="${1}"/>
</data>
<data source="@relator$[field]concat">
<regexp match="^(http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining))\|"
format="${1}"/>
</data>
<data source="@relator$[field]concat" name="b">
<regexp match="^http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3}$"/>
</data>
<data source="@relator$[field]concat">
<regexp match="^http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining)$"/>
</data>
</choose>
</combine>
</macro>
<macro name="setSecondContributionBnodeOfEntityField">
<combine name="@contributionBnode$[field]second" value="_:$[field]${a}${b}">
<data source="@agentId$[field]" name="a"/>
<choose name="b">
<data source="@relator$[field]concat" name="b">
<regexp match="\|(http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3})\|"
format="${1}"/>
</data>
<data source="@relator$[field]concat">
<regexp match="\|(http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining))\|"
format="${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="setLastContributionBnodeOfEntityField">
<combine name="@contributionBnode$[field]last" value="_:$[field]${a}${b}">
<data source="@agentId$[field]" name="a"/>
<choose name="b">
<data source="@relator$[field]concat" name="b">
<regexp match="\|(http:\/\/id\.loc\.gov\/vocabulary\/relators\/[a-zA-Z]{3})$"
format="${1}"/>
</data>
<data source="@relator$[field]concat">
<regexp match="\|(http:\/\/purl\.org\/lobid\/lv#(StageDesign|ChoirTraining))$"
format="${1}"/>
</data>
</choose>
</combine>
</macro>
<macro name="setRdfSubjectContributionBnode">
<combine name="~rdf:subject" value="${a}" flushWith="@contributionBnode$[field]$[part]">
<data source="@contributionBnode$[field]$[part]" name="a"/>
</combine>
</macro>
<macro name="setAgentAtContribution">
<combine name="http://id.loc.gov/ontologies/bibframe/agent" value="${a}"
flushWith="@contributionBnode$[field]$[part]">
<data source="@agentId$[field]" name="a"/>
</combine>
</macro>
<macro name="setRoleAtContribution">
<combine name="http://id.loc.gov/ontologies/bibframe/role" value="${a}"
flushWith="@contributionBnode$[field]$[part]">
<data source="@relatorNode$[field]$[part]" name="a"/>
</combine>
</macro>
<macro name="setTypePersonAtContribution">
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="${a}"
flushWith="@contributionBnode$[field]$[part]">
<data source="@contributionBnode$[field]$[part]" name="a">
<constant value="http://id.loc.gov/ontologies/bibframe/Contribution"/>
</data>
</combine>
</macro>
<macro name="setSubjectContributionBnode">
<combine name="~rdf:subject" value="${a}"
flushWith="@relatorNode$[field]first|@relatorNode$[field]second|@relatorNode$[field]last"
sameEntity="true">
<data
source="@contributionBnode$[field]first|@contributionBnode$[field]second|@contributionBnode$[field]last"
name="a"/>
</combine>
</macro>
<macro name="setAgentForContributionBnode">
<combine name="http://id.loc.gov/ontologies/bibframe/agent" value="${a}">
<data source="@agentId$[field]" name="a"/>
<data source="@contributionBnode$[field]"/>
</combine>
</macro>
<macro name="setBackSubjectContributionBnode">
<combine name="~rdf:subject" value="$[ns-lobid-resource]${subject}#!">
<data source="@id" name="subject"/>
<data source="@relatorNode$[field]|@contributionBnode$[field]"/>
<data source="@agentId$[field]"/>
</combine>
</macro>
<macro name="setSubjectAgentIdForContributionBnode">
<combine name="~rdf:subject" value="${a}" flushWith="@agentId$[field]">
<data source="@agentId$[field]" name="a"/>
</combine>
</macro>
<macro name="setLabelForPersonAgent">
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@agentId$[field]">
<data source="@creatorPersonLabel$[field]|@contributorPersonLabel$[field]" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
</macro>
<macro name="setPreferredNameConcatTitleWithNumberingSubject">
<combine name="@preferredNameConcatTitleWithNumberingSubject" value="${t}. ${n} ${u}"
flushWith="$[field][-t][12].n" sameEntity="true">
<data source="$[field][-t][12].t" name="t"/>
<data source="$[field][-t][12].n" name="n"/>
<data source="$[field][-t][12].u" name="u"/>
</combine>
</macro>
<macro name="setPreferredNameConcatTitleWithoutNumberingSubject">
<combine name="@preferredNameConcatTitleWithoutNumberingSubject" value="${t}. ${u}"
flushWith="$[field][-t][12].u" sameEntity="true">
<data source="$[field][-t][12].t" name="t"/>
<data source="$[field][-t][12].u" name="u"/>
</combine>
</macro>
<macro name="setPreferredNameConcatSubject">
<combine name="@preferredNameConcatSubject$[field]" value="${a}" sameEntity="true">
<concat delimiter=", " name="a" sameEntity="true">
<data source="$[field][-abcdfep][12-].[bcdghknsxz]"/>
</concat>
</combine>
</macro>
<macro name="setContributorPersonId">
<data source="$[field][bcefp][1234].9" name="@contributorPersonId$[field]">
<regexp match="\(DE-588\)(.*)" format="http://d-nb.info/gnd/${1}"/>
<sanitizeUrl></sanitizeUrl>
</data>
</macro>
<macro name="setSubjectAgentIdForCorporateBody">
<combine name="~rdf:subject" value="${a}">
<data source="@agentId$[field]" name="a"/>
</combine>
</macro>
<macro name="setCreatorCorporateBodyLabelInAgent">
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@agentId$[field]">
<data source="$[field]-[-12].a" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
</macro>
<macro name="setContributorCorporateBodyLabelInAgent">
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@agentId$[field]">
<data source="@contributorCorporateBodyLabel$[field]" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
</macro>
<macro name="setTypeCorporateBodyInAgent">
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="${a}"
flushWith="@agentId$[field]">
<choose name="a" flushWith="@agentId$[field]">
<data source="$[field][-abcfep][12].e">
<constant value="$[ns-gnd]ConferenceOrEvent"/>
</data>
<data source="@preferredNameConcatSubject$[field]|@nameOfCreatingCorporateBodyG$[field]">
<constant value="$[ns-gnd]PlaceOrGeographicName"/>
</data>
<data
source="@contributorCorporateBodyLabel$[field]|@creatorCorporateBodyLabelPA$[field]|@contributingCorporateBodyId$[field]|@creatorCorporateBodyId$[field]">
<constant value="$[ns-gnd]CorporateBody"/>
</data>
</choose>
</combine>
</macro>
<macro name="setBackRdfSubjectForCorporateBodyAgent">
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="@agentId$[field]">
<data source="@id" name="id"/>
<data source="@contributorPersonLabel$[field]"/>
</combine>
</macro>
<macro name="setNameOfCreatingCorporateBodyComposed">
<combine name="@nameOfCreatingCorporateBodyComposed$[field]$[subfield_1]"
value="${a}, ${b}">
<data source="$[field][-a][12].$[subfield_1]" name="a"/>
<data source="$[field][-a][12].$[subfield_2]" name="b"/>
</combine>
</macro>
<macro name="chooseNameOfCreatingCorporateBodyGH">
<choose name="@nameOfCreatingCorporateBodyG$[field]">
<data source="@nameOfCreatingCorporateBodyComposed$[field]g"/>
<data source="$[field][-a][12].g"/>
</choose>
</macro>
<macro name="chooseNameOfCreatingCorporateBodyKH">
<choose name="@creatorCorporateBodyLabelPA$[field]">
<data source="@nameOfCreatingCorporateBodyComposed$[field]k"/>
<data source="$[field][-a][12].k"/>
</choose>
</macro>
<macro name="chooseNameOfCreatingCorporateBodyED">
<choose name="@preferredNameConcatEventE$[field]">
<data source="@nameOfCreatingCorporateBodyComposed$[field]e"/>
<data source="$[field][-a][12].e"/>
</choose>
</macro>
</macros>
<rules>
<!-- subject as bnodes and their two properties (label & type ) -->
<combine name="@subjectLabel" value="${a}" reset="true" sameEntity="true">
<data source="@rdfTypeSubject">
<regexp match="^http"/>
</data>
<data source="9[01234][27]-[-12].[aefghpstz-]" name="a"/>
</combine>
<combine value="_:${a}" name="@subjectLabelBnode">
<data source="@subjectLabel" name="a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
</combine>
<data source="@complexSubjectRswkId9[01234][27]-[12]" name="~rdf:subject"/>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="${a}"
reset="true" sameEntity="true">
<data source="@rdfTypeSubject" name="a">
<regexp match="^(http.*)"/>
</data>
<data source="@subjectLabelBnode"/>
</combine>
<data source="@subjectLabel" name="http://www.w3.org/2000/01/rdf-schema#label"/>
<!-- /subject as bnodes and their two properties (label & type -->
<combine name="~rdf:subject" value="$[ns-lobid-resource]${subject}#!" flushWith="@rdfTypeSubject">
<data source="@subjectLabelBnode"/>
<data source="@id" name="subject"/>
</combine>
<combine name="http://purl.org/dc/terms/subject" value="${a}"
flushWith="@nwbibSubject|@nwbibSpatialSubject|@rpb2Subject|@rpbSubject" reset="true">
<data source="@nwbibSubject|@rpb2Subject|@rpbSubject" name="a"/>
</combine>
<data source="@nwbibSpatialSubject" name="http://purl.org/dc/terms/spatial" />
<!-- ####################### -->
<!-- ####### Get subject uri of each record -->
<!-- ####################### -->
<data source="001-[-1].a" name="@id"/>
<!-- set subject uri of main resource -->
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!">
<data source="@id" name="id"/>
</combine>
<!-- ZDB id & collectedBy -->
<data source="025z[-1].a" name="@idzdb"/>
<!-- ####################### -->
<!-- ####### hbz ID sameAs ZDB ID -->
<!-- ####################### -->
<data source="@idzdb" name="http://www.w3.org/2002/07/owl#sameAs">
<regexp match="(.*)" format="$[ns-zdb-services]${1}"/>
</data>
<data source="@idzdb" name="$[ns-lobid-vocab]zdbID"/>
<combine name="http://purl.org/lobid/lv#inCollection" value="${a}">
<if>
<none>
<data source="001-1.a">
<regexp match="HT014846970"/>
</data>
</none>
</if>
<data source="@idzdb" name="a">
<regexp match=".*" format="$[ns-lobid-resource]HT014846970#!"/>
</data>
</combine>
<combine name="~rdf:subject" value="${a}" sameEntity="true">
<data source="@idzdb" name="a">
<regexp match=".*" format="$[ns-lobid-resource]HT014846970#!"/>
</data>
</combine>
<call-macro name="addTypeCollection" field="@idzdb"/>
<call-macro name="setBackRdfSubject" field="025z[-1].a"/>
<combine name="~rdf:subject" value="${a}">
<data source="@idzdb" name="a">
<regexp match="(.*)" format="$[ns-zdb-services]${1}"/>
</data>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="ZDB-Ressource">
<data source="@idzdb"/>
</combine>
<call-macro name="setBackRdfSubject" field="@idzdb"/>
<!-- ####################### -->
<!-- ####### Secondary form, link to primary form and vice versa -->
<!-- ####################### -->
<data source="021[-b]1.a" name="http://purl.org/dc/terms/isFormatOf">
<regexp match="(.*)" format="$[ns-lobid-resource]${1}#!"/>
<sanitizeUrl></sanitizeUrl>
</data>
<!-- ####################### -->
<!-- ####### Set owl:sameAs -->
<!-- ####################### -->
<data source="@id" name="http://www.w3.org/2002/07/owl#sameAs">
<regexp match="(.*)" format="http://hub.culturegraph.org/resource/HBZ-${1}"/>
</data>
<!-- ####################### -->
<!-- ####### General attributes for each record -->
<!-- ####################### -->
<data source="@id" name="$[ns-lobid-vocab]hbzID"/>
<data source="@id" name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<regexp match=".*" format="http://purl.org/dc/terms/BibliographicResource"/>
</data>
<data source="025z2.a" name="@dctIsPartOf">
<regexp match="(.*)" format="$[ns-zdb-services]${1}"/>
</data>
<data source="025o[-12].a" name="@oclcNumber"/>
<data source="@oclcNumber" name="http://www.w3.org/2002/07/owl#sameAs">
<regexp match="(.*)" format="http://worldcat.org/oclc/${1}"/>
<sanitizeUrl></sanitizeUrl>
</data>
<data source="@oclcNumber" name="$[ns-bibo]oclcnum"/>
<!-- ####################### -->
<!-- ################ language -->
<!-- ####################### -->
<data source="037[-abc][-123].a" name="@639-2"/>
<data source="@639-2" name="@language">
<lookup in="iso639xToIso639-3-Map"/>
</data>
<data source="@language" name="http://purl.org/dc/terms/language">
<regexp match="(.*)" format="http://id.loc.gov/vocabulary/iso639-2/${1}"/>
</data>
<!-- ####################### -->
<!-- ########## medium -->
<!-- ####################### -->
<!-- audio -->
<combine name="@mediumAudio" value="$[ns-bibo]AudioDocument">
<choose>
<data source="050.">
<regexp match="^.....a"/>
</data>
<data source="062-1.a">
<regexp match="Audio"/>
</data>
<data source="334-[12].a">
<regexp match="^[Tt][oO]|Audio-CD"/>
</data>
<data source="9[01234][27]-1.f">
<regexp match="Hörbuch|Tonträger"/>
</data>
</choose>
</combine>
<!-- audio cassette -->
<data source="050." name="@mediumAudio">
<regexp match="^.....ad" format="http://id.loc.gov/vocabulary/carriers/ss"/>
</data>
<data source="334-1.a" name="@mediumAudio">
<regexp match="Kompaktkassette|MC|Tonkassette" format="http://id.loc.gov/vocabulary/carriers/ss"/>
</data>
<data source="@mediumAudio" name="@medium"/>
<!--audio visual video -->
<data source="050." name="@matVideo">
<regexp match="^.....[bc]"/>
</data>
<data source="062-1.a" name="@matVideo">
<regexp match="Video"/>
</data>
<data source="334-[12].a" name="@matVideo">
<regexp match="^Bildton"/>
</data>
<data source="433-1.a" name="@matVideo">
<regexp match="DVD-Video|Video.*"/>
</data>
<data source="9[01234][27]-1.f" name="@matVideo">
<regexp match="DVD-Video|Video[ck]assette"/>
</data>
<data source="@matVideo" name="@medium">
<regexp match=".*" format="$[ns-bibo]AudioVisualDocument"/>
</data>
<data source="@matVideo" name="@medium">
<regexp match=".*" format="http://rdaregistry.info/termList/RDAMediaType/1008"/>
</data>
<data source="334-[12].a" name="@medium">
<regexp match="^Bildton" format="$[ns-bibo]AudioVisualDocument"/>
</data>
<!-- braille -->
<data source="050." name="@medium">
<regexp match="^....a" format="http://purl.org/library/BrailleBook"/>
</data>
<data source="050." name="@medium">
<regexp match="^....a" format="http://rdaregistry.info/termList/RDAproductionMethod/1010"/>
</data>
<!-- computer carrier (disks etc.) -->
<data source="050." name="@medium">
<regexp match="^........[abcdefz]" format="http://rdaregistry.info/termList/RDAMediaType/1003"/>
</data>
<data source="058." name="@medium">
<regexp match="^.[^r]" format="http://rdaregistry.info/termList/RDAMediaType/1003"/>
</data>
<combine name="@medium" value="http://rdaregistry.info/termList/RDAMediaType/1003">
<if>
<none>
<data source="@1018"/>
</none>
</if>
<data source="334-1.a">
<regexp match="[eE]lektr"/>
</data>
</combine>
<!-- electronic -->
<!-- looking for Blu-ray, Cartridge, CD, Diskette, DVD, Festplatte, HD-DVD, Kassette, USB -->
<data source="652a[-1].a" name="@medium">
<regexp match="^[BbCcDdHhFfKkUu][AaDdEeIiLlSsVv]" format="http://rdaregistry.info/termList/RDAMediaType/1003"/>
</data>
<data source="@medium" name="http://purl.org/dc/terms/medium"/>
<!-- manuscript -->
<data source="050." name="@medium">
<regexp match="^.a" format="http://purl.org/ontology/bibo/Manuscript"/>
</data>
<!-- microform -->
<data source="050." name="@medium">
<regexp match="^...[abc]" format="http://rdaregistry.info/termList/RDAMediaType/1002"/>
</data>
<data source="057." name="@medium">
<regexp match=".*" format="http://rdaregistry.info/termList/RDAMediaType/1002"/>
</data>
<data source="334-[12].a" name="@medium">
<regexp match="^Mikrofor" format="http://rdaregistry.info/termList/RDAMediaType/1002"/>
</data>
<data source="40[03]-1.a" name="@medium">
<regexp match="Mikrofiche" format="http://rdaregistry.info/termList/RDAMediaType/1002"/>
</data>
<data source="9[01234][27]-1.f" name="@medium">
<regexp match="Mikroform" format="http://rdaregistry.info/termList/RDAMediaType/1002"/>
</data>
<!-- multimedia -->
<data source="050." name="@medium">
<regexp match="^.......a" format="http://iflastandards.info/ns/isbd/terms/mediatype/T1008"/>
</data>
<data source="334-[-12].a" name="@medium">
<regexp match="Medienkombination" format="http://iflastandards.info/ns/isbd/terms/mediatype/T1008"/>
</data>
<data source="9[01234][27]-[-1].f" name="@medium">
<regexp match="Medienkombination" format="http://iflastandards.info/ns/isbd/terms/mediatype/T1008"/>
</data>
<!-- online -->
<data source="050." name="@1018">
<regexp match="^........g" format="http://rdaregistry.info/termList/RDACarrierType/1018"/>
</data>
<data source="058." name="@1018">
<regexp match="^.r" format="http://rdaregistry.info/termList/RDACarrierType/1018"/>
</data>
<data source="652a[-1].a" name="@1018">
<regexp match="^[AaOo][rn]" format="http://rdaregistry.info/termList/RDACarrierType/1018"/>
</data>
<data source="@1018" name="@medium"/>
<!-- print -->
<data source="050." name="@medium">
<regexp match="^[abcd]" format="http://rdaregistry.info/termList/RDAproductionMethod/1010"/>
</data>
<data source="050." name="@medium">
<regexp match="^.......a" format="http://rdaregistry.info/termList/RDAproductionMethod/1010"/>
</data>
<data source="334-[12].a" name="@medium">
<regexp match="Plakat" format="http://rdaregistry.info/termList/RDAproductionMethod/1010"/>
</data>
<data source="40[03]-1.a" name="@medium">
<regexp match="Nachdruck|Reprint" format="http://rdaregistry.info/termList/RDAproductionMethod/1010"/>
</data>
<!-- vinyl -->
<data source="050." name="@mediumAudio">
<regexp match="^.....aj" format="http://purl.org/ontology/mo/Vinyl"/>
</data>
<data source="050." name="@mediumAudio">
<regexp match="^.....aj" format="$[ns-bibo]AudioDocument"/>
</data>
<data source="334-[12].a" name="@mediumAudio">
<regexp match="Schallplatte" format="http://purl.org/ontology/mo/Vinyl"/>
</data>
<data source="334-[12].a" name="@mediumAudio">
<regexp match="Schallplatte" format="$[ns-bibo]AudioDocument"/>
</data>
<!-- set default medium -->
<combine name="@medium" value="$[ns-lobid-vocab]Miscellaneous" flushWith="record">
<if>
<none>
<data source="@medium">
<regexp match=".*"/>
</data>
</none>
</if>
<data source="@id"/>
</combine>
<combine name="~rdf:subject" value="${a}" flushWith="@medium">
<data source="@medium"/>
<data source="@id" name="a">
<regexp match="(.*)" format="$[ns-lobid-resource]${1}#!"/>
</data>
</combine>
<!-- ####################### -->
<!-- ########## type -->
<!-- ####################### -->
<!-- Miscellaneous -->
<data source="051." name="@rdftype">
<regexp match="^.z" format="$[ns-lobid-vocab]Miscellaneous"/>
</data>
<!-- amtliche Druckschrift -->
<data source="051." name="@rdftype">
<regexp match="^......[bfiklmorsu]" format="$[ns-lobid-vocab]OfficialPublication"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.aa|^............[bfiklmorsu]" format="$[ns-lobid-vocab]OfficialPublication"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.aa|^...aa|^.....aa" format="$[ns-lobid-vocab]OfficialPublication"/>
</data>
<!-- archived web page -->
<data source="051." name="@archived">
<regexp match="^.w" format="$[ns-lobid-vocab]ArchivedWebPage"/>
</data>
<data source="@archived" name="@rdftype"/>
<!-- article -->
<data source="051." name="@article">
<regexp match="^.t|^..t|^...t|^.....t" format="$[ns-bibo]Article"/>
</data>
<data source="052." name="@article">
<regexp match="^[af]|^.au|^...au|^.....au" format="$[ns-bibo]Article"/>
</data>
<data source="@article" name="@rdftype"/>
<!-- bibliography -->
<data source="051." name="@rdftype">
<regexp match="^.[b]|^..[b]|^...[b]" format="$[ns-lobid-vocab]Bibliography"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.b[i]|^...b[i]|^.....b[i]" format="$[ns-lobid-vocab]Bibliography"/>
</data>
<!-- biography -->
<data source="051." name="@rdftype">
<regexp match="^.[h]|^..[h]|^...[h]" format="$[ns-lobid-vocab]Biography"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.b[g]|^...b[g]|^.....b[g]" format="$[ns-lobid-vocab]Biography"/>
</data>
<data source="9[01234][27]-[-1].f" name="@rdftype">
<regexp match="Autobiographie|Biographie" format="$[ns-lobid-vocab]Biography"/>
</data>
<!-- edited volume -->
<combine name="@rdftype" value="${a}">
<if>
<none>
<data source="052.">
<regexp
match="^........([dcwesmbqfaghtz])|^.........([dcwesmbqfaghtz])|^..........([dcwesmbqfaghtz])"/>
</data>
<data source="542[-ab][-1].[a]"/>
</none>
</if>
<choose name="a">
<data source="9[01234][27][-a][-1].f" name="a">
<regexp match="^Aufsatzsammlung" format="$[ns-lobid-vocab]EditedVolume"/>
</data>
<data source="9[01234][27][-a][-1].9" name="a">
<regexp match="4143413" format="$[ns-lobid-vocab]EditedVolume"/>
</data>
</choose>
</combine>
<!-- festschrift -->
<data source="051." name="@rdftype">
<regexp match="^.f|^..f|^...f" format="$[ns-lobid-vocab]Festschrift"/>
</data>
<!-- picture -->
<data source="050." name="@rdftype">
<regexp match="^.....d" format="$[ns-bibo]Image"/>
</data>
<data source="334-[12].a" name="@rdftype">
<regexp match="^Bildli" format="$[ns-bibo]Image"/>
</data>
<!-- map -->
<data source="050." name="@rdftype">
<regexp match="^..........a" format="$[ns-bibo]Map"/>
</data>
<data source="433[-c].a" name="@rdftype">
<regexp match="Kt.|Karte" format="$[ns-bibo]Map"/>
</data>
<data source="9[01234][27]-1.f" name="@rdftype">
<regexp match="Altkarte|Karte|Stadtplan" format="$[ns-bibo]Map"/>
</data>
<!-- game -->
<data source="050." name="@rdftype">
<regexp match="^.........a" format="http://schema.org/Game"/>
</data>
<!-- legislation -->
<data source="051." name="@rdftype">
<regexp match="^.l|^..l|^...l" format="$[ns-lobid-vocab]Legislation"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.ag|^...ag|^.....ag" format="$[ns-lobid-vocab]Legislation"/>
</data>
<!-- multi-volume book -->
<data source="051." name="@rdftype">
<regexp match="^[nt]" format="$[ns-bibo]MultiVolumeBook"/>
</data>
<!-- music -->
<data source="051." name="@rdftype">
<regexp match="^.m|^..m|^...m" format="http://purl.org/ontology/mo/PublishedScore"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.mu|^...mu|^.....mu" format="http://purl.org/ontology/mo/PublishedScore"/>
</data>
<data source="334-1.a" name="@rdftype">
<regexp match="Musikdruck" format="http://purl.org/ontology/mo/PublishedScore"/>
</data>
<data source="541[-ab]?.?" name="@rdftype">
<regexp match=".*" format="http://purl.org/ontology/mo/PublishedScore"/>
</data>
<!-- newspaper -->
<data source="052." name="@rdftype">
<regexp match="^z|^.[ae]o|^...[ae]o|^.....[ae]o" format="$[ns-bibo]Newspaper"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^z|^.[url]p|^...[url]p|^.....[url]p" format="$[ns-bibo]Newspaper"/>
</data>
<data source="9[01234][27]-[-1].f" name="@rdftype">
<regexp match="Zeitung" format="$[ns-bibo]Newspaper"/>
</data>
<!-- norm -->
<data source="051." name="@rdftype">
<regexp match="^.n|^..n|^...n" format="$[ns-bibo]Standard"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.no|^...no|^.....no" format="$[ns-bibo]Standard"/>
</data>
<data source="9[01234][27]-[-12].f" name="@rdftype">
<regexp match="Norm|Richtlinie" format="$[ns-bibo]Standard"/>
</data>
<!-- periodical -->
<data source="052." name="@rdftype">
<regexp match="^[jp].*|^.il.*|^...il.*|^.....il.*" format="$[ns-bibo]Periodical"/>
</data>
<data source="9[01234][27]-[-1].f" name="@rdftype">
<regexp match="Zeitschrift" format="$[ns-bibo]Periodical"/>
</data>
<!-- proceedings -->
<data source="051." name="@rdftype">
<regexp match="^.k|^..k|^...k" format="$[ns-bibo]Proceedings"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.ko|^...ko|^.....ko" format="$[ns-bibo]Proceedings"/>
</data>
<data source="9[01234][27]-[-1].f" name="@rdftype">
<regexp match="Kongress" format="$[ns-bibo]Proceedings"/>
</data>
<!-- issue and volume of periodical work -->
<combine name="@rdftype" value="${a}">
<data source="025z2.a"/>
<data source="089|090-1.a" name="a">
<regexp match=".*" format="http://schema.org/PublicationIssue"/>
</data>
</combine>
<!-- reference source -->
<data source="051." name="@rdftype">
<regexp match="^.[de]|^..[de]|^...[de]" format="$[ns-bibo]ReferenceSource"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.ez|^...ez|^.....ez" format="$[ns-bibo]ReferenceSource"/>
</data>
<data source="9[01234][27]-[-12].f" name="@rdftype">
<regexp match="Bestimmungsbuch|Enzyklopädie|Werkverzeichnis|W[ö|oe]rterbuch"
format="$[ns-bibo]ReferenceSource"/>
</data>
<!-- report -->
<data source="051." name="@rdftype">
<regexp match="^.[r]|^..[r]|^...[r]" format="http://purl.org/ontology/bibo/Report"/>
</data>
<data source="9[01234][27]-[-12].9" name="@rdftype">
<regexp match="4128022-2" format="http://purl.org/ontology/bibo/Report"/>
</data>
<data source="9[01234][27]-[1].f" name="@rdftype">
<regexp match="Bericht|Erlebnisbericht|Forschungsbericht|Literaturbericht|Reisebericht"
format="http://purl.org/ontology/bibo/Report"/>
</data>
<!-- schoolbook -->
<data source="051." name="@rdftype">
<regexp match="^.x|^..x|^...x" format="$[ns-lobid-vocab]Schoolbook"/>
</data>
<data source="9[01234][27]-[1].f" name="@rdftype">
<regexp match="Schulbuch" format="$[ns-lobid-vocab]Schoolbook"/>
</data>
<!-- series -->
<combine name="@rdftype" value="${a}">
<if>
<none>
<data source="540[-ab][-1].[ab]"/>
</none>
</if>
<data source="052." name="a">
<regexp match="^r|^.se|^...se|^.....se" format="$[ns-bibo]Series"/>
</data>
</combine>
<data source="9[01234][27]-[1].f" name="@rdftype">
<regexp match="Schriftenreihe" format="$[ns-bibo]Series"/>
</data>
<!-- statistics -->
<data source="051." name="@rdftype">
<regexp match="^.s|^..s|^...s" format="http://purl.org/lobid/lv#Statistics"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.st|^..st|^...st|^....st|^.....st|^......st" format="http://purl.org/lobid/lv#Statistics"/>
</data>
<!-- thesis -->
<data source="051." name="@rdftype">
<regexp match="^.[uy]|^..[uy]|^...[uy]" format="$[ns-bibo]Thesis"/>
</data>
<data source="052." name="@rdftype">
<regexp match="^.sc|^...sc|^.....sc" format="$[ns-bibo]Thesis"/>
</data>
<data source="519-[12].?" name="@rdftype">
<regexp match=".*" format="$[ns-bibo]Thesis"/>
</data>
<!-- type is book (and also manifestation) if 050 begins with 'a' and 051 or 052 is missing
or 051 and 052 does not fulfill a certain pattern -->
<combine name="@rdftype" value="$[ns-bibo]Book">
<if>
<none>
<data source="@idzdb"/>
<data source="050.">
<regexp match="^.........a"/>
</data>
<data source="051.">
<regexp match="^a"/>
</data>
<data source="051.">
<regexp match="^.[mt]"/>
</data>
<data source="051.">
<regexp match="^..[tm]"/>
</data>
<data source="051.">
<regexp match="^...t"/>
</data>
<data source="051.">
<regexp match="^....t"/>
</data>
<data source="051.">
<regexp match="^.....t"/>
</data>
<data source="051.">
<regexp match="^.z"/>
</data>
<data source="052.">
<regexp match="^[a-zA-Z]"/>
</data>
<data source="089-[-1].a|090-[-1].a">
<regexp match="Heft"/>
</data>
<data source="@matVideo"/>
<data source="@mediumAudio"/>
<data source="@archived"/>
</none>
</if>
<choose>
<data source="050.">
<regexp match="^a"/>
</data>
<data source="051.">
<regexp match="^m|^s|^.x|^..x|^...x|^....[fkls]"/>
</data>
<data source="062-1.a">
<regexp match="Band"/>
</data>
<data source="089-[-1].a|090-[-1].a"/>
<data source="9[01234][27]-[-1].f">
<regexp
match="Anthologie|Atlas|Auktionskatalog|Bildband|Bilderbuch|Jugendbuch|Jugendsachbuch|Kinderbuch|Kindersachbuch|Kochbuch|Lehrbuch|Lesebuch"/>
</data>
</choose>
</combine>
<!-- set type -->
<data name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" source="@rdftype"/>
<!-- set default type -->
<combine name="@rdftype" value="$[ns-lobid-vocab]Miscellaneous" flushWith="record">
<if>
<none>
<data source="@rdftype"/>
</none>
</if>
<data source="@id"/>
</combine>
<combine name="~rdf:subject" value="${a}" flushWith="@rdftype">
<data source="@rdftype"/>
<data source="@id" name="a">
<regexp match="(.*)" format="$[ns-lobid-resource]${1}#!"/>
</data>
</combine>
<!-- ####################### -->
<!-- ########## containedIn -->
<!-- ####################### -->
<combine name="@containedIn" value="${a}">
<data source="@dctIsPartOfHbzIdArticle|@dctIsPartOfArticle" name="a"/>
<data source="051.">
<regexp match="a|^.t|^..t|^...t|^.....t"/>
</data>
</combine>
<combine name="$[ns-lobid-vocab]containedIn" value="${a}">
<data source="@containedIn" name="a">
<sanitizeUrl></sanitizeUrl>
</data>
</combine>
<combine name="@MAB590sContainedInLabelWithSubseries" value="${a}, ${b}">
<data source="590-1.a" name="a"/>
<data source="592-1.a" name="b"/>
</combine>
<combine name="@MAB590sContainedInLabel" value="${a}" flushWith="@containedIn">
<choose name="a" flushWith="@containedIn">
<data source="@MAB590sContainedInLabelWithSubseries"/>
<data source="590-1.a"/>
</choose>
</combine>
<combine name="~rdf:subject" value="${a}" flushWith="@containedIn">
<data source="@containedIn" name="a"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@containedIn">
<data source="@MAB590sContainedInLabel" name="a"/>
</combine>
<call-macro name="setBackRdfSubject" field="@containedIn"/>
<!-- ####################### -->
<!-- ########## title -->
<!-- ####################### -->
<data source="310[-ab][-12].a" name="@title310"/>
<!-- has other title information. If no title exists yet, use these (331 or 333) as title. -->
<data source="331[-ab][-1].a" name="@titleRemainder331"/>
<data source="333[-ab][-1].a" name="@titleRemainder333"/>
<combine name="@titleRemainder2title333" value="${title}">
<if>
<none>
<data source="@title310"/>
<data source="@titleRemainder331"/>
</none>
</if>
<data source="@titleRemainder333" name="title"/>
</combine>
<combine name="@085" value="${a}">
<concat delimiter=" / " name="a">
<data source="085x1.l"/>
</concat>
<data source="@titleRemainder331"/>
</combine>
<!-- used to sort out otherTitleInformation if it's identical with title -->
<combine name="@firstHalfOfTitle" value="${a}">
<choose name="a">
<data source="@titleRemainder331Superordination2title"/>
<data source="@title310"/>
</choose>
</combine>
<combine name="@otherTitle" value="${titleRemainder}">
<if>
<none>
<data source="@titleRemainder331Superordination"/>
</none>
</if>
<data source="@firstHalfOfTitle"/>
<data source="@titleRemainder331" name="titleRemainder"/>
</combine>
<combine name="http://rdaregistry.info/Elements/u/P60327" value="${corporateBody4Title}">
<if>
<none>
<data source="@titleRemainder2title333"/>
</none>
</if>
<data source="@titleRemainder333" name="corporateBody4Title"/>
</combine>
<!-- deliberatley not everything linked with OR '|' because of performance problems -->
<data source="335[-abcd][-1].a" name="@otherTitle"/>
<data source="370[abc]1.a|375[-e][-12].a|504-1.a" name="http://purl.org/dc/terms/alternative">
<replace pattern="^http" with="Siehe: http"/>
</data>
<call-macro name="setAlternativeTitleWithoutAddition" excludeField="343[-ab][-1].[ab]"
field="34[01][-ab][-1].[ab]"/>
<call-macro name="setAlternativeTitleWithoutAddition" excludeField="347[-ab][-1].[ab]"
field="34[45][-ab][-1].[ab]"/>
<call-macro name="setAlternativeTitleWithoutAddition" excludeField="351[-ab][-1].[ab]"
field="34[89][-ab][-1].[ab]"/>
<call-macro name="setAlternativeTitleWithoutAddition" excludeField="355[-ab][-1].[ab]"
field="35[23][-ab][-1].[ab]"/>
<!-- add alternative title with addition -->
<combine name="@betterParallelTitle340or341" value="${a}">
<choose name="a">
<data source="340[-ab][-1].[ab]"/>
<data source="341[-ab][-1].[ab]"/>
</choose>
</combine>
<combine name="http://purl.org/dc/terms/alternative" value="${a}. ${b}">
<data source="@betterParallelTitle340or341" name="a"/>
<data source="343[-ab]1.[ab]" name="b"/>
</combine>
<combine name="@betterParallelTitle344or345" value="${a}">
<choose name="a">
<data source="344[-ab][-1].[ab]"/>
<data source="345[-ab][-1].[ab]"/>
</choose>
</combine>
<combine name="http://purl.org/dc/terms/alternative" value="${a}. ${b}">
<data source="@betterParallelTitle344or345" name="a"/>
<data source="347[-ab]1.[ab]" name="b"/>
</combine>
<combine name="@betterParallelTitle348or349" value="${a}">
<choose name="a">
<data source="348[-ab][-1].[ab]"/>
<data source="349[-ab][-1].[ab]"/>
</choose>
</combine>
<combine name="http://purl.org/dc/terms/alternative" value="${a}. ${b}">
<data source="@betterParallelTitle348or349" name="a"/>
<data source="351[-ab]1.[ab]" name="b"/>
</combine>
<combine name="@betterParallelTitle352or353" value="${a}">
<choose name="a">
<data source="352[-ab][-1].[ab]"/>
<data source="353[-ab][-1].[ab]"/>
</choose>
</combine>
<combine name="http://purl.org/dc/terms/alternative" value="${a}. ${b}">
<data source="@betterParallelTitle352or353" name="a"/>
<data source="355[-ab]1.[ab]" name="b"/>
</combine>
<data source="376[-adb][-1].[ad]" name="$[ns-bibo]shortTitle"/>
<data source="@otherTitle" name="http://rdaregistry.info/Elements/u/P60493">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
<replace pattern="^http" with="Siehe: http"/>
</data>
<data source="675[-abcd][-12].a" name="$[ns-lobid-vocab]titleKeyword"/>
<!-- generating title using the superordination -->
<data source="331[-ab][2].a" name="@titleRemainder331Superordination"/>
<!-- ... by concatenating fields. Two fields are optional, one mandatory -->
<concat delimiter=", " name="@allMAB089subfieldA">
<data source="089-[-1].a|089.">
<replace pattern="&lt;" with=""/>
<replace pattern="&gt;" with=""/>
</data>
</concat>
<concat delimiter=", " name="@allMAB089subfieldN">
<data source="089-[-1].n">
<replace pattern="&lt;" with=""/>
<replace pattern="&gt;" with=""/>
</data>
</concat>
<choose name="@allMAB089subfieldAorN">
<data source="@allMAB089subfieldN"/>
<data source="@allMAB089subfieldA"/>
</choose>
<combine name="@titleRemainder331SuperordinationAndVolume089" value="${a}${b}${c}"
flushWith="@titleRemainder331Superordination|@allMAB089subfieldAorN">
<data source="@titleRemainder331Superordination" name="a"/>
<data source="@allMAB089subfieldAorN" name="b">
<regexp match="(.*)" format=", ${1}"/>
</data>
<data source="@titleRemainder331" name="c">
<regexp match="(.*)" format=": ${1}"/>
</data>
</combine>
<combine name="@titleRemainder331SuperordinationAndVolume090" value="${a}${b}${c}"
flushWith="@titleRemainder331Superordination">
<data source="@titleRemainder331Superordination" name="a"/>
<data source="090-[-1].a" name="b">
<regexp match="(.*)" format=", ${1}"/>
</data>
<data source="@titleRemainder331" name="c">
<regexp match="(.*)" format=": ${1}"/>
</data>
</combine>
<combine name="@titleRemainder331Superordination2title" value="${a}">
<choose name="a">
<data source="@titleRemainder331SuperordinationAndVolume089"/>
<data source="@titleRemainder331SuperordinationAndVolume090"/>
</choose>
</combine>
<combine name="http://purl.org/dc/terms/title" value="${a}">
<choose name="a">
<data source="@titleRemainder331Superordination2title">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
<data source="@title310">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
<data source="331[-ab][-1].a">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
<data source="@titleRemainder2title333">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
</data>
</choose>
</combine>
<data source="360-[12].a" name="@titleOfSubSeries"/>
<combine name="http://rdaregistry.info/Elements/u/P60517" value="${a}">
<concat delimiter=". " name="a">
<data source="@titleOfSubSeries" name="a"/>
</concat>
</combine>
<!-- ####################### -->
<!-- ########## containsExampleOfWork -->
<!-- ####################### -->
<!-- define variables -->
<combine name="@containsExampleOfWorkId303" value="${a}">
<data source="303t1.9" name="a">
<regexp match="\(DE-588\)(\d{8,9}[0-9X]|\d{7}-[0-9])" format="http://d-nb.info/gnd/${1}"/>
</data>
</combine>
<concat delimiter=". " name="@concatContainsExampleOfWorkTitleSubtitle"
flushWith="@containsExampleOfWorkId303" sameEntity="true">
<data source="303t1.u"/>
</concat>
<combine name="@containsExampleOfWorkTitleWithNumbering" value="${t}, ${n} (${r})"
sameEntity="true">
<data source="303t1.t" name="t"/>
<data source="303t1.n" name="n"/>
<data source="303t1.r" name="r"/>
</combine>
<combine name="@containsExampleOfWorkTitle" value="${t}. ${u}" flushWith="@containsExampleOfWorkId303"
sameEntity="true">
<data source="303t1.t" name="t">
<replace pattern="&lt;&lt;|&gt;&gt;" with=""/>
</data>
<data source="@concatContainsExampleOfWorkTitleSubtitle" name="u"/>
</combine>
<concat delimiter=", " name="@concatContainsExampleOfWorkTitleInstrumentation"
flushWith="@containsExampleOfWorkId303" sameEntity="true">
<data source="303t1.m"/>
</concat>
<combine name="@containsExampleOfWorkTitleWithInstrumentation2" value="${t}, ${m}"
sameEntity="true">
<data source="@containsExampleOfWorkTitle" name="t">
<regexp match="^(.*)\. ([a-zA-Z].*)$" format="${1}. ${2}"/>
</data>
<data source="@concatContainsExampleOfWorkTitleInstrumentation" name="m"/>
</combine>
<combine name="@containsExampleOfWorkTitleWithInstrumentation" value="${t}, ${m}"
flushWith="@containsExampleOfWorkId303" sameEntity="true">
<data source="@containsExampleOfWorkTitle" name="t">
<regexp match="^(.*)\. $" format="${1}"/>
</data>
<data source="@concatContainsExampleOfWorkTitleInstrumentation" name="m"/>
</combine>
<combine name="@containsExampleOfWorkTitleWithNumberingAndInstrumentation"
value="${tnr}, ${m}" sameEntity="true">
<data source="@containsExampleOfWorkTitleWithNumbering" name="tnr"/>
<data source="@containsExampleOfWorkInstumentation" name="m"/>
</combine>
<!-- add instrumentation for contained examples of work of MAB 303t -->
<combine name="@containsExampleOfWorkId303Instrumentation" value="${a}"
sameEntity="true">
<data source="303t1.m"/>
<data source="303t1.9" name="a">
<regexp match="\(DE-588\)(\d{8,9}[0-9X]|\d{7}-[0-9])" format="http://d-nb.info/gnd/${1}"/>
</data>
</combine>
<combine name="~rdf:subject" value="${a}">
<data source="@containsExampleOfWorkId303Instrumentation" name="a"/>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10220" value="${m}"
flushWith="@containsExampleOfWorkId303Instrumentation" sameEntity="true">
<data source="@concatContainsExampleOfWorkTitleInstrumentation" name="m">
<regexp match="(.*),.*" format="${1}"/>
</data>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10220" value="${m}"
flushWith="@containsExampleOfWorkId303Instrumentation" sameEntity="true">
<data source="@concatContainsExampleOfWorkTitleInstrumentation" name="m">
<regexp match=".*, (.*)" format="${1}"/>
</data>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10220" value="${m}"
flushWith="@containsExampleOfWorkId303Instrumentation" sameEntity="true" reset="true">
<data source="@concatContainsExampleOfWorkTitleInstrumentation" name="m">
<regexp match=".*, (.*), .*" format="${1}"/>
</data>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="@containsExampleOfWorkId303Instrumentation">
<data source="@id" name="id"/>
</combine>
<!-- add rest for contained examples of work of MAB 303t -->
<combine name="http://purl.org/lobid/lv#containsExampleOfWork" value="${a}">
<data source="@containsExampleOfWorkId303" name="a"/>
</combine>
<combine name="~rdf:subject" value="${a}">
<data source="@containsExampleOfWorkId303" name="a"/>
</combine>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#Work">
<data source="@containsExampleOfWorkId303"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@containsExampleOfWorkId303" sameEntity="true">
<choose name="a" flushWith="@containsExampleOfWorkId303" sameEntity="true">
<data source="@containsExampleOfWorkTitleWithNumbering"/>
<data source="@containsExampleOfWorkTitleWithInstrumentation2"/>
<data source="@containsExampleOfWorkTitleWithInstrumentation"/>
<data source="@containsExampleOfWorkTitle"/>
</choose>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10065" value="${p}${d}"
flushWith="@containsExampleOfWorkId303" sameEntity="true">
<data source="303t1.p" name="p"/>
<data source="303t1.d" name="d">
<regexp match="(.*)" format=" ${1}"/>
</data>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10079" value="${n}"
flushWith="@containsExampleOfWorkId303" sameEntity="true">
<data source="303t1.n" name="n"/>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10221" value="${r}"
flushWith="@containsExampleOfWorkId303" sameEntity="true">
<data source="303t1.r" name="r"/>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="@containsExampleOfWorkId303">
<data source="303t1.t"/>
<data source="@id" name="id"/>
</combine>
<!-- fallback solution for contained examples of work -->
<entity name="$[ns-lobid-vocab]containsExampleOfWork">
<if>
<none>
<data source="303t1.t"/>
</none>
</if>
<data source="521-1.[at]" name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<constant value="http://d-nb.info/standards/elementset/gnd#Work"/>
</data>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}">
<data source="521-1.[at]" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
</entity>
<!-- ####################### -->
<!-- ########## exampleOfWork -->
<!-- ####################### -->
<!-- define variables -->
<combine name="@exampleOfWorkId" value="${a}">
<data source="303-1.9" name="a">
<regexp match="\(DE-588\)(\d{8,9}[0-9X]|\d{7}-[0-9])" format="http://d-nb.info/gnd/${1}"/>
</data>
</combine>
<combine name="@exampleOfWork303titleWithSubtitleAndOccupation" value="${t}${m}${f}${u}"
flushWith="@exampleOfWorkId">
<data source="303-1.t" name="t"/>
<concat delimiter="" name="m" flushWith="@exampleOfWorkId">
<data source="303-1.m">
<regexp match="(.*)" format=", ${1}"/>
</data>
</concat>
<data source="303-1.f" name="f">
<regexp match="(.*)" format=" (${1})"/>
</data>
<data source="303-1.u" name="u">
<regexp match="(.*)" format=". ${1}"/>
</data>
</combine>
<combine name="@exampleOfWork303title" value="${a}" flushWith="@exampleOfWorkId">
<if>
<none>
<data source="303-1.f"/>
</none>
</if>
<data source="303-1.t"/>
</combine>
<combine name="@exampleOfWorkBnode303" value="_:${a}">
<if>
<none>
<data source="303-1.9"/>
</none>
</if>
<data source="303-1.t" name="a">
<replace pattern="&lt;" with="("/>
<replace pattern="&gt;" with=")"/>
</data>
</combine>
<combine name="@creatorOfExampleOfWorkWithoutLivingStatistics" value="${a}">
<if>
<none>
<data source="303-1.d"/>
<data source="303-1.9"/>
</none>
</if>
<data source="303-1.p" name="p"/>
</combine>
<combine name="@exampleOfWorkLabelWithoutLivingStatistics" value="${a}">
<data source="@exampleOfWorkBnode303"/>
<data source="@creatorOfExampleOfWorkWithoutLivingStatistics" name="a"/>
</combine>
<!-- add instrumentation of examples of work -->
<combine name="@exampleOfWorkId303Instrumentation" value="${a}" sameEntity="true">
<data source="303-1.m"/>
<data source="303-1.9" name="a">
<regexp match="\(DE-588\)(\d{8,9}[0-9X]|\d{7}-[0-9])" format="http://d-nb.info/gnd/${1}"/>
</data>
</combine>
<concat delimiter=", " name="@concatExampleOfWorkTitleInstrumentation" flushWith="@exampleOfWorkId303Instrumentation"
sameEntity="true">
<data source="303-1.m"/>
</concat>
<combine name="~rdf:subject" value="${a}">
<data source="@exampleOfWorkId303Instrumentation" name="a"/>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10220" value="${m}"
flushWith="@exampleOfWorkId303Instrumentation" sameEntity="true">
<data source="@concatExampleOfWorkTitleInstrumentation" name="m">
<regexp match="(.*),.*" format="${1}"/>
</data>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10220" value="${m}"
flushWith="@exampleOfWorkId303Instrumentation" sameEntity="true">
<data source="@concatExampleOfWorkTitleInstrumentation" name="m">
<regexp match=".*, (.*)" format="${1}"/>
</data>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10220" value="${m}"
flushWith="@exampleOfWorkId303Instrumentation" sameEntity="true" reset="true">
<data source="@concatExampleOfWorkTitleInstrumentation" name="m">
<regexp match=".*, (.*), .*" format="${1}"/>
</data>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="@exampleOfWorkId303Instrumentation">
<data source="@id" name="id"/>
</combine>
<!-- add rest for examples of work -->
<combine name="http://purl.org/lobid/lv#exampleOfWork" value="${a}" flushWith="@exampleOfWorkId">
<data source="@exampleOfWorkId" name="a"/>
</combine>
<combine name="~rdf:subject" value="${a}" flushWith="@exampleOfWorkId">
<data source="@exampleOfWorkId" name="a"/>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10065" value="${p} ${d}"
flushWith="@exampleOfWorkId">
<data source="303-1.p" name="p"/>
<data source="303-1.d" name="d"/>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10079" value="${n}"
flushWith="@exampleOfWorkId" sameEntity="true">
<data source="303-1.n" name="n"/>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10221" value="${r}"
flushWith="@exampleOfWorkId" sameEntity="true">
<data source="303-1.r" name="r"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@exampleOfWorkId">
<choose name="a" flushWith="@exampleOfWorkId">
<data source="@exampleOfWork303titleWithSubtitleAndOccupation"/>
<data source="303-1.t"/>
</choose>
</combine>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#Work"
flushWith="@exampleOfWorkId">
<data source="@exampleOfWorkId"/>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="@exampleOfWorkId">
<data source="@id" name="id"/>
</combine>
<!-- add examples of work if no id exists -->
<combine name="http://purl.org/lobid/lv#exampleOfWork" value="${a}"
flushWith="@exampleOfWorkBnode303">
<data source="@exampleOfWorkBnode303" name="a"/>
</combine>
<combine name="~rdf:subject" value="${a}" flushWith="@exampleOfWorkBnode303">
<data source="@exampleOfWorkBnode303" name="a"/>
</combine>
<combine name="@exampleOfWorkCreator" value="${p} ${d}" flushWith="@exampleOfWorkBnode303">
<data source="@exampleOfWorkBnode303"/>
<data source="303-1.p" name="p"/>
<data source="303-1.d" name="d"/>
</combine>
<combine name="http://rdaregistry.info/Elements/w/P10065" value="${a}"
flushWith="@exampleOfWorkBnode303">
<choose name="a" flushWith="@exampleOfWorkBnode303">
<data source="@exampleOfWorkCreator">
<replace pattern=" $" with=""/>
</data>
<data source="@exampleOfWorkCreator"/>
</choose>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}">
<data source="@exampleOfWorkBnode303"/>
<data source="303-1.t" name="a"/>
</combine>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#Work">
<data source="@exampleOfWorkBnode303"/>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!">
<data source="@exampleOfWorkBnode303"/>
<data source="@id" name="id"/>
</combine>
<!-- building a bnode from 304-1.a didn't work -->
<combine name="http://purl.org/lobid/lv#exampleOfWork" value="_:exampleOfWorkBnode304"
flushWith="304[-ab]1.a">
<data source="304[-ab]1.a"/>
</combine>
<combine name="~rdf:subject" value="_:exampleOfWorkBnode304" flushWith="304[-ab]1.a">
<data source="304[-ab]1.a"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="304[-ab]1.[ab]">
<data source="304[-ab]1.a" name="a"/>
</combine>
<combine name="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" value="http://d-nb.info/standards/elementset/gnd#Work"
flushWith="304[-ab]1.a">
<data source="304[-ab]1.a"/>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="304[-ab]1.a">
<data source="@id" name="id"/>
</combine>
<!-- ####################### -->
<!-- ########## copyright information -->
<!-- ####################### -->
<combine name="http://schema.org/license" value="${a}">
<data source="444a1.u" name="a"/>
</combine>
<combine name="~rdf:subject" value="${a}" flushWith="444a1.u" sameEntity="true">
<data source="444a1.u" name="a"/>
</combine>
<combine name="http://id.loc.gov/ontologies/bibframe/note" value="${a}"
sameEntity="true" flushWith="444a1.u">
<data source="444a1.n" name="a"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}">
<data source="444a1.u" name="a">
<regexp match=".*" format="Lizenz"/>
</data>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${id}#!" flushWith="444a1.u">
<data source="@id" name="id"/>
</combine>
<!-- ####################### -->
<!-- ########## other editions of same resource -->
<!-- ####################### -->
<combine name="@relatedResourceId" value="${a}" sameEntity="true">
<data source="527[-xyz]1.9|775-1.9|776-1.9" name="a">
<regexp match="([a-zA-Z]{2}\d{9})" format="http://lobid.org/resources/${1}#!"/>
</data>
</combine>
<combine name="http://purl.org/dc/terms/relation" value="${a}">
<data source="@relatedResourceId" name="a"/>
</combine>
<combine name="~rdf:subject" value="${a}">
<data source="@relatedResourceId" name="a"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@relatedResourceId">
<data source="527[-xyz]1.a|775-1.t|776-1.t" name="a">
<replace pattern="&lt;|&gt;" with=""/>
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${subject}#!" flushWith="@relatedResourceId">
<data source="@id" name="subject"/>
</combine>
<!-- ####################### -->
<!-- ########## predecessor and successor -->
<!-- ####################### -->
<data source="531[-xyz]1.a|780-1.t" name="@predecessorLabel">
<replace pattern=".*---&gt; :? ?" with=""/>
<replace pattern="&gt;|&lt;" with=""/>
</data>
<combine name="@predecessorHbzId" value="${a}">
<data source="531[-xyz]1.9|780-1.9" name="a">
<regexp match="([BCHT]T.*)" format="$[ns-lobid-resource]${1}#!"/>
</data>
</combine>
<combine name="@predecessorHbzId" value="_:${a}">
<if>
<none>
<data source="531[-xyz]1.9|780-1.9">
<regexp match="([BCHT]T.*)"/>
</data>
</none>
</if>
<data source="@predecessorLabel" name="a"/>
</combine>
<data source="@predecessorHbzId" name="http://rdaregistry.info/Elements/u/P60261"/>
<combine name="~rdf:subject" value="${a}" flushWith="@predecessorHbzId">
<data source="@predecessorHbzId" name="a"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@predecessorHbzId">
<data source="@predecessorLabel" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${subject}#!" flushWith="@predecessorHbzId">
<data source="@id" name="subject"/>
</combine>
<!-- successors -->
<data source="533[-xyz]1.a|785-1.t" name="@successorLabel">
<replace pattern=".*---&gt; :? ?" with=""/>
<replace pattern="&gt;|&lt;" with=""/>
</data>
<combine name="@successorHbzId" value="${a}">
<data source="533[-xyz]1.9|785-1.9" name="a">
<regexp match="([BCHT]T.*)" format="$[ns-lobid-resource]${1}#!"/>
</data>
</combine>
<combine name="@successorHbzId" value="_:${a}">
<if>
<none>
<data source="533[-xyz]1.9|785-1.9">
<regexp match="([BCHT]T.*)"/>
</data>
</none>
</if>
<data source="@successorLabel" name="a"/>
</combine>
<data source="@successorHbzId" name="http://rdaregistry.info/Elements/u/P60278"/>
<combine name="~rdf:subject" value="${a}" flushWith="@successorHbzId">
<data source="@successorHbzId" name="a"/>
</combine>
<combine name="http://www.w3.org/2000/01/rdf-schema#label" value="${a}"
flushWith="@successorHbzId">
<data source="@successorLabel" name="a">
<replace pattern="^http" with="Siehe: http"/>
</data>
</combine>
<combine name="~rdf:subject" value="$[ns-lobid-resource]${subject}#!" flushWith="@successorHbzId">
<data source="@id" name="subject"/>
</combine>
<!-- ####################### -->
<!-- ########## geo coordinates -->
<!-- ####################### -->
<data source="407-[123].a" name="http://rdaregistry.info/Elements/u/P60345">
<regexp match="\((.*)\)" format="${1}"/>
</data>
<!-- ####################### -->
<!-- ########## publisher -->
<!-- ####################### -->
<!-- primary publication -->
<data source="41[05][-abcu][-12].a|419-[12].a|594[-abc][-12].a" name="@placeOfPublication_"/>
<choose name="@placeOfPublication" flushWith="@placeOfPublication_">
<data source="@placeOfPublication_">
<regexp match="^\[.*\]"/>
<replace pattern="^\[" with=""/>
<replace pattern="\]$" with=""/>
<replace pattern="[sS]\.l\." with=""/>
</data>
<data source="@placeOfPublication_">
<regexp match="^[sS]\.[lL]\.$" format=""/>
</data>
<data source="@placeOfPublication_"/>
</choose>
<data source="41[27][-abcu][-12].[ag]|419-[12].b" name="@publisher">
<replace pattern="&gt;" with=""/>
<replace pattern="&lt;" with=""/>
<replace pattern="^\[[sS]\.n\.\]$" with=""/>
</data>
<combine name="@startDateFirstPublication" value="${a}">
<choose name="a">
<data source="425[ab-p][-1].a|419-1c|595-[-12].a">
<regexp match="^1\d{3}|^20\d{2}"/>
</data>
<data source="425[-abp][-1].a">
<regexp match=".*\[([12]\d{3})\].*" format="${1}"/>
</data>
<data source="425[-abp][-1].a">
<regexp
match=".*[([Jan|Febr]uar)|März|April|([Ma|Jun|Jul]i)|August|([Septem|Okto]ber)|([Nov|Dez]ember)] ([12]\d{3})$"
format="${1}"/>
</data>
<data source="425[-abp][-1].a">
<regexp match=".*[01][0-9]\.([12]\d{3})$" format="${1}"/>
</data>
<!-- Multiple resource have [determined] volume numbers in this field. -->
<data source="089-[-1].a">
<regexp match="(.*)\. (1\d{3})|(.*)\. (20\d{2})" format="${2}"/>