loc_mods 0.2.7 → 0.3.1

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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +16 -7
  3. data/.rubocop_todo.yml +38 -37
  4. data/README.adoc +44 -0
  5. data/lib/loc_mods/abstract.rb +2 -2
  6. data/lib/loc_mods/access_condition.rb +2 -2
  7. data/lib/loc_mods/alternative_name.rb +2 -2
  8. data/lib/loc_mods/area.rb +2 -2
  9. data/lib/loc_mods/cartographic_extension.rb +2 -2
  10. data/lib/loc_mods/cartographics.rb +2 -2
  11. data/lib/loc_mods/city_section.rb +2 -2
  12. data/lib/loc_mods/classification.rb +2 -2
  13. data/lib/loc_mods/cli.rb +15 -9
  14. data/lib/loc_mods/collection.rb +2 -2
  15. data/lib/loc_mods/copy_information.rb +2 -2
  16. data/lib/loc_mods/date.rb +4 -4
  17. data/lib/loc_mods/date_other.rb +2 -2
  18. data/lib/loc_mods/detail.rb +2 -2
  19. data/lib/loc_mods/edition.rb +2 -2
  20. data/lib/loc_mods/enumeration_and_chronology.rb +2 -2
  21. data/lib/loc_mods/extent.rb +2 -2
  22. data/lib/loc_mods/extent_definition.rb +2 -2
  23. data/lib/loc_mods/form.rb +2 -2
  24. data/lib/loc_mods/genre.rb +2 -2
  25. data/lib/loc_mods/geographic_code.rb +4 -2
  26. data/lib/loc_mods/hierarchical_geographic.rb +2 -2
  27. data/lib/loc_mods/hierarchical_part.rb +2 -2
  28. data/lib/loc_mods/holding_simple.rb +2 -2
  29. data/lib/loc_mods/identifier.rb +2 -2
  30. data/lib/loc_mods/item_identifier.rb +2 -2
  31. data/lib/loc_mods/language.rb +2 -2
  32. data/lib/loc_mods/language_term.rb +4 -2
  33. data/lib/loc_mods/location.rb +2 -2
  34. data/lib/loc_mods/marc_code_lookup.rb +54 -0
  35. data/lib/loc_mods/name.rb +4 -6
  36. data/lib/loc_mods/name_part.rb +2 -2
  37. data/lib/loc_mods/namespace.rb +10 -0
  38. data/lib/loc_mods/non_sort.rb +4 -5
  39. data/lib/loc_mods/note.rb +2 -2
  40. data/lib/loc_mods/occupation.rb +2 -2
  41. data/lib/loc_mods/origin_info.rb +3 -2
  42. data/lib/loc_mods/part.rb +2 -2
  43. data/lib/loc_mods/physical_description.rb +3 -2
  44. data/lib/loc_mods/physical_description_note.rb +2 -2
  45. data/lib/loc_mods/physical_location.rb +2 -2
  46. data/lib/loc_mods/place.rb +2 -2
  47. data/lib/loc_mods/place_term.rb +4 -2
  48. data/lib/loc_mods/publisher.rb +2 -2
  49. data/lib/loc_mods/record.rb +3 -2
  50. data/lib/loc_mods/record_content_source.rb +1 -1
  51. data/lib/loc_mods/record_identifier.rb +2 -2
  52. data/lib/loc_mods/record_info.rb +2 -2
  53. data/lib/loc_mods/record_info_note.rb +2 -2
  54. data/lib/loc_mods/region.rb +2 -2
  55. data/lib/loc_mods/related_item.rb +4 -6
  56. data/lib/loc_mods/role.rb +2 -2
  57. data/lib/loc_mods/role_term.rb +10 -2
  58. data/lib/loc_mods/script_term.rb +2 -2
  59. data/lib/loc_mods/string_plus_language.rb +2 -2
  60. data/lib/loc_mods/subject.rb +6 -7
  61. data/lib/loc_mods/subject_name.rb +2 -2
  62. data/lib/loc_mods/subject_title_info.rb +2 -2
  63. data/lib/loc_mods/table_of_contents.rb +2 -2
  64. data/lib/loc_mods/target_audience.rb +2 -2
  65. data/lib/loc_mods/temporal.rb +2 -2
  66. data/lib/loc_mods/text.rb +2 -2
  67. data/lib/loc_mods/title_info.rb +2 -2
  68. data/lib/loc_mods/type_of_resource.rb +2 -2
  69. data/lib/loc_mods/url.rb +2 -2
  70. data/lib/loc_mods/version.rb +1 -1
  71. data/lib/loc_mods/xlink_href.rb +9 -0
  72. data/lib/loc_mods/xlink_namespace.rb +8 -0
  73. data/lib/loc_mods/xml_space.rb +9 -0
  74. data/lib/loc_mods.rb +72 -8
  75. metadata +17 -11
