Skip to content

Commit 1e8f75b

Browse files
authored
Merge pull request #37 from lcnetdev/v2.10-dev
V2.10 dev
2 parents fcd3a14 + a15ef02 commit 1e8f75b

147 files changed

Lines changed: 15217 additions & 8237 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NEWS

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
--- 2.10 2025/07/23
2+
3+
Changes for updated v2.10.0 specifications:
4+
5+
Instance-bf2marc
6+
Added creation of 008/06=r based on bf:originDate
7+
Changed creation of 017 $b, 028 $b, 032 $b, 036 $b from bf:Agent to bf:Organization
8+
Moved creation of 300 $b from stand-alone note to a note within the extent resource
9+
Added creation of 510 Ind=3/4 fields from a note resource instead of a relationship resource
10+
Work-bf2marc
11+
Added creation of 046 $2
12+
Added creation of 547 field from a title resource
13+
Added creation of 580 field from a relationship resource
14+
Added creation of 5XX-880 paired fields
15+
008-bf2marc
16+
Added creation of 008/06=r
17+
Process 0-4
18+
Added more precise language-script combinations for the creation of 006 $c field
19+
Added new notetypes to Process 3
20+
21+
122
--- 2.9 2025/03/07
223

324
Changes for updated v2.9.0 specifications:

release-notes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# bibframe2marc release notes
22

