bibframe_ruby 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +24 -2
- data/docs/superpowers/plans/2026-09-09-marc-conversion.md +537 -0
- data/docs/superpowers/specs/2026-09-09-marc-conversion-design.md +110 -0
- data/lib/bibframe_ruby/marc_converter.rb +67 -0
- data/lib/bibframe_ruby/parser.rb +4 -2
- data/lib/bibframe_ruby/version.rb +1 -1
- data/lib/bibframe_ruby.rb +7 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-001-007.xsl +2276 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-006,008.xsl +1295 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-010-048.xsl +1712 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-050-088.xsl +713 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-1XX,7XX,8XX-names.xsl +1141 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-200-247not240-Titles.xsl +771 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-240andX30-UnifTitle.xsl +535 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-250-270.xsl +283 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-3XX.xsl +2245 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-460-468-SeriesTreat.xsl +135 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-490-510-Links.xsl +145 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-5XX.xsl +1448 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-600-662.xsl +1417 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-720+740to755.xsl +333 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-758.xsl +102 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-760-788-Links.xsl +771 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-841-887.xsl +328 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-880.xsl +119 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-ControlSubfields.xsl +495 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-LDR.xsl +183 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-Preprocess0-Splitting.xsl +765 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-Process6-Series.xsl +627 -0
- data/vendor/marc2bibframe2/xsl/ConvSpec-Process8-ProvAct.xsl +1021 -0
- data/vendor/marc2bibframe2/xsl/conf/abbreviations.xml +13 -0
- data/vendor/marc2bibframe2/xsl/conf/code-to-script.xml +399 -0
- data/vendor/marc2bibframe2/xsl/conf/codeMaps.xml +723 -0
- data/vendor/marc2bibframe2/xsl/conf/exclusions.xml +4 -0
- data/vendor/marc2bibframe2/xsl/conf/iso6392-to-1.xml +615 -0
- data/vendor/marc2bibframe2/xsl/conf/languageCrosswalk.xml +1503 -0
- data/vendor/marc2bibframe2/xsl/conf/map880.xml +175 -0
- data/vendor/marc2bibframe2/xsl/conf/scriptCrosswalk.xml +210 -0
- data/vendor/marc2bibframe2/xsl/conf/subjectThesaurus.xml +29 -0
- data/vendor/marc2bibframe2/xsl/marc2bibframe2.xsl +610 -0
- data/vendor/marc2bibframe2/xsl/naco-normalize.xsl +205 -0
- data/vendor/marc2bibframe2/xsl/utils.xsl +963 -0
- data/vendor/marc2bibframe2/xsl/variables.xsl +108 -0
- metadata +68 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<?xml version='1.0'?>
|
|
2
|
+
<xsl:stylesheet version="1.0"
|
|
3
|
+
xmlns:marc="http://www.loc.gov/MARC21/slim"
|
|
4
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
5
|
+
exclude-result-prefixes="xsl marc">
|
|
6
|
+
|
|
7
|
+
<!-- constants for marc2bibframe2.xsl -->
|
|
8
|
+
|
|
9
|
+
<!-- Current marc2bibframe2 version -->
|
|
10
|
+
<xsl:variable name="vCurrentVersion">v3.1.0</xsl:variable>
|
|
11
|
+
<xsl:variable name="vOntoVersionURI">http://id.loc.gov/ontologies/bibframe-3-0-1/</xsl:variable>
|
|
12
|
+
<xsl:variable name="vConvVersionURI">https://github.com/lcnetdev/marc2bibframe2/releases/tag/v3.1.0</xsl:variable>
|
|
13
|
+
<!-- <xsl:variable name="vConvVersionURI">https://github.com/lcnetdev/marc2bibframe2/tree/v3.1-dev</xsl:variable> -->
|
|
14
|
+
|
|
15
|
+
<!-- namespace URIs -->
|
|
16
|
+
<xsl:variable name="bf">http://id.loc.gov/ontologies/bibframe/</xsl:variable>
|
|
17
|
+
<xsl:variable name="bflc">http://id.loc.gov/ontologies/bflc/</xsl:variable>
|
|
18
|
+
<xsl:variable name="edtf">http://id.loc.gov/datatypes/</xsl:variable>
|
|
19
|
+
<xsl:variable name="madsrdf">http://www.loc.gov/mads/rdf/v1#</xsl:variable>
|
|
20
|
+
<xsl:variable name="xs">http://www.w3.org/2001/XMLSchema#</xsl:variable>
|
|
21
|
+
|
|
22
|
+
<!-- id.loc.gov vocabulary stems -->
|
|
23
|
+
<xsl:variable name="carriers">http://id.loc.gov/vocabulary/carriers/</xsl:variable>
|
|
24
|
+
<xsl:variable name="classSchemes">http://id.loc.gov/vocabulary/classSchemes/</xsl:variable>
|
|
25
|
+
<xsl:variable name="contentType">http://id.loc.gov/vocabulary/contentTypes/</xsl:variable>
|
|
26
|
+
<xsl:variable name="countries">http://id.loc.gov/vocabulary/countries/</xsl:variable>
|
|
27
|
+
<xsl:variable name="demographicTerms">http://id.loc.gov/authorities/demographicTerms/</xsl:variable>
|
|
28
|
+
<xsl:variable name="descriptionConventions">http://id.loc.gov/vocabulary/descriptionConventions/</xsl:variable>
|
|
29
|
+
<xsl:variable name="genreForms">http://id.loc.gov/authorities/genreForms/</xsl:variable>
|
|
30
|
+
<xsl:variable name="geographicAreas">http://id.loc.gov/vocabulary/geographicAreas/</xsl:variable>
|
|
31
|
+
<xsl:variable name="graphicMaterials">http://id.loc.gov/vocabulary/graphicMaterials/</xsl:variable>
|
|
32
|
+
<xsl:variable name="iso6391">http://id.loc.gov/vocabulary/iso639-1/</xsl:variable>
|
|
33
|
+
<xsl:variable name="iso6392">http://id.loc.gov/vocabulary/iso639-2/</xsl:variable>
|
|
34
|
+
<xsl:variable name="iso6393">http://id.loc.gov/vocabulary/iso639-3/</xsl:variable>
|
|
35
|
+
<xsl:variable name="issuance">http://id.loc.gov/vocabulary/issuance/</xsl:variable>
|
|
36
|
+
<xsl:variable name="languages">http://id.loc.gov/vocabulary/languages/</xsl:variable>
|
|
37
|
+
<xsl:variable name="marcgt">http://id.loc.gov/vocabulary/marcgt/</xsl:variable>
|
|
38
|
+
<xsl:variable name="mcolor">http://id.loc.gov/vocabulary/mcolor/</xsl:variable>
|
|
39
|
+
<xsl:variable name="mediaType">http://id.loc.gov/vocabulary/mediaTypes/</xsl:variable>
|
|
40
|
+
<xsl:variable name="mmaterial">http://id.loc.gov/vocabulary/mmaterial/</xsl:variable>
|
|
41
|
+
<xsl:variable name="mplayback">http://id.loc.gov/vocabulary/mplayback/</xsl:variable>
|
|
42
|
+
<xsl:variable name="mpolarity">http://id.loc.gov/vocabulary/mpolarity/</xsl:variable>
|
|
43
|
+
<xsl:variable name="marcauthen">http://id.loc.gov/vocabulary/marcauthen/</xsl:variable>
|
|
44
|
+
<xsl:variable name="marcmuscomp">http://id.loc.gov/vocabulary/marcmuscomp/</xsl:variable>
|
|
45
|
+
<xsl:variable name="organizations">http://id.loc.gov/vocabulary/organizations/</xsl:variable>
|
|
46
|
+
<xsl:variable name="relators">http://id.loc.gov/vocabulary/relators/</xsl:variable>
|
|
47
|
+
<xsl:variable name="resourceComponents">http://id.loc.gov/vocabulary/resourceComponents</xsl:variable>
|
|
48
|
+
<xsl:variable name="mproduction">http://id.loc.gov/vocabulary/mproduction/</xsl:variable>
|
|
49
|
+
<xsl:variable name="msoundcontent">http://id.loc.gov/vocabulary/msoundcontent/</xsl:variable>
|
|
50
|
+
<xsl:variable name="mrecmedium">http://id.loc.gov/vocabulary/mrecmedium/</xsl:variable>
|
|
51
|
+
<xsl:variable name="mgeneration">http://id.loc.gov/vocabulary/mgeneration/</xsl:variable>
|
|
52
|
+
<xsl:variable name="mpresformat">http://id.loc.gov/vocabulary/mpresformat/</xsl:variable>
|
|
53
|
+
<xsl:variable name="mmaspect">http://id.loc.gov/vocabulary/maspect/</xsl:variable>
|
|
54
|
+
<xsl:variable name="mrectype">http://id.loc.gov/vocabulary/mrectype/</xsl:variable>
|
|
55
|
+
<xsl:variable name="mspecplayback">http://id.loc.gov/vocabulary/mspecplayback/</xsl:variable>
|
|
56
|
+
<xsl:variable name="mgroove">http://id.loc.gov/vocabulary/mgroove/</xsl:variable>
|
|
57
|
+
<xsl:variable name="mvidformat">http://id.loc.gov/vocabulary/mvidformat/</xsl:variable>
|
|
58
|
+
<xsl:variable name="mbroadstd">http://id.loc.gov/vocabulary/mbroadstd/</xsl:variable>
|
|
59
|
+
<xsl:variable name="mfiletype">http://id.loc.gov/vocabulary/mfiletype/</xsl:variable>
|
|
60
|
+
<xsl:variable name="mregencoding">http://id.loc.gov/vocabulary/mregencoding/</xsl:variable>
|
|
61
|
+
<xsl:variable name="mmusicformat">http://id.loc.gov/vocabulary/mmusicformat/</xsl:variable>
|
|
62
|
+
<xsl:variable name="genreFormSchemes">http://id.loc.gov/vocabulary/genreFormSchemes/</xsl:variable>
|
|
63
|
+
<xsl:variable name="subjectSchemes">http://id.loc.gov/vocabulary/subjectSchemes/</xsl:variable>
|
|
64
|
+
<xsl:variable name="nationalbibschemes">http://id.loc.gov/vocabulary/nationalbibschemes/</xsl:variable>
|
|
65
|
+
<xsl:variable name="fingerprintschemes">http://id.loc.gov/vocabulary/fingerprintschemes/</xsl:variable>
|
|
66
|
+
<xsl:variable name="languageschemes">http://id.loc.gov/vocabulary/languageschemes/</xsl:variable>
|
|
67
|
+
<xsl:variable name="musiccompschemes">http://id.loc.gov/vocabulary/musiccompschemes/</xsl:variable>
|
|
68
|
+
<xsl:variable name="mgovtpubtype">http://id.loc.gov/vocabulary/mgovtpubtype/</xsl:variable>
|
|
69
|
+
<xsl:variable name="mencformat">http://id.loc.gov/vocabulary/mencformat/</xsl:variable>
|
|
70
|
+
<xsl:variable name="nametitleschemes">http://id.loc.gov/vocabulary/nameTitleSchemes/</xsl:variable>
|
|
71
|
+
<xsl:variable name="musiccodeschemes">http://id.loc.gov/vocabulary/musiccodeschemes/</xsl:variable>
|
|
72
|
+
<xsl:variable name="classG">http://id.loc.gov/authorities/classification/G</xsl:variable>
|
|
73
|
+
<xsl:variable name="msupplcont">http://id.loc.gov/vocabulary/msupplcont/</xsl:variable>
|
|
74
|
+
<xsl:variable name="mstatus">http://id.loc.gov/vocabulary/mstatus/</xsl:variable>
|
|
75
|
+
<xsl:variable name="varianttitle">http://id.loc.gov/vocabulary/vartitletype/</xsl:variable>
|
|
76
|
+
|
|
77
|
+
<!-- other vocabulary stems -->
|
|
78
|
+
<xsl:variable name="deorgs">https://ld.zdb-services.de/resource/organisations/</xsl:variable>
|
|
79
|
+
|
|
80
|
+
<!-- for upper- and lower-case translation (ASCII only) -->
|
|
81
|
+
<xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable>
|
|
82
|
+
<xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
<!-- configuration files -->
|
|
86
|
+
|
|
87
|
+
<!-- subject thesaurus map -->
|
|
88
|
+
<xsl:variable name="subjectThesaurus" select="document('conf/subjectThesaurus.xml')"/>
|
|
89
|
+
|
|
90
|
+
<!-- language/script maps -->
|
|
91
|
+
<!-- <xsl:variable name="languageMap" select="document('conf/languageCrosswalk.xml')"/> -->
|
|
92
|
+
<xsl:variable name="iso6392-to-1-map" select="document('conf/iso6392-to-1.xml')"/>
|
|
93
|
+
<xsl:variable name="code-to-script-map" select="document('conf/code-to-script.xml')"/>
|
|
94
|
+
<xsl:variable name="scriptMap" select="document('conf/scriptCrosswalk.xml')"/>
|
|
95
|
+
|
|
96
|
+
<!-- code maps -->
|
|
97
|
+
<xsl:variable name="codeMaps" select="document('conf/codeMaps.xml')"/>
|
|
98
|
+
|
|
99
|
+
<!-- 880 processing -->
|
|
100
|
+
<xsl:variable name="map880" select="document('conf/map880.xml')"/>
|
|
101
|
+
|
|
102
|
+
<!-- abbreviations for punctuation processing -->
|
|
103
|
+
<xsl:variable name="abbreviations" select="document('conf/abbreviations.xml')"/>
|
|
104
|
+
|
|
105
|
+
<!-- exclusions related to 856/859 processing -->
|
|
106
|
+
<xsl:variable name="exclusions" select="document('conf/exclusions.xml')"/>
|
|
107
|
+
|
|
108
|
+
</xsl:stylesheet>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bibframe_ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Collier
|
|
@@ -65,6 +65,34 @@ dependencies:
|
|
|
65
65
|
- - ">="
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
67
|
version: '0'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: marc
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0'
|
|
75
|
+
type: :runtime
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - ">="
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0'
|
|
82
|
+
- !ruby/object:Gem::Dependency
|
|
83
|
+
name: nokogiri
|
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
|
85
|
+
requirements:
|
|
86
|
+
- - ">="
|
|
87
|
+
- !ruby/object:Gem::Version
|
|
88
|
+
version: '0'
|
|
89
|
+
type: :runtime
|
|
90
|
+
prerelease: false
|
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
68
96
|
description: Ruby gem for parsing various BIBFRAME supported formats for display.
|
|
69
97
|
email:
|
|
70
98
|
- aaron.collier@stanford.edu
|
|
@@ -75,9 +103,12 @@ files:
|
|
|
75
103
|
- ".rubocop_todo.yml"
|
|
76
104
|
- README.md
|
|
77
105
|
- Rakefile
|
|
106
|
+
- docs/superpowers/plans/2026-09-09-marc-conversion.md
|
|
107
|
+
- docs/superpowers/specs/2026-09-09-marc-conversion-design.md
|
|
78
108
|
- lib/bibframe_ruby.rb
|
|
79
109
|
- lib/bibframe_ruby/graph.rb
|
|
80
110
|
- lib/bibframe_ruby/graph_builder.rb
|
|
111
|
+
- lib/bibframe_ruby/marc_converter.rb
|
|
81
112
|
- lib/bibframe_ruby/models/agent.rb
|
|
82
113
|
- lib/bibframe_ruby/models/contribution.rb
|
|
83
114
|
- lib/bibframe_ruby/models/hub.rb
|
|
@@ -92,6 +123,42 @@ files:
|
|
|
92
123
|
- lib/bibframe_ruby/resource.rb
|
|
93
124
|
- lib/bibframe_ruby/version.rb
|
|
94
125
|
- sig/bibframe_ruby.rbs
|
|
126
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-001-007.xsl
|
|
127
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-006,008.xsl
|
|
128
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-010-048.xsl
|
|
129
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-050-088.xsl
|
|
130
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-1XX,7XX,8XX-names.xsl
|
|
131
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-200-247not240-Titles.xsl
|
|
132
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-240andX30-UnifTitle.xsl
|
|
133
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-250-270.xsl
|
|
134
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-3XX.xsl
|
|
135
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-460-468-SeriesTreat.xsl
|
|
136
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-490-510-Links.xsl
|
|
137
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-5XX.xsl
|
|
138
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-600-662.xsl
|
|
139
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-720+740to755.xsl
|
|
140
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-758.xsl
|
|
141
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-760-788-Links.xsl
|
|
142
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-841-887.xsl
|
|
143
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-880.xsl
|
|
144
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-ControlSubfields.xsl
|
|
145
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-LDR.xsl
|
|
146
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-Preprocess0-Splitting.xsl
|
|
147
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-Process6-Series.xsl
|
|
148
|
+
- vendor/marc2bibframe2/xsl/ConvSpec-Process8-ProvAct.xsl
|
|
149
|
+
- vendor/marc2bibframe2/xsl/conf/abbreviations.xml
|
|
150
|
+
- vendor/marc2bibframe2/xsl/conf/code-to-script.xml
|
|
151
|
+
- vendor/marc2bibframe2/xsl/conf/codeMaps.xml
|
|
152
|
+
- vendor/marc2bibframe2/xsl/conf/exclusions.xml
|
|
153
|
+
- vendor/marc2bibframe2/xsl/conf/iso6392-to-1.xml
|
|
154
|
+
- vendor/marc2bibframe2/xsl/conf/languageCrosswalk.xml
|
|
155
|
+
- vendor/marc2bibframe2/xsl/conf/map880.xml
|
|
156
|
+
- vendor/marc2bibframe2/xsl/conf/scriptCrosswalk.xml
|
|
157
|
+
- vendor/marc2bibframe2/xsl/conf/subjectThesaurus.xml
|
|
158
|
+
- vendor/marc2bibframe2/xsl/marc2bibframe2.xsl
|
|
159
|
+
- vendor/marc2bibframe2/xsl/naco-normalize.xsl
|
|
160
|
+
- vendor/marc2bibframe2/xsl/utils.xsl
|
|
161
|
+
- vendor/marc2bibframe2/xsl/variables.xsl
|
|
95
162
|
homepage: https://github.com/aaron-collier/bibframe_ruby
|
|
96
163
|
licenses: []
|
|
97
164
|
metadata:
|