@@ -21,8 +21,8 @@ module LocMods
21
21
  attribute :holding_external, CartographicExtension
22
22
 
23
23
  xml do
24
- root "location"
25
- namespace "http://www.loc.gov/mods/v3", nil
24
+ element "location"
25
+ namespace Namespace
26
26
 
27
27
  map_attribute "lang", to: :lang
28
28
  map_attribute "script", to: :script
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Load only the code lists: the full loc_marc also loads shale and sets
4
+ # the global Shale XML adapter.
5
+ require "loc_marc/codes"
6
+
7
+ module LocMods
8
+ # Looks up a coded term in the MARC 21 code lists from the loc_marc gem.
9
+ #
10
+ # The `authority` attribute selects the code list. Only the authorities in
11
+ # CODE_LISTS are supported. A term with `type="text"`, an unknown authority
12
+ # or an unknown code gives `nil`.
13
+ module MarcCodeLookup
14
+ CODE_LISTS = {
15
+ "marcrelator" => ::LocMarc::Codes::Relator,
16
+ "marccountry" => ::LocMarc::Codes::Country,
17
+ "marcgac" => ::LocMarc::Codes::GeographicArea,
18
+ "iso639-2b" => ::LocMarc::Codes::Language,
19
+ }.freeze
20
+
21
+ # @return [Hash{Symbol=>Object}, nil] a frozen copy of
22
+ # `{ code:, description:, deprecated: }`
23
+ def code_info
24
+ list = marc_code_list
25
+ return unless list && content
26
+
27
+ entry = lookup_marc_code(list, content.strip.downcase)
28
+ entry&.transform_values { |v| v.dup.freeze }&.freeze
29
+ end
30
+
31
+ # @return [String, nil] the description of the code
32
+ def code_description
33
+ code_info&.fetch(:description)
34
+ end
35
+
36
+ private
37
+
38
+ def marc_code_list
39
+ return if respond_to?(:type) && type == "text"
40
+ return unless authority
41
+
42
+ CODE_LISTS[authority.strip.downcase]
43
+ end
44
+
45
+ # MARC geographic area codes are padded with hyphens to 7 characters
46
+ # ("n-us---"); the code list stores them without the padding ("n-us").
47
+ def lookup_marc_code(list, code)
48
+ entry = list.lookup(code)
49
+ return entry if entry || list != ::LocMarc::Codes::GeographicArea
50
+
51
+ list.lookup(code.sub(/-+\z/, ""))
52
+ end
53
+ end
54
+ end
data/lib/loc_mods/name.rb CHANGED
@@ -29,15 +29,13 @@ module LocMods
29
29
  attribute :name_identifier, Identifier, collection: true
30
30
  attribute :alternative_name, AlternativeName, collection: true
31
31
  attribute :etal, :string
32
- attribute :href, :string
32
+ attribute :href, XlinkHref
33
33
 
34
34
  xml do
35
- root "name"
36
- namespace "http://www.loc.gov/mods/v3", nil
35
+ element "name"
36
+ namespace Namespace
37
37
 
38
- map_attribute "href", to: :href,
39
- namespace: "http://www.w3.org/1999/xlink",
40
- prefix: "xlink"
38
+ map_attribute "href", to: :href
41
39
 
42
40
  map_attribute "ID", to: :id
43
41
  map_attribute "authority", to: :authority
@@ -8,8 +8,8 @@ module LocMods
8
8
  attribute :type, :string
9
9
 
10
10
  xml do
11
- root "namePart"
12
- namespace "http://www.loc.gov/mods/v3", nil
11
+ element "namePart"
12
+ namespace Namespace
13
13
 
