Skip to content

Commit 36a96c8

Browse files
authored
Merge pull request #40 from lcnetdev/v3.1-dev
merge v3.1-dev
2 parents 83a8a40 + 7db5404 commit 36a96c8

138 files changed

Lines changed: 13723 additions & 12811 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
--- 3.1.0 2026/04/16
2+
3+
Changes for updated v3.1.0 specifications:
4+
5+
008-bf2marc
6+
Updated mapping of 008/33 (literary form) values
7+
Instance-bf2marc
8+
Updated creation of MARC 242 field
9+
Work-bf2marc
10+
Editorial cleanup to remove creation of 048 fields from bf:voice and bf:instrument resources
11+
Process0-4
12+
Removed instructions to create 066 fields
13+
114
--- 3.0.0 2025/12/02
215

316
Changes for updated v3.0.0 specifications:

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ The converion stylesheet can take the following parameters:
5757

5858
* `pCatScript` -- string for the default cataloging script found in `xml:lang` attributes. Defaults to `Latn`.
5959

60+
* `bcp47inferrence` - Default is true. If true, BCP47 codes will not include
61+
the script component when it can be inferred from the language component.
62+
If false, the script component (the "-cyrl" of ru-cyrl) will be included in
63+
the code. At all times codes will be lowercased.
64+
6065
* `pGenerationTimestamp` -- a timestamp for the conversion. If it is not provided, and if the `date:date-time()` function is available, it will be created from the value of `date:date-time()`.
6166

6267
* `pSourceRecordId` -- parameter to set the source record ID, for use in conversion rules. Used in generating the [884](rules/10-8XX.xml).

release-notes.md

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

3+
## v3.1.0
4+
5+
Conversion updates based on specifications v3.1.0. 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+
* Processing updates for the creation of language and script coding which follows the BCP47 standard and will appear in $7 (mostly), $e, $l, $y.
8+
* MARC 066 fields will no longer be created as the BCP47 data provides greater detail.
9+
10+
11+
See the [NEWS](NEWS) file for full details of changes. Changes from v3.0.0 in the specifications are marked in red.
12+
313
## v3.0.0
414

515
Conversion updates based on specifications v3.0.0. 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/03-050-088.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
</context>
218218
</df>
219219

220-
<switch>
220+
<!--<switch>
221221
<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=" "/>
@@ -226,9 +226,8 @@
226226
<xsl:variable name="scriptCodesPreNS">
227227
<xsl:variable name="df880scriptNS" select="exsl:node-set($df880script)" />
228228
<xsl:variable name="vLangs" select="//@xml:lang[contains(., '-') and not(contains(., 'atn'))]" />
229-
<!-- <xsl:for-each select="$df880scriptNS/*[lang]/lang"> -->
230229
<marc:codes>
231-
<!-- Those defined in the map. -->
230+
<!-\- Those defined in the map. -\->
232231
<xsl:for-each select="$df880scriptNS/script/lang">
233232
<xsl:variable name="vLang" select="." />
234233
<xsl:choose>
@@ -241,7 +240,7 @@
241240
</xsl:choose>
242241
</xsl:for-each>
243242
244-
<!-- For those not defined in the map. -->
243+
<!-\- For those not defined in the map. -\->
245244
<xsl:for-each select="$vLangs">
246245
<xsl:variable name="vLang" select="translate(substring-after(.,'-'),$upper,$lower)" />
247246
<xsl:if test="count($df880scriptNS/script/lang[. = $vLang]) = 0">
@@ -264,7 +263,7 @@
264263
</transform>
265264
</df>
266265
</case>
267-
</switch>
266+
</switch>-->
268267

269268
<df tag="070">
270269
<context xpath="bf:Work/bf:classification/bf:ClassificationNal|bf:Work/bf:classification/bf:Classification[bf:assigner/@rdf:resource='http://id.loc.gov/vocabulary/organizations/dnal' or

rules/04-1XX.xml

Lines changed: 68 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,21 @@
4545
</switch>
4646
</var>
4747

48-
<var name="vLangTagLabel" xpath="self::node()/bflc:marcKey[
49-
contains(translate(@xml:lang,$upper,$lower),translate($pCatScript,$upper,$lower)) or
50-
string-length(@xml:lang)='2' or
51-
string-length(@xml:lang)='3'
52-
][1]/@xml:lang" />
53-
<var name="vLangTagScript" xpath="self::node()/bflc:marcKey[@xml:lang and contains(@xml:lang, '-') and not(contains(translate(@xml:lang,$upper,$lower),translate($pCatScript,$upper,$lower)))][1]/@xml:lang" />
48+
<var name="vLangTagLabel">
49+
<transform>
50+
<xsl:call-template name="tGetBCP47RegField">
51+
<xsl:with-param name="x" select="self::node()/bflc:marcKey" />
52+
</xsl:call-template>
53+
</transform>
54+
</var>
55+
<var name="vLangTagScript">
56+
<transform>
57+
<xsl:call-template name="tGetBCP47for880">
58+
<xsl:with-param name="x" select="self::node()/bflc:marcKey" />
59+
<xsl:with-param name="bcp47forRegField" select="$vLangTagLabel" />
60+
</xsl:call-template>
61+
</transform>
62+
</var>
5463
<var name="v880Script">
5564
<switch>
5665
<case test="$vLangTagScript!=''">
@@ -274,11 +283,16 @@
274283
</marc:subfield>
275284
</xsl:for-each>
276285
<xsl:copy-of select="$vShared" />
277-
<!--<xsl:if test="$vLangTagLabel!=''">
286+
<xsl:if test="$vLangTagLabel!=''">
278287
<marc:subfield code="7">
279-
<xsl:value-of select="concat('(bcp47)', $vLangTagLabel)"/>
288+
<xsl:variable name="bcp47code">
289+
<xsl:call-template name="tOutputBCP47">
290+
<xsl:with-param name="bcp47orig" select="$vLangTagLabel" />
291+
</xsl:call-template>
292+
</xsl:variable>
293+
<xsl:value-of select="concat('(bcp47)', $bcp47code)" />
280294
</marc:subfield>
281-
</xsl:if>-->
295+
</xsl:if>
282296
</transform>
283297
</df>
284298