3+
## v2.10.0
4+
5+
Conversion updates based on specifications v2.10. See the Library of Congress’s [BIBFRAME site](https://www.loc.gov/bibframe/) for more details. Specifications are included in the distribution in the [spec](spec/) directory. Changes of note:
6+
7+
* Added creation of MARC 008/06=r for reprint resources
8+
* Changed creation of MARC 300 $b
9+
* Generated more MARC 5XX-880 paired fields
10+
* Changed creation of MARC 510 (first indicator=3 or 4)
11+
12+
See the [NEWS](NEWS) file for full details of changes. Changes from v2.9.0 in the specifications are marked in red.
13+
314
## v2.9.0
415

516
Conversion updates based on specifications v2.9. See the Library of Congress’s [BIBFRAME site](https://www.loc.gov/bibframe/) for more details. Specifications are included in the distribution in the [spec](spec/) directory. Changes of note:

rules/01-001-008.xml

Lines changed: 117 additions & 38 deletions
Large diffs are not rendered by default.

rules/02-010-048.xml

Lines changed: 89 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
</df>
106106

107107
<df tag="016">
108-
<context xpath="bf:Instance/bf:identifiedBy/bf:Local[bf:source/bf:Source]|bf:Instance/bf:adminMetadata/bf:AdminMetadata/bf:identifiedBy/bf:Local[bf:source//@rdf:*[.='http://id.loc.gov/authorities/names/no2004037399']]">
108+
<context xpath="bf:Instance/bf:identifiedBy/bf:Local[bf:source]|bf:Instance/bf:adminMetadata/bf:AdminMetadata/bf:identifiedBy/bf:Local[bf:source//@rdf:*[.='http://id.loc.gov/authorities/names/no2004037399']]">
109109
<var name="vSourceUri">
110110
<switch>
111111
<case test="bf:source/@rdf:resource"><transform><xsl:value-of select="bf:source/@rdf:resource"/></transform></case>
@@ -146,9 +146,12 @@
146146
<switch>
147147
<case test="contains($vSourceUri,'id.loc.gov')">
148148
<transform>
149-
<xsl:call-template name="tUriCode">
150-
<xsl:with-param name="pUri" select="$vSourceUri"/>
151-
</xsl:call-template>
149+
<xsl:variable name="vC">
150+
<xsl:call-template name="tUriCode">
151+
<xsl:with-param name="pUri" select="$vSourceUri"/>
152+
</xsl:call-template>
153+
</xsl:variable>
154+
<xsl:value-of select="translate($vC, $lower, $upper)" />
152155
</transform>
153156
</case>
154157
<case test="default"><transform><xsl:value-of select="$vSourceUri"/></transform></case>
@@ -175,7 +178,7 @@
175178
<sf code="a"><select xpath="rdf:value"/></sf>
176179
</case>
177180
</switch>
178-
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:Agent/rdfs:label"/></sf>
181+
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:*/rdfs:label"/></sf>
179182
<sf code="d" chopPunct="true" repeatable="false"><select xpath="bf:date"/></sf>
180183
<sf code="i" chopPunct="true" repeatable="false"><select xpath="bf:note/bf:Note/rdfs:label"/></sf>
181184
</context>
@@ -404,7 +407,7 @@
404407
</ind1>
405408
<ind2 default="2"/>
406409
<sf code="a" repeatable="false"><select xpath="rdf:value"/></sf>
407-
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:Agent/rdfs:label"/></sf>
410+
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:*/rdfs:label"/></sf>
408411
<sf code="q" chopPunct="true"><select xpath="bf:qualifier"/></sf>
409412
</context>
410413
</df>
@@ -433,7 +436,7 @@
433436
<ind1 default=" "/>
434437
<ind2 default=" "/>
435438
<sf code="a" repeatable="false"><select xpath="rdf:value"/></sf>
436-
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:Agent/rdfs:label"/></sf>
439+
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:*/rdfs:label"/></sf>
437440
</context>
438441
</df>
439442

@@ -730,7 +733,7 @@
730733
<ind1 default=" "/>
731734
<ind2 default=" "/>
732735
<sf code="a" repeatable="false"><select xpath="rdf:value"/></sf>
733-
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:Agent/rdfs:label"/></sf>
736+
<sf code="b" chopPunct="true" repeatable="false"><select xpath="bf:assigner/bf:*/rdfs:label"/></sf>
734737
</context>
735738
</df>
736739

@@ -1416,20 +1419,27 @@
14161419
</df>
14171420
</case>
14181421
</switch>
1419-
<switch>
1420-
<case test="bf:Work/bf:language//@rdf:*[(local-name='resource' or local-name='about') and not(contains(., 'id.loc.gov/vocabulary/languages'))] or bf:Work/bf:language/*/bf:source">
1422+
1423+
<switch>
1424+
<case test="
1425+
bf:Work/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')] or
1426+
bf:Work/bf:language/*/bf:source or
1427+
bf:Work/bf:accompaniedBy/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')] or
1428+
bf:Work/bf:note/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')]
1429+
">
14211430
<df tag="041">
14221431
<ind1 default="0">
14231432
<switch>
14241433
<case test="bf:Work/bf:note/bf:Note[rdfs:label='Includes translation or is translation']">1</case>
14251434
<case test="bf:Work/bf:note/bf:Note[rdfs:label='Includes translation']">1</case>
14261435
</switch>
14271436
</ind1>
1428-
<ind2 default=" "/>
1437+
<ind2 default="7"/>
14291438
<!-- making dubious assertion that first language property is primary -->
14301439
<transform>
1431-
<xsl:variable name="vLangElements" select="bf:Work/bf:language/@rdf:resource[not(contains(., 'id.loc.gov/vocabulary/languages'))] |
1432-
bf:Work/bf:language/bf:Language[bf:source and not(bf:part)]//@rdf:about[not(contains(., 'id.loc.gov/vocabulary/languages'))] |
1440+
<xsl:variable name="vLangElements" select="
1441+
bf:Work/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')] |
1442+
bf:Work/bf:language/bf:Language[bf:source and not(bf:part)]//@rdf:about[not(contains(., 'id.loc.gov/vocabulary/'))] |
14331443
bf:Work/bf:language/bf:Language[bf:source] |
14341444
bf:Work/bf:language/bf:Language[bf:source and bf:part]"/>
14351445
<xsl:variable name="vFirstLangCode">
@@ -1440,6 +1450,9 @@
14401450
<xsl:when test="starts-with($vLangElements[1],'http://id.loc.gov/vocabulary/iso639-2/')">
14411451
<xsl:value-of select="substring-after($vLangElements[1],'http://id.loc.gov/vocabulary/iso639-2/')"/>
14421452
</xsl:when>
1453+
<xsl:when test="starts-with($vLangElements[1],'http://id.loc.gov/vocabulary/iso639-3/')">
1454+
<xsl:value-of select="substring-after($vLangElements[1],'http://id.loc.gov/vocabulary/iso639-3/')"/>
1455+
</xsl:when>
14431456
<xsl:when test="starts-with($vLangElements[1],'http://id.loc.gov/vocabulary/iso639-5/')">
14441457
<xsl:value-of select="substring-after($vLangElements[1],'http://id.loc.gov/vocabulary/iso639-5/')"/>
14451458
</xsl:when>
@@ -1460,10 +1473,10 @@
14601473
</xsl:variable>
14611474

14621475
<xsl:for-each select="$vLangElements|
1463-
bf:Work/bf:accompaniedBy/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[not(contains(., 'id.loc.gov/vocabulary/languages'))][1] |
1464-
bf:Work/bf:note/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[not(contains(., 'id.loc.gov/vocabulary/languages'))][1]">
1476+
bf:Work/bf:accompaniedBy/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')][1] |
1477+
bf:Work/bf:note/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')][1]">
14651478
<xsl:choose>
1466-
<xsl:when test="position() = 1">
1479+
<xsl:when test="position() = 1 and $vFirstLangCode!=''">
14671480
<marc:subfield code="a"><xsl:value-of select="$vFirstLangCode"/></marc:subfield>
14681481
</xsl:when>
14691482
<xsl:otherwise>
@@ -1475,6 +1488,9 @@
14751488
<xsl:when test="starts-with(.,'http://id.loc.gov/vocabulary/iso639-2/')">
14761489
<xsl:value-of select="substring-after(.,'http://id.loc.gov/vocabulary/iso639-2/')"/>
14771490
</xsl:when>
1491+
<xsl:when test="starts-with(.,'http://id.loc.gov/vocabulary/iso639-3/')">
1492+
<xsl:value-of select="substring-after(.,'http://id.loc.gov/vocabulary/iso639-3/')"/>
1493+
</xsl:when>
14781494
<xsl:when test="starts-with(.,'http://id.loc.gov/vocabulary/iso639-5/')">
14791495
<xsl:value-of select="substring-after(.,'http://id.loc.gov/vocabulary/iso639-5/')"/>
14801496
</xsl:when>
@@ -1538,34 +1554,34 @@
15381554
</xsl:for-each>
15391555
</transform>
15401556

1541-
<var name="vSourceLang" xpath="bf:Work/bf:language/@rdf:resource[not(contains(., 'id.loc.gov/vocabulary/languages'))]|
1542-
bf:Work/bf:language/bf:Language[bf:source//@rdf:*[not(contains(., 'id.loc.gov/vocabulary/languages'))]]|
1557+
<var name="vSourceLang" xpath="bf:Work/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')]|
1558+
bf:Work/bf:accompaniedBy/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')] |
1559+
bf:Work/bf:note/bf:*[contains(rdf:type/@rdf:resource, 'id.loc.gov/vocabulary/resourceComponents')]/bf:language//@rdf:*[contains(., 'id.loc.gov/vocabulary/iso639-')] |
1560+
bf:Work/bf:language/bf:Language[bf:source//@rdf:*[not(contains(., 'id.loc.gov/vocabulary/'))]]|
15431561
bf:Work/bf:language/bf:Language[bf:source]" />
15441562
<var name="vSourceUri">
15451563
<switch>
1564+
<case test="contains($vSourceLang[1], 'id.loc.gov/vocabulary/iso639-')"><transform><xsl:value-of select="$vSourceLang[1]"/></transform></case>
15461565
<case test="$vSourceLang[1]/bf:source/@rdf:resource"><transform><xsl:value-of select="$vSourceLang[1]/bf:source/@rdf:resource"/></transform></case>
15471566
<case test="$vSourceLang[1]/bf:source/bf:Source/@rdf:about"><transform><xsl:value-of select="$vSourceLang[1]/bf:source/bf:Source/@rdf:about"/></transform></case>
15481567
</switch>
15491568
</var>
15501569
<transform>
15511570
<marc:subfield code="2">
15521571
<xsl:choose>
1572+
<xsl:when test="$vSourceUri != ''">
1573+
<xsl:choose>
1574+
<xsl:when test="contains($vSourceUri,'id.loc.gov/vocabulary/iso639-1')">iso639-1</xsl:when>
1575+
<xsl:when test="contains($vSourceUri,'id.loc.gov/vocabulary/iso639-2')">iso639-2</xsl:when>
1576+
<xsl:when test="contains($vSourceUri,'id.loc.gov/vocabulary/iso639-3')">iso639-3</xsl:when>
1577+
</xsl:choose>
1578+
</xsl:when>
15531579
<xsl:when test="$vSourceLang[1]/bf:source/bf:Source/*[local-name()='code']">
15541580
<xsl:value-of select="$vSourceLang[1]/bf:source/bf:Source/*[local-name()='code']"/>
15551581
</xsl:when>
15561582
<xsl:when test="$vSourceLang[1]/bf:source/madsrdf:Authority/*[local-name()='code']">
15571583
<xsl:value-of select="$vSourceLang[1]/bf:source/madsrdf:Authority/*[local-name()='code']"/>
15581584
</xsl:when>
1559-
<xsl:when test="$vSourceUri != ''">
1560-
<xsl:choose>
1561-
<xsl:when test="contains($vSourceUri,'id.loc.gov')">
1562-
<xsl:call-template name="tUriCode">
1563-
<xsl:with-param name="pUri" select="$vSourceUri"/>
1564-
</xsl:call-template>
1565-
</xsl:when>
1566-
<xsl:otherwise><xsl:value-of select="$vSourceUri"/></xsl:otherwise>
1567-
</xsl:choose>
1568-
</xsl:when>
15691585
<xsl:otherwise>
15701586
<xsl:call-template name="tChopPunct">
15711587
<xsl:with-param name="pString" select="$vSourceLang[1]/bf:source/bf:Source/rdfs:label"/>
@@ -2029,10 +2045,20 @@
20292045
</case>
20302046
</switch>
20312047

2032-
<df tag="046">
2033-
<context xpath="bf:Work/bf:originDate[@rdf:datatype='http://id.loc.gov/datatypes/edtf']">
2034-
<ind1 default=" "/>
2035-
<ind2 default=" "/>
2048+
<select xpath="bf:Work/bf:originDate[@rdf:datatype='http://id.loc.gov/datatypes/edtf']">
2049+
<var name="vCF008PreNS">
2050+
<transform>
2051+
<xsl:apply-templates select="ancestor::rdf:RDF" mode="generate-008">
2052+
<xsl:with-param name="vAdminMetadata" select="$vAdminMetadata"/>
2053+
</xsl:apply-templates>
2054+
</transform>
2055+
</var>
2056+
<var name="vCF008" xpath="exsl:node-set($vCF008PreNS)" />
2057+
<var name="vDateType">
2058+
<transform>
2059+
<xsl:value-of select="substring($vCF008, 7, 1)" />
2060+
</transform>
2061+
</var>
20362062
<var name="v046DateTime1">
20372063
<transform>
20382064
<xsl:call-template name="EDTF-Date1">
@@ -2061,32 +2087,40 @@
20612087
</xsl:call-template>
20622088
</transform>
20632089
</var>
2064-
<sf code="k">
2065-
<transform>
2066-
<xsl:value-of select="concat(translate($v046Date1,'-',''),translate($v046Time1,':',''))"/>
2067-
</transform>
2068-
</sf>
20692090
<switch>
2070-
<case test="$v046DateTime2">
2071-
<sf code="l">
2072-
<transform>
2073-
<xsl:variable name="v046Date2">
2074-
<xsl:call-template name="EDTF-DatePart">
2075-
<xsl:with-param name="pEDTFDate" select="$v046DateTime2"/>
2076-
</xsl:call-template>
2077-
</xsl:variable>
2078-
<xsl:variable name="v046Time2">
2079-
<xsl:call-template name="EDTF-TimePart">
2080-
<xsl:with-param name="pEDTFDate" select="$v046DateTime2"/>
2081-
</xsl:call-template>
2082-
</xsl:variable>
2083-
<xsl:value-of select="concat(translate($v046Date2,'-',''),translate($v046Time2,':',''))"/>
2084-
</transform>
2085-
</sf>
2091+
<case test="$vDateType != 'r'">
2092+
<df tag="046">
2093+
<ind1 default=" "/>
2094+
<ind2 default=" "/>
2095+
<sf code="k">
2096+
<transform>
2097+
<xsl:value-of select="concat(translate($v046Date1,'-',''),translate($v046Time1,':',''))"/>
2098+
</transform>
2099+
</sf>
2100+
<switch>
2101+
<case test="$v046DateTime2">
2102+
<sf code="l">
2103+
<transform>
2104+
<xsl:variable name="v046Date2">
2105+
<xsl:call-template name="EDTF-DatePart">
2106+
<xsl:with-param name="pEDTFDate" select="$v046DateTime2"/>
2107+
</xsl:call-template>
2108+
</xsl:variable>
2109+
<xsl:variable name="v046Time2">
2110+
<xsl:call-template name="EDTF-TimePart">
2111+
<xsl:with-param name="pEDTFDate" select="$v046DateTime2"/>
2112+
</xsl:call-template>
2113+
</xsl:variable>
2114+
<xsl:value-of select="concat(translate($v046Date2,'-',''),translate($v046Time2,':',''))"/>
2115+
</transform>
2116+
</sf>
2117+
</case>
2118+
</switch>
2119+
<sf code="2"><transform><xsl:value-of select="'edtf'" /></transform></sf>
2120+
</df>
20862121
</case>
20872122
</switch>
2088-
</context>
2089-
</df>
2123+
</select>
20902124

20912125
<switch>
20922126
<case test="bf:Work/bf:instrument/bf:MusicInstrument or

rules/03-050-088.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
</df>
219219

220220
<switch>
221-
<case test="/descendant::node()[bf:Title|bf:ProvisionActivity|bf:editionStatement|bf:Series]//@xml:lang[contains(., '-') and not(contains(., 'atn'))]">
221+
<case test="/descendant::node()[bf:Title|bf:ProvisionActivity|bf:editionStatement|bf:Series]//@xml:lang[contains(., '-') and not(contains(., 'atn')) and not(contains(., 'hai'))]">
222222
<df tag="066">
223223
<ind1 default=" "/>
224224
<ind2 default=" "/>
@@ -231,9 +231,14 @@
231231
<!-- Those defined in the map. -->
232232
<xsl:for-each select="$df880scriptNS/script/lang">
233233
<xsl:variable name="vLang" select="." />
234-
<xsl:if test="$vLangs[translate(substring-after(.,'-'),$upper,$lower) = $vLang ]">
235-
<marc:scriptCode><xsl:value-of select="../code" /></marc:scriptCode>
236-
</xsl:if>
234+
<xsl:choose>
235+
<xsl:when test="$vLangs[translate(.,$upper,$lower) = $vLang ]">
236+
<marc:scriptCode><xsl:value-of select="../code" /></marc:scriptCode>
237+
</xsl:when>
238+
<xsl:when test="$vLangs[translate(substring-after(.,'-'),$upper,$lower) = $vLang ]">
239+
<marc:scriptCode><xsl:value-of select="../code" /></marc:scriptCode>
240+
</xsl:when>
241+
</xsl:choose>
237242
</xsl:for-each>
238243

239244
<!-- For those not defined in the map. -->

0 commit comments

Comments
 (0)