14
14
  map_content to: :content
15
15
  map_attribute "type", to: :type
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module LocMods
4
+ class Namespace < Lutaml::Xml::Namespace
5
+ uri "http://www.loc.gov/mods/v3"
6
+ prefix_default "mods"
7
+ element_form_default :unqualified
8
+ attribute_form_default :unqualified
9
+ end
10
+ end
@@ -5,15 +5,14 @@ require "lutaml/model"
5
5
  module LocMods
6
6
  class NonSort < Lutaml::Model::Serializable
7
7
  attribute :content, :string
8
- attribute :space, :string
8
+ attribute :space, ::Lutaml::Xml::W3c::XmlSpaceType
9
9
 
10
10
  xml do
11
- root "nonSort"
12
- namespace "http://www.loc.gov/mods/v3", nil
11
+ element "nonSort"
12
+ namespace Namespace
13
13
 
14
14
  map_content to: :content
15
- map_attribute "space", to: :space,
16
- namespace: "http://www.w3.org/XML/1998/namespace", prefix: "xml"
15
+ map_attribute "space", to: :space
17
16
  end
18
17
  end
19
18
  end
data/lib/loc_mods/note.rb CHANGED
@@ -11,8 +11,8 @@ module LocMods
11
11
  attribute :script, :string
12
12
 
13
13
  xml do
14
- root "note"
15
- namespace "http://www.loc.gov/mods/v3", nil
14
+ element "note"
15
+ namespace Namespace
16
16
 
17
17
  map_content to: :content
18
18
  map_attribute "displayLabel", to: :display_label
@@ -11,8 +11,8 @@ module LocMods
11
11
  attribute :value_uri, :string
12
12
 
13
13
  xml do
14
- root "occupation"
15
- namespace "http://www.loc.gov/mods/v3", nil
14
+ element "occupation"
15
+ namespace Namespace
16
16
 
17
17
  map_content to: :content
18
18
  map_attribute "authority", to: :authority
@@ -30,8 +30,9 @@ module LocMods
30
30
  attribute :frequency, :string, collection: true
31
31
 
32
32
  xml do
33
- root "originInfo", ordered: true
34
- namespace "http://www.loc.gov/mods/v3", nil
33
+ element "originInfo"
34
+ ordered
35
+ namespace Namespace
35
36
 
36
37
  map_attribute "lang", to: :lang
37
38
  map_attribute "script", to: :script
data/lib/loc_mods/part.rb CHANGED
@@ -23,8 +23,8 @@ module LocMods
23
23
  attribute :text, Text, collection: true
24
24
 
25
25
  xml do
26
- root "part"
27
- namespace "http://www.loc.gov/mods/v3", nil
26
+ element "part"
27
+ namespace Namespace
28
28
 
29
29
  map_attribute "ID", to: :id
30
30
  map_attribute "type", to: :type
@@ -21,8 +21,9 @@ module LocMods
21
21
  attribute :note, PhysicalDescriptionNote, collection: true
22
22
 
23
23
  xml do
24
- root "physicalDescription", ordered: true
25
- namespace "http://www.loc.gov/mods/v3", nil
24
+ element "physicalDescription"
25
+ ordered
26
+ namespace Namespace
26
27
 
27
28
  map_attribute "lang", to: :lang
28
29
  map_attribute "script", to: :script
@@ -11,8 +11,8 @@ module LocMods
11
11
  attribute :id, :string
12
12
 
13
13
  xml do
14
- root "physicalDescriptionNote"
15
- namespace "http://www.loc.gov/mods/v3", nil
14
+ element "physicalDescriptionNote"
15
+ namespace Namespace
16
16
 
17
17
  map_content to: :content
18
18
  map_attribute "displayLabel", to: :display_label
@@ -9,8 +9,8 @@ module LocMods
9
9
  attribute :type, :string
10
10
 
11
11
  xml do
12
- root "physicalLocation"
13
- namespace "http://www.loc.gov/mods/v3", nil
12
+ element "physicalLocation"
13
+ namespace Namespace
14
14
 
15
15
  map_content to: :content
16
16
  map_attribute "displayLabel", to: :display_label
@@ -10,8 +10,8 @@ module LocMods
10
10
  attribute :place_term, PlaceTerm, collection: true