@@ -310,7 +324,16 @@
310324
</xsl:for-each>
311325
<xsl:copy-of select="$vShared" />
312326
</transform>
313-
<!--<sf code="7"><transform><xsl:value-of select="concat('(bcp47)', $vLangTagScript)" /></transform></sf>-->
327+
<sf code="7">
328+
<transform>
329+
<xsl:variable name="bcp47code">
330+
<xsl:call-template name="tOutputBCP47">
331+
<xsl:with-param name="bcp47orig" select="$vLangTagScript" />
332+
</xsl:call-template>
333+
</xsl:variable>
334+
<xsl:value-of select="concat('(bcp47)', $bcp47code)" />
335+
</transform>
336+
</sf>
314337
</df>
315338
</case>
316339
</switch>
@@ -628,12 +651,21 @@
628651
</var>
629652
<var name="vTitleResource" xpath="exsl:node-set($vTitleResourcePreNS)" />
630653

631-
<var name="vLangTagLabel" xpath="self::node()/bflc:marcKey[
632-
contains(translate(@xml:lang,$upper,$lower),translate($pCatScript,$upper,$lower)) or
633-
string-length(@xml:lang)='2' or
634-
string-length(@xml:lang)='3'
635-
][1]/@xml:lang" />
636-
<var name="vLangTagScript" xpath="self::node()/bflc:marcKey[@xml:lang and not(contains(translate(@xml:lang,$upper,$lower),translate($pCatScript,$upper,$lower)))][1]/@xml:lang" />
654+
<var name="vLangTagLabel">
655+
<transform>
656+
<xsl:call-template name="tGetBCP47RegField">
657+
<xsl:with-param name="x" select="self::node()/bflc:marcKey" />
658+
</xsl:call-template>
659+
</transform>
660+
</var>
661+
<var name="vLangTagScript">
662+
<transform>
663+
<xsl:call-template name="tGetBCP47for880">
664+
<xsl:with-param name="x" select="self::node()/bflc:marcKey" />
665+
<xsl:with-param name="bcp47forRegField" select="$vLangTagLabel" />
666+
</xsl:call-template>
667+
</transform>
668+
</var>
637669

638670
<var name="v880Script">
639671
<switch>
@@ -742,13 +774,16 @@
742774
</select>
743775
</sf>
744776
<sf code="2"><select xpath="bf:source/bf:Source/bf:code"/></sf>
745-
<!--<sf code="7" chopPunct="true" repeatable="false">
746-
<switch>
747-
<case test="$vLangTagLabel!=''">
748-
<transform><xsl:value-of select="concat('(bcp47)', $vLangTagLabel)"/></transform>
749-
</case>
750-
</switch>
751-
</sf>-->
777+
<xsl:if test="$vLangTagLabel!=''">
778+
<marc:subfield code="7">
779+
<xsl:variable name="bcp47code">
780+
<xsl:call-template name="tOutputBCP47">
781+
<xsl:with-param name="bcp47orig" select="$vLangTagLabel" />
782+
</xsl:call-template>
783+
</xsl:variable>
784+
<xsl:value-of select="concat('(bcp47)', $bcp47code)" />
785+
</marc:subfield>
786+
</xsl:if>
752787
</df>
753788

754789
<switch>
@@ -794,7 +829,16 @@
794829
</select>
795830
</sf>
796831
<sf code="2"><select xpath="bf:source/bf:Source/bf:code"/></sf>
797-
<!--<sf code="7"><transform><xsl:value-of select="concat('(bcp47)', $vLangTagScript)" /></transform></sf>-->
832+
<sf code="7">
833+
<transform>
834+
<xsl:variable name="bcp47code">
835+
<xsl:call-template name="tOutputBCP47">
836+
<xsl:with-param name="bcp47orig" select="$vLangTagScript" />
837+
</xsl:call-template>
838+
</xsl:variable>
839+
<xsl:value-of select="concat('(bcp47)', $bcp47code)" />
840+
</transform>
841+
</sf>
798842
</df>
799843
</case>
800844
</switch>

0 commit comments

Comments
 (0)