11
11
 
12
12
  xml do
13
- root "place"
14
- namespace "http://www.loc.gov/mods/v3", nil
13
+ element "place"
14
+ namespace Namespace
15
15
 
16
16
  map_attribute "supplied", to: :supplied
17
17
  map_element "placeTerm", to: :place_term
@@ -4,6 +4,8 @@ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
6
  class PlaceTerm < Lutaml::Model::Serializable
7
+ include MarcCodeLookup
8
+
7
9
  attribute :content, :string
8
10
  attribute :authority_uri, :string
9
11
  attribute :value_uri, :string
@@ -11,8 +13,8 @@ module LocMods
11
13
  attribute :type, :string
12
14
 
13
15
  xml do
14
- root "placeTerm"
15
- namespace "http://www.loc.gov/mods/v3", nil
16
+ element "placeTerm"
17
+ namespace Namespace
16
18
 
17
19
  map_content to: :content
18
20
  map_attribute "authorityURI", to: :authority_uri
@@ -10,8 +10,8 @@ module LocMods
10
10
  attribute :value_uri, :string
11
11
 
12
12
  xml do
13
- root "publisher"
14
- namespace "http://www.loc.gov/mods/v3", nil
13
+ element "publisher"
14
+ namespace Namespace
15
15
 
16
16
  map_content to: :content
17
17
  map_attribute "authority", to: :authority
@@ -49,8 +49,9 @@ module LocMods
49
49
  attribute :type_of_resource, TypeOfResource, collection: true
50
50
 
51
51
  xml do
52
- root "mods", ordered: true
53
- namespace "http://www.loc.gov/mods/v3", nil
52
+ element "mods"
53
+ ordered
54
+ namespace Namespace
54
55
 
55
56
  map_attribute "ID", to: :id
56
57
  map_attribute "version", to: :version
@@ -8,7 +8,7 @@ module LocMods
8
8
  attribute :content, :string
9
9
 
10
10
  xml do
11
- root "RecordContentSource"
11
+ element "RecordContentSource"
12
12
  map_content to: :content
13
13
 
14
14
  map_attribute "authority", to: :authority
@@ -8,8 +8,8 @@ module LocMods
8
8
  attribute :source, :string
9
9
 
10
10
  xml do
11
- root "recordIdentifier"
12
- namespace "http://www.loc.gov/mods/v3", nil
11
+ element "recordIdentifier"
12
+ namespace Namespace
13
13
 
14
14
  map_content to: :content
15
15
  map_attribute "source", to: :source
@@ -25,8 +25,8 @@ module LocMods
25
25
  attribute :record_info_note, RecordInfoNote, collection: true
26
26
 
27
27
  xml do
28
- root "recordInfo"
29
- namespace "http://www.loc.gov/mods/v3", nil
28
+ element "recordInfo"
29
+ namespace Namespace
30
30
 
31
31
  map_attribute "lang", to: :lang
32
32
  map_attribute "script", to: :script
@@ -12,8 +12,8 @@ module LocMods
12
12
  attribute :alt_rep_group, :string
13
13
 
14
14
  xml do
15
- root "recordInfoNote"
16
- namespace "http://www.loc.gov/mods/v3", nil
15
+ element "recordInfoNote"
16
+ namespace Namespace
17
17
 
18
18
  map_content to: :content
19
19
  map_attribute "displayLabel", to: :display_label
@@ -10,8 +10,8 @@ module LocMods
10
10
  attribute :region_type, :string
11
11
 
12
12
  xml do
13
- root "region"
14
- namespace "http://www.loc.gov/mods/v3", nil
13
+ element "region"
14
+ namespace Namespace
15
15
 
16
16
  map_content to: :content
17
17
  map_attribute "regionType", to: :region_type
@@ -51,11 +51,11 @@ module LocMods
51
51
  attribute :target_audience, TargetAudience, collection: true
52
52
  attribute :title_info, TitleInfo, collection: true
53
53
  attribute :type_of_resource, TypeOfResource, collection: true
54
- attribute :href, :string
54
+ attribute :href, XlinkHref
55
55
 
56
56
  xml do
57
- root "relatedItem"
58
- namespace "http://www.loc.gov/mods/v3", nil
57
+ element "relatedItem"
58
+ namespace Namespace
59
59
 
60
60
  map_attribute "type", to: :type
61
61
  map_attribute "otherType", to: :other_type
@@ -64,9 +64,7 @@ module LocMods
64
64
  map_attribute "otherTypeURI", to: :other_type_uri
65
65
  map_attribute "displayLabel", to: :display_label
66
66
  map_attribute "ID", to: :id
67
- map_attribute "href", to: :href,
68
- namespace: "http://www.w3.org/1999/xlink",
69
- prefix: "xlink"
67
+ map_attribute "href", to: :href
70
68
 
71
69
  map_element "abstract", to: :abstract
72
70
  map_element "accessCondition", to: :access_condition
data/lib/loc_mods/role.rb CHANGED
@@ -9,8 +9,8 @@ module LocMods
9
9
  attribute :role_term, RoleTerm, collection: true
10
10
 
11
11
  xml do
12
- root "role"
13
- namespace "http://www.loc.gov/mods/v3", nil
12
+ element "role"
13
+ namespace Namespace
14
14
 
15
15
  map_element "roleTerm", to: :role_term
16
16
  end
@@ -4,14 +4,22 @@ require "lutaml/model"
4
4
 
5
5
  module LocMods
6
6
  class RoleTerm < Lutaml::Model::Serializable
7
+ include MarcCodeLookup
8
+
7
9
  attribute :content, :string
10
+ attribute :authority_uri, :string
11
+ attribute :value_uri, :string
12
+ attribute :authority, :string
8
13
  attribute :type, :string
9
14
 
10
15
  xml do
11
- root "roleTerm"
12
- namespace "http://www.loc.gov/mods/v3", nil
16
+ element "roleTerm"
17
+ namespace Namespace
13
18
 
14
19
  map_content to: :content
20
+ map_attribute "authorityURI", to: :authority_uri
21
+ map_attribute "valueURI", to: :value_uri
22
+ map_attribute "authority", to: :authority
15
23
  map_attribute "type", to: :type
16
24
  end
17
25
  end
@@ -8,8 +8,8 @@ module LocMods
8
8
  attribute :type, :string
9
9
 
10
10
  xml do
11
- root "scriptTerm"
12
- namespace "http://www.loc.gov/mods/v3", nil
11
+ element "scriptTerm"
12
+ namespace Namespace
13
13
 
14
14
  map_content to: :content
15
15
  map_attribute "type", to: :type
@@ -10,8 +10,8 @@ module LocMods
10
10
  attribute :transliteration, :string
11
11
 
12
12
  xml do
13
- root "nonSort"
14
- namespace "http://www.loc.gov/mods/v3", nil
13
+ element "nonSort"
14
+ namespace Namespace
15
15
 
16
16
  map_content to: :content
17
17
  map_attribute "lang", to: :lang
@@ -33,15 +33,14 @@ module LocMods
33
33
  attribute :cartographics, Cartographics, collection: true
34
34
  attribute :occupation, Occupation, collection: true
35
35
  attribute :genre, Genre, collection: true
36
- attribute :href, :string
36
+ attribute :href, XlinkHref
37
37
 
38
38
  xml do
39
- root "subject", ordered: true
40
- namespace "http://www.loc.gov/mods/v3", nil
39
+ element "subject"
40
+ ordered
41
+ namespace Namespace
41
42
 
42
- map_attribute "href", to: :href,
43
- namespace: "http://www.w3.org/1999/xlink",
44
- prefix: "xlink"
43
+ map_attribute "href", to: :href
45
44
 
46
45
  map_attribute "ID", to: :id
47
46
  map_attribute "authority", to: :authority
@@ -56,7 +55,7 @@ module LocMods
56
55
 
57
56
  map_element "name", to: :name
58
57
  map_element "titleInfo", to: :title_info
59
- map_element "topic", to: :topic
58
+ map_element "topic", to: :topic, render_empty: :as_blank
60
59
  map_element "geographic", to: :geographic
61
60
  map_element "temporal", to: :temporal
62
61
  map_element "geographicCode", to: :geographic_code
@@ -25,8 +25,8 @@ module LocMods
25
25
  attribute :name_identifier, Identifier, collection: true
26
26
 
27
27
  xml do
28
- root "subjectName"
29
- namespace "http://www.loc.gov/mods/v3", nil
28
+ element "subjectName"
29
+ namespace Namespace
30
30
 
31
31
  map_attribute "type", to: :type
32
32
  map_attribute "ID", to: :id
@@ -20,8 +20,8 @@ module LocMods
20
20
  attribute :non_sort, :string, collection: true
21
21
 
22
22
  xml do
23
- root "subjectTitleInfo"
24
- namespace "http://www.loc.gov/mods/v3", nil
23
+ element "subjectTitleInfo"
24
+ namespace Namespace
25
25
 
26
26
  map_attribute "ID", to: :id
27
27
  map_attribute "authority", to: :authority
@@ -13,8 +13,8 @@ module LocMods
13
13
  attribute :content_type, :string
14
14
 
15
15
  xml do
16
- root "tableOfContents"
17
- namespace "http://www.loc.gov/mods/v3", nil
16
+ element "tableOfContents"
17
+ namespace Namespace
18
18
 
19
19
  map_content to: :content
20
20
  map_attribute "displayLabel", to: :display_label
@@ -10,8 +10,8 @@ module LocMods
10
10
  attribute :alt_rep_group, :string
11
11
 
12
12
  xml do
13
- root "targetAudience"
14
- namespace "http://www.loc.gov/mods/v3", nil
13
+ element "targetAudience"
14
+ namespace Namespace
15
15
 
16
16
  map_content to: :content
17
17
  map_attribute "authority", to: :authority
@@ -12,8 +12,8 @@ module LocMods
12
12
  attribute :value_uri, :string
13
13
 
14
14
  xml do
15
- root "temporal"
16
- namespace "http://www.loc.gov/mods/v3", nil
15
+ element "temporal"
16
+ namespace Namespace
17
17
 
18
18
  map_content to: :content
19
19
  map_attribute "authority", to: :authority
data/lib/loc_mods/text.rb CHANGED
@@ -9,8 +9,8 @@ module LocMods
9
9
  attribute :type, :string
10
10
 
11
11
  xml do
12
- root "text"
13
- namespace "http://www.loc.gov/mods/v3", nil
12
+ element "text"
13
+ namespace Namespace
14
14
 
15
15
  map_content to: :content
16
16
  map_attribute "displayLabel", to: :display_label
@@ -28,8 +28,8 @@ module LocMods
28
28
  attribute :non_sort, NonSort, collection: true
29
29
 
30
30
  xml do
31
- root "titleInfo"
32
- namespace "http://www.loc.gov/mods/v3", nil
31
+ element "titleInfo"
32
+ namespace Namespace
33
33
 
34
34
  map_attribute "type", to: :type
35
35
  map_attribute "otherType", to: :other_type
@@ -12,8 +12,8 @@ module LocMods
12
12
  attribute :usage, :string
13
13
 
14
14
  xml do
15
- root "typeOfResource"
16
- namespace "http://www.loc.gov/mods/v3", nil
15
+ element "typeOfResource"
16
+ namespace Namespace
17
17
 
18
18
  map_content to: :content
19
19
  map_attribute "collection", to: :collection
data/lib/loc_mods/url.rb CHANGED
@@ -12,8 +12,8 @@ module LocMods
12
12
  attribute :usage, :string
13
13
 
14
14
  xml do
15
- root "url"
16
- namespace "http://www.loc.gov/mods/v3", nil
15
+ element "url"
16
+ namespace Namespace
17
17
 
18
18
  map_content to: :content
19
19
  map_attribute "dateLastAccessed", to: :date_last_accessed
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LocMods
4
- VERSION = "0.2.7"
4
+ VERSION = "0.3.1"
5
5
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module LocMods
4
+ class XlinkHref < Lutaml::Model::Type::String
5
+ xml do
6
+ namespace XlinkNamespace
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module LocMods
4
+ class XlinkNamespace < Lutaml::Xml::Namespace
5
+ uri "http://www.w3.org/1999/xlink"
6
+ prefix_default "xlink"
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module LocMods
4
+ class XmlSpace < Lutaml::Model::Type::String
5
+ xml do
6
+ namespace Lutaml::Xml::W3c::XmlNamespace
7
+ end
8
+ end
9
+ end