lutaml-model 0.8.182 → 0.8.184

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8dfd6dd5e1c4a29123809356e7558d9bdd7e99a211d066c783b339d7658aeca
4
- data.tar.gz: 580a207495912f495cf4661224f7f3db965db815c225fd048eeea8ab971e2270
3
+ metadata.gz: 7512cd09dea291c7f8ef58266e2fb60aa313701ed7bb0df1843e8c7a194dd092
4
+ data.tar.gz: 720c91d86520af12e609cef406ae88b9d865450ca04c3e0fd3741114abe1b4da
5
5
  SHA512:
6
- metadata.gz: ed454fb7055da28e1ca3a2605e2cdf59c74160f98b82d471f8766aefd3e64a651c9ab5065b5779ba8539342ea2aff1f7dc7a9fbe8751edf9f960aaf5ef423271
7
- data.tar.gz: bc01ea810e3d79488ce9ba45530254f382d0327d5373cf4337ce7c0fb57739afdc8f3b7252907813b5ca6f6218b4eb20c78e7dee55dee6ca38a871fd3021d234
6
+ metadata.gz: b5bf83dd31ae2e125c9b886325074b4ae36a333ac637dae2ce364d2dc96850c370e457a0ecb073ece1b2ab247f8e584c000437dfe18c39ed43b4b90bf442a2c9
7
+ data.tar.gz: ebb1d2c13fe1a3725ed78b64dccdfe6993b918a9969121b3569b56a877f3d9bf07f389569ab838f3a3a0ca866928f6fe5cb06bc9ef948d3ef1ff93f34b030686
@@ -543,6 +543,7 @@ require "lutaml/xml/decisions/rules/inherit_parent_prefix_rule"
543
543
  require "lutaml/xml/decisions/rules/namespace_scope_rule"
544
544
  require "lutaml/xml/decisions/rules/reuse_parent_prefix_rule"
545
545
  require "lutaml/xml/decisions/rules/used_prefix_rule"
546
+ require "lutaml/xml/schema/builder/moxml"
546
547
  require "lutaml/model/schema/xml_compiler/spec_builder/complex_types"
547
548
  require "lutaml/model/schema/xml_compiler/spec_builder/members"
548
549
  require "lutaml/model/schema/xml_compiler/spec_builder/simple_types"
@@ -76,6 +76,10 @@ module Lutaml
76
76
  raise "XML schema compilation requires lutaml-xml. Add it to your Gemfile."
77
77
  end
78
78
 
79
+ def self.target_namespace(_xml)
80
+ raise "XML schema compilation requires lutaml-xml. Add it to your Gemfile."
81
+ end
82
+
79
83
  def self.from_relaxng(_rng, _options = {})
80
84
  raise "RELAX NG schema compilation requires lutaml-xml. Add it to your Gemfile."
81
85
  end
@@ -223,6 +223,7 @@ module Lutaml
223
223
  Lutaml::Xml::Leptris::PlanHydrator.call(self, plan,
224
224
  plan[:descriptor].walk(root),
225
225
  node: root,
226
+ register: register,
226
227
  declaration_plan_mode:
227
228
  options.fetch(
228
229
  :import_declaration_plan, :eager
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Model
5
- VERSION = "0.8.182"
5
+ VERSION = "0.8.184"
6
6
  end
7
7
  end
@@ -324,6 +324,22 @@ Lutaml::Model::Schema.register_method(:from_xml) do |xml, options = {}|
324
324
  Lutaml::Model::Schema::XmlCompiler.to_models(xml, options)
325
325
  end
326
326
 
327
+ # The target namespace URI of an XSD document — the value callers pass
328
+ # back as the compile's `namespace:` option so generated models bind
329
+ # their schema namespace (parse-side matching and emission both ride
330
+ # it; see #1204). Rides Xsd.parse so the metaschema registration
331
+ # preamble runs before the parse resolves attribute types.
332
+ Lutaml::Model::Schema.register_method(:target_namespace) do |xml|
333
+ if Lutaml::Model.opal?
334
+ raise NotImplementedError,
335
+ "XML schema compilation is not available under Opal."
336
+ end
337
+
338
+ parsed = Lutaml::Xml::Schema::Xsd.parse(xml, validate_schema: false)
339
+ schema = parsed.is_a?(Array) ? parsed.first : parsed
340
+ schema&.target_namespace
341
+ end
342
+
327
343
  Lutaml::Model::Schema.register_method(:from_relaxng) do |rng, options = {}|
328
344
  if Lutaml::Model::RuntimeCompatibility.opal?
329
345
  raise NotImplementedError,
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xml
5
+ module Schema
6
+ class Builder
7
+ # The moxml-backed schema builder (issue #1184): schema
8
+ # generation rides the CONFIGURED engine through the moxml
9
+ # layer, so every engine with a builder face generates
10
+ # schemas — not only the engines with a dedicated wrapper.
11
+ # The backend resolves from Config's plain symbol; the
12
+ # AdapterResolver's FIXED_ADAPTER_TYPE sentinel never reaches
13
+ # Moxml (the closed #1183 leak).
14
+ #
15
+ # The block receives the Moxml::Builder and drives it with
16
+ # the same method_missing tag DSL the Nokogiri/Oga wrappers
17
+ # expose: tag(attrs) { ... } closures, symbol or string
18
+ # attribute keys, xmlns handled as a namespace declaration.
19
+ class Moxml
20
+ attr_reader :builder
21
+
22
+ def initialize(options = {}, &block)
23
+ encoding = options[:encoding] || "UTF-8"
24
+ backend = Lutaml::Model::Config.xml_adapter_type || :nokogiri
25
+ @context = ::Moxml.new(backend)
26
+ @builder = ::Moxml::Builder.new(@context)
27
+ # Nokogiri's Builder emits the declaration when an
28
+ # encoding is given; parity here.
29
+ @builder.declaration(version: "1.0", encoding: encoding)
30
+ yield(@builder) if block
31
+ end
32
+
33
+ # Generate the schema XML string
34
+ # @param options [Hash] formatting options
35
+ # @option options [Boolean] :pretty Pretty print with indentation
36
+ # @option options [Integer] :indent Number of spaces (default: 2)
37
+ # @return [String] schema XML string
38
+ def to_xml(options = {})
39
+ doc = @builder.document
40
+ if options[:pretty]
41
+ indent = options[:indent] || 2
42
+ doc.to_xml(indent: indent)
43
+ else
44
+ doc.to_xml
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -14,6 +14,7 @@ module Lutaml
14
14
  class Builder
15
15
  autoload :Nokogiri, "#{__dir__}/builder/nokogiri"
16
16
  autoload :Oga, "#{__dir__}/builder/oga"
17
+ autoload :Moxml, "#{__dir__}/builder/moxml"
17
18
 
18
19
  attr_reader :builder, :adapter_type
19
20
 
@@ -24,13 +25,11 @@ module Lutaml
24
25
  # Use specified adapter, or configured XML adapter, or default to Nokogiri
25
26
  requested_adapter = adapter_type || Lutaml::Model::Config.xml_adapter_type || :nokogiri
26
27
 
27
- # Schema generation requires a builder API which only Nokogiri and Oga provide
28
- # Ox and REXML are valid XML parsing adapters but don't have schema builder implementations
29
- @adapter_type = if SUPPORTED_BUILDERS.include?(requested_adapter)
30
- requested_adapter
31
- else
32
- :nokogiri
33
- end
28
+ # Engines with a dedicated wrapper keep it (byte-identical
29
+ # emission); every other configured engine generates through
30
+ # the moxml layer (#1184) — the wrapper follows the engine
31
+ # instead of silently substituting Nokogiri.
32
+ @adapter_type = requested_adapter
34
33
  @options = options
35
34
  @builder = create_builder(&block)
36
35
  end
@@ -51,6 +50,8 @@ module Lutaml
51
50
  Nokogiri.new(@options, &block)
52
51
  when :oga
53
52
  Oga.new(@options, &block)
53
+ else
54
+ Moxml.new(@options, &block)
54
55
  end
55
56
  end
56
57
  end
@@ -1,19 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "nokogiri"
4
-
5
3
  module Lutaml
6
4
  module Xml
7
5
  module Schema
8
6
  # RelaxNG schema generation for XML models
9
7
  #
10
- # Generates RELAX NG schemas from LutaML model classes.
8
+ # Generates RELAX NG schemas from LutaML model classes. The
9
+ # emission rides the configured engine through the moxml layer
10
+ # (#1184); an explicit adapter option keeps the dedicated
11
+ # Nokogiri/Oga wrappers available.
11
12
  class RelaxngSchema
12
13
  extend Lutaml::Model::Schema::SharedMethods
13
14
 
14
15
  def self.generate(klass, options = {})
15
16
  register = extract_register_from(klass)
16
- builder = ::Nokogiri::XML::Builder.new(encoding: "UTF-8") do |xml|
17
+ adapter = options[:adapter] ||
18
+ Lutaml::Model::Config.xml_adapter_type || :nokogiri
19
+ builder = Builder.new(
20
+ adapter_type: adapter,
21
+ options: { encoding: "UTF-8" },
22
+ ) do |xml|
17
23
  xml.grammar(xmlns: "http://relaxng.org/ns/structure/1.0") do
18
24
  generate_start(xml, klass)
19
25
  generate_define(xml, klass, register)
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xml
5
+ module Schema
6
+ module Xsd
7
+ # XSD 1.1 conditional type assignment — a type alternative on an
8
+ # element declaration, selected by an XPath test (#1203).
9
+ class Alternative < Base
10
+ attribute :id, :string
11
+ attribute :test, :string
12
+ attribute :type, :string
13
+ attribute :xpath_default_namespace, :string
14
+ attribute :annotation, :annotation
15
+
16
+ xml do
17
+ element "alternative"
18
+ mixed_content
19
+ namespace Lutaml::Xml::Schema::XsdNamespace
20
+
21
+ map_attribute :id, to: :id
22
+ map_attribute :test, to: :test
23
+ map_attribute :type, to: :type
24
+ map_attribute :xpathDefaultNamespace, to: :xpath_default_namespace
25
+ map_element :annotation, to: :annotation
26
+ end
27
+
28
+ Lutaml::Xml::Schema::Xsd.register_model(self, :alternative)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xml
5
+ module Schema
6
+ module Xsd
7
+ # XSD 1.1 assertion — an XPath predicate evaluated against the
8
+ # owning complex type's instance (#1203).
9
+ class Assert < Base
10
+ attribute :id, :string
11
+ attribute :test, :string
12
+ attribute :xpath_default_namespace, :string
13
+ attribute :annotation, :annotation
14
+
15
+ xml do
16
+ element "assert"
17
+ mixed_content
18
+ namespace Lutaml::Xml::Schema::XsdNamespace
19
+
20
+ map_attribute :id, to: :id
21
+ map_attribute :test, to: :test
22
+ map_attribute :xpathDefaultNamespace, to: :xpath_default_namespace
23
+ map_element :annotation, to: :annotation
24
+ end
25
+
26
+ Lutaml::Xml::Schema::Xsd.register_model(self, :assert)
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -10,6 +10,8 @@ module Lutaml
10
10
  AnyAttribute
11
11
  Annotation
12
12
  Attribute
13
+ Assert
14
+ OpenContent
13
15
  ].freeze
14
16
 
15
17
  attribute :id, :string
@@ -26,6 +28,9 @@ module Lutaml
26
28
  attribute :annotation, :annotation
27
29
  attribute :simple_content, :simple_content
28
30
  attribute :complex_content, :complex_content
31
+ attribute :assert, :assert, collection: true,
32
+ initialize_empty: true
33
+ attribute :open_content, :open_content
29
34
  attribute :attribute, :attribute, collection: true,
30
35
  initialize_empty: true
31
36
  attribute :attribute_group, :attribute_group, collection: true,
@@ -54,6 +59,8 @@ module Lutaml
54
59
  map_element :anyAttribute, to: :any_attribute
55
60
  map_element :simpleContent, to: :simple_content
56
61
  map_element :complexContent, to: :complex_content
62
+ map_element :assert, to: :assert
63
+ map_element :openContent, to: :open_content
57
64
  end
58
65
 
59
66
  liquid do
@@ -25,6 +25,8 @@ module Lutaml
25
25
  attribute :key, :key, collection: true, initialize_empty: true
26
26
  attribute :keyref, :keyref, collection: true, initialize_empty: true
27
27
  attribute :unique, :unique, collection: true, initialize_empty: true
28
+ attribute :alternative, :alternative, collection: true,
29
+ initialize_empty: true
28
30
 
29
31
  xml do
30
32
  element "element"
@@ -51,6 +53,7 @@ module Lutaml
51
53
  map_element :keyref, to: :keyref
52
54
  map_element :unique, to: :unique
53
55
  map_element :key, to: :key
56
+ map_element :alternative, to: :alternative
54
57
  end
55
58
 
56
59
  liquid do
@@ -12,6 +12,8 @@ module Lutaml
12
12
  attribute :choice, :choice
13
13
  attribute :sequence, :sequence
14
14
  attribute :annotation, :annotation
15
+ attribute :assert, :assert, collection: true,
16
+ initialize_empty: true
15
17
  attribute :any_attribute, :any_attribute
16
18
  attribute :attribute, :attribute, collection: true,
17
19
  initialize_empty: true
@@ -31,6 +33,7 @@ module Lutaml
31
33
  map_element :sequence, to: :sequence
32
34
  map_element :attribute, to: :attribute
33
35
  map_element :annotation, to: :annotation
36
+ map_element :assert, to: :assert
34
37
  map_element :anyAttribute, to: :any_attribute
35
38
  map_element :attributeGroup, to: :attribute_group
36
39
  end
@@ -8,6 +8,8 @@ module Lutaml
8
8
  attribute :id, :string
9
9
  attribute :base, :string
10
10
  attribute :annotation, :annotation
11
+ attribute :assert, :assert, collection: true,
12
+ initialize_empty: true
11
13
  attribute :any_attribute, :any_attribute
12
14
  attribute :attribute, :attribute, collection: true,
13
15
  initialize_empty: true
@@ -23,6 +25,7 @@ module Lutaml
23
25
  map_attribute :base, to: :base
24
26
  map_element :attribute, to: :attribute
25
27
  map_element :annotation, to: :annotation
28
+ map_element :assert, to: :assert
26
29
  map_element :anyAttribute, to: :any_attribute
27
30
  map_element :attributeGroup, to: :attribute_group
28
31
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lutaml
4
+ module Xml
5
+ module Schema
6
+ module Xsd
7
+ # XSD 1.1 open content — relaxes the owning complex type's content
8
+ # model to admit foreign-namespace elements (mode: interleave or
9
+ # suffix) (#1203).
10
+ class OpenContent < Base
11
+ attribute :id, :string
12
+ attribute :mode, :string
13
+ attribute :annotation, :annotation
14
+
15
+ xml do
16
+ element "openContent"
17
+ mixed_content
18
+ namespace Lutaml::Xml::Schema::XsdNamespace
19
+
20
+ map_attribute :id, to: :id
21
+ map_attribute :mode, to: :mode
22
+ map_element :annotation, to: :annotation
23
+ end
24
+
25
+ Lutaml::Xml::Schema::Xsd.register_model(self, :open_content)
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -12,6 +12,8 @@ module Lutaml
12
12
  attribute :choice, :choice
13
13
  attribute :sequence, :sequence
14
14
  attribute :annotation, :annotation
15
+ attribute :assert, :assert, collection: true,
16
+ initialize_empty: true
15
17
  attribute :any_attribute, :any_attribute
16
18
  attribute :attribute, :attribute, collection: true,
17
19
  initialize_empty: true
@@ -31,6 +33,7 @@ module Lutaml
31
33
  map_element :sequence, to: :sequence
32
34
  map_element :attribute, to: :attribute
33
35
  map_element :annotation, to: :annotation
36
+ map_element :assert, to: :assert
34
37
  map_element :anyAttribute, to: :any_attribute
35
38
  map_element :attributeGroup, to: :attribute_group
36
39
  end
@@ -8,6 +8,8 @@ module Lutaml
8
8
  attribute :id, :string
9
9
  attribute :base, :string
10
10
  attribute :annotation, :annotation
11
+ attribute :assert, :assert, collection: true,
12
+ initialize_empty: true
11
13
  attribute :simple_type, :simple_type
12
14
  attribute :any_attribute, :any_attribute
13
15
  attribute :length, :length, collection: true, initialize_empty: true
@@ -56,6 +58,7 @@ module Lutaml
56
58
  map_element :simpleType, to: :simple_type
57
59
  map_element :whiteSpace, to: :white_space
58
60
  map_element :annotation, to: :annotation
61
+ map_element :assert, to: :assert
59
62
  map_element :maxLength, to: :max_length
60
63
  map_element :minLength, to: :min_length
61
64
  map_element :attribute, to: :attribute
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "nokogiri"
4
-
5
3
  module Lutaml
6
4
  module Xml
7
5
  module Schema
@@ -89,7 +87,7 @@ module Lutaml
89
87
  # @param content [String] XML content to analyze
90
88
  # @return [String] Detected version ("1.0" or "1.1")
91
89
  def self.detect_version(content)
92
- doc = ::Nokogiri::XML(content)
90
+ doc = parse_context.parse(content)
93
91
  root = doc.root
94
92
  return "1.0" unless root
95
93
 
@@ -105,13 +103,23 @@ module Lutaml
105
103
  "1.0"
106
104
  end
107
105
  end
108
- rescue ::Nokogiri::XML::SyntaxError
106
+ rescue Moxml::ParseError
109
107
  "1.0" # Default to 1.0 if cannot parse
110
108
  end
111
109
 
110
+ # The configured engine as a moxml backend symbol. Config's
111
+ # plain symbol — NOT the AdapterResolver's configured type,
112
+ # whose FIXED_ADAPTER_TYPE sentinel is internal and must
113
+ # never reach Moxml (the closed #1183 leak). Not memoized:
114
+ # the backend follows the CURRENT config (hosts and suites
115
+ # switch adapters mid-process); construction is cheap.
116
+ def self.parse_context
117
+ Moxml.new(Lutaml::Model::Config.xml_adapter_type || :nokogiri)
118
+ end
119
+
112
120
  # Check if document has XSD 1.1 specific features
113
121
  #
114
- # @param doc [Nokogiri::XML::Document] Parsed XML document
122
+ # @param doc [Moxml::Document] Parsed XML document
115
123
  # @return [Boolean] true if XSD 1.1 features are present
116
124
  def self.has_xsd_1_1_features?(doc)
117
125
  # Check for XSD 1.1 specific elements
@@ -152,25 +160,25 @@ module Lutaml
152
160
  # @param content [String] XML content to validate
153
161
  # @raise [SchemaValidationError] if XML syntax is invalid
154
162
  def validate_xml_syntax(content)
155
- ::Nokogiri::XML(content, &:strict)
156
- rescue ::Nokogiri::XML::SyntaxError => e
163
+ self.class.parse_context.parse(content, strict: true)
164
+ rescue Moxml::ParseError => e
157
165
  raise SchemaValidationError, "Invalid XML syntax: #{e.message}"
158
166
  end
159
167
 
160
168
  # Parse XML with error handling
161
169
  #
162
170
  # @param content [String] XML content to parse
163
- # @return [::Nokogiri::XML::Document] Parsed document
171
+ # @return [Moxml::Document] Parsed document
164
172
  # @raise [SchemaValidationError] if parsing fails
165
173
  def parse_xml(content)
166
- ::Nokogiri::XML(content)
167
- rescue ::Nokogiri::XML::SyntaxError => e
174
+ self.class.parse_context.parse(content)
175
+ rescue Moxml::ParseError => e
168
176
  raise SchemaValidationError, "Failed to parse XML: #{e.message}"
169
177
  end
170
178
 
171
179
  # Validate that root element is xs:schema
172
180
  #
173
- # @param doc [Nokogiri::XML::Document] Parsed XML document
181
+ # @param doc [Moxml::Document] Parsed XML document
174
182
  # @raise [SchemaValidationError] if root element is not a valid schema element
175
183
  def validate_schema_root(doc)
176
184
  root = doc.root
@@ -188,7 +196,7 @@ module Lutaml
188
196
  end
189
197
 
190
198
  # Check if root element has the correct namespace
191
- namespace_uri = root.namespace&.href
199
+ namespace_uri = root.namespace&.uri
192
200
  return if namespace_uri == XSD_NAMESPACE
193
201
 
194
202
  if namespace_uri.nil?
@@ -204,7 +212,7 @@ module Lutaml
204
212
 
205
213
  # Validate schema version compatibility
206
214
  #
207
- # @param doc [Nokogiri::XML::Document] Parsed XML document
215
+ # @param doc [Moxml::Document] Parsed XML document
208
216
  # @raise [SchemaValidationError] if schema uses features incompatible with target version
209
217
  def validate_schema_version(doc)
210
218
  return if @version == "1.1" # 1.1 accepts all features
@@ -221,7 +229,7 @@ module Lutaml
221
229
 
222
230
  # Detect which XSD 1.1 features are present
223
231
  #
224
- # @param doc [Nokogiri::XML::Document] Parsed XML document
232
+ # @param doc [Moxml::Document] Parsed XML document
225
233
  # @return [Array<String>] List of detected XSD 1.1 features
226
234
  def detect_1_1_features(doc)
227
235
  features = []
@@ -28,15 +28,16 @@ module Lutaml
28
28
  # List of all XSD model classes that need to be autoloaded and registered.
29
29
  # This is used in parse() to ensure all types are registered before parsing.
30
30
  XSD_AUTOLOAD_CLASSES = %i[
31
- All Annotation Any AnyAttribute Appinfo Attribute AttributeGroup
32
- Choice ComplexContent ComplexType Documentation Element Enumeration
33
- ExtensionComplexContent ExtensionSimpleContent Field FractionDigits
34
- Glob Group Import Include Key Keyref Length List MaxExclusive
35
- MaxInclusive MaxLength MinExclusive MinInclusive MinLength
36
- Notation Pattern Redefine RestrictionComplexContent
37
- RestrictionSimpleContent RestrictionSimpleType Schema SchemaPath
38
- Selector Sequence SimpleContent SimpleType TotalDigits Union Unique
39
- WhiteSpace SchemaFileValidationResults
31
+ All Alternative Annotation Any AnyAttribute Appinfo Assert Attribute
32
+ AttributeGroup Choice ComplexContent ComplexType Documentation
33
+ Element Enumeration ExtensionComplexContent ExtensionSimpleContent
34
+ Field FractionDigits Glob Group Import Include Key Keyref Length List
35
+ MaxExclusive MaxInclusive MaxLength MinExclusive MinInclusive
36
+ MinLength Notation OpenContent Pattern Redefine
37
+ RestrictionComplexContent RestrictionSimpleContent
38
+ RestrictionSimpleType Schema SchemaPath Selector Sequence SimpleContent
39
+ SimpleType TotalDigits Union Unique WhiteSpace
40
+ SchemaFileValidationResults
40
41
  ].freeze
41
42
 
42
43
  # Autoload all XSD model files (lazy loading)
@@ -57,10 +58,12 @@ module Lutaml
57
58
  autoload :SerializedSchema, "#{__dir__}/xsd/serialized_schema"
58
59
  autoload :SchemaNameResolver, "#{__dir__}/xsd/schema_name_resolver"
59
60
  autoload :All, "#{__dir__}/xsd/all"
61
+ autoload :Alternative, "#{__dir__}/xsd/alternative"
60
62
  autoload :Annotation, "#{__dir__}/xsd/annotation"
61
63
  autoload :Any, "#{__dir__}/xsd/any"
62
64
  autoload :AnyAttribute, "#{__dir__}/xsd/any_attribute"
63
65
  autoload :Appinfo, "#{__dir__}/xsd/appinfo"
66
+ autoload :Assert, "#{__dir__}/xsd/assert"
64
67
  autoload :Attribute, "#{__dir__}/xsd/attribute"
65
68
  autoload :AttributeGroup, "#{__dir__}/xsd/attribute_group"
66
69
  autoload :Choice, "#{__dir__}/xsd/choice"
@@ -73,6 +76,7 @@ module Lutaml
73
76
  "#{__dir__}/xsd/extension_complex_content"
74
77
  autoload :ExtensionSimpleContent,
75
78
  "#{__dir__}/xsd/extension_simple_content"
79
+ autoload :OpenContent, "#{__dir__}/xsd/open_content"
76
80
  autoload :Field, "#{__dir__}/xsd/field"
77
81
  autoload :FractionDigits, "#{__dir__}/xsd/fraction_digits"
78
82
  autoload :Glob, "#{__dir__}/xsd/glob"
@@ -786,23 +786,81 @@ skip_unmapped: false)
786
786
  end
787
787
 
788
788
  def self.reject_invalid_xsd_pattern!(regexp, source)
789
- return unless defined?(::Nokogiri::XML::Schema)
790
-
791
- probe = <<~XSD
792
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
793
- <xs:simpleType name="p">
794
- <xs:restriction base="xs:string">
795
- <xs:pattern value="#{xsd_escape(source)}"/>
796
- </xs:restriction>
797
- </xs:simpleType>
798
- </xs:schema>
799
- XSD
800
- schema = ::Nokogiri::XML::Schema(probe)
801
- return if schema.errors.empty?
802
-
803
- raise_inexpressible_pattern!(regexp, schema.errors.first.message)
804
- rescue ::Nokogiri::XML::SyntaxError => e
805
- raise_inexpressible_pattern!(regexp, e.message)
789
+ detail = structural_xsd_incompatibility(source)
790
+ return unless detail
791
+
792
+ raise_inexpressible_pattern!(regexp, detail)
793
+ end
794
+
795
+ # The structural probe for XSD's regexp subset (issue #1184).
796
+ # The constructs Ruby's engine adds beyond XSD 1.0's —
797
+ # lookaround, atomic groups, conditionals, backreferences,
798
+ # possessive/lazy quantifiers, \G — are detected
799
+ # syntactically: a compile probe cannot vouch for
800
+ # expressibility on every engine, because moxml lanes compile
801
+ # inexpressible patterns silently (and lanes without a
802
+ # validator never probed at all). Escapes are honored
803
+ # pair-wise and character classes are skipped wholesale
804
+ # (their interiors are literal XSD text).
805
+ def self.structural_xsd_incompatibility(source)
806
+ i = 0
807
+ len = source.length
808
+ while i < len
809
+ ch = source[i]
810
+ if ch == "\\"
811
+ nxt = source[i + 1]
812
+ return "the backreference \\#{nxt}" if nxt && ("1".."9").cover?(nxt)
813
+ return "the \\G anchor" if nxt == "G"
814
+ return "a \\k backreference" if nxt == "k"
815
+
816
+ i += 2
817
+ next
818
+ end
819
+ if ch == "["
820
+ # char class: `]` right after `[` / `[^` is literal
821
+ j = i + 1
822
+ j += 1 if source[j] == "^"
823
+ j += 1 if source[j] == "]"
824
+ while j < len && source[j] != "]"
825
+ j += 2 if source[j] == "\\"
826
+ j += 1
827
+ end
828
+ i = j + 1
829
+ next
830
+ end
831
+ if ch == "("
832
+ rest = source[i, 4]
833
+ return "a lookaround" if rest.start_with?("(?=", "(?!",
834
+ "(?<=", "(?<!")
835
+ return "an atomic group" if rest.start_with?("(?>")
836
+ return "a conditional" if rest.start_with?("(?(")
837
+
838
+ i += 1
839
+ next
840
+ end
841
+ if ch == "{"
842
+ j = i + 1
843
+ j += 1 while j < len && source[j] =~ /[0-9,]/
844
+ if source[j] == "}"
845
+ nxt = source[j + 1]
846
+ return "a possessive quantifier" if nxt == "+"
847
+ return "a lazy quantifier" if nxt == "?"
848
+
849
+ i = j + 1
850
+ next
851
+ end
852
+ i += 1
853
+ next
854
+ end
855
+ case ch
856
+ when "*", "+", "?"
857
+ nxt = source[i + 1]
858
+ return "a possessive quantifier" if nxt == "+"
859
+ return "a lazy quantifier" if nxt == "?"
860
+ end
861
+ i += 1
862
+ end
863
+ nil
806
864
  end
807
865
 
808
866
  UNSUPPORTED_XSD_REGEX_FLAGS =
@@ -2,6 +2,8 @@
2
2
 
3
3
  require "spec_helper"
4
4
  require "lutaml/model/schema"
5
+ require "open3"
6
+ require "rbconfig"
5
7
  require "tmpdir"
6
8
 
7
9
  # Runtime XSD-to-classes compilation (#251): Schema.from_xml compiles a
@@ -354,4 +356,122 @@ RSpec.describe "runtime XSD class loading" do
354
356
  expect(source).not_to include("instance_variable_set")
355
357
  end
356
358
  end
359
+
360
+ describe "XSD-compile then namespaced-instance hydration (#1204)" do
361
+ let(:base_xsd) do
362
+ <<~XSD
363
+ <?xml version="1.0" encoding="UTF-8"?>
364
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
365
+ targetNamespace="http://example.com/s102-base"
366
+ elementFormDefault="qualified">
367
+ <xs:complexType name="ImportedMetric">
368
+ <xs:sequence>
369
+ <xs:element name="name" type="xs:string" minOccurs="0"/>
370
+ <xs:element name="valueType" type="xs:string" minOccurs="0"/>
371
+ </xs:sequence>
372
+ </xs:complexType>
373
+ </xs:schema>
374
+ XSD
375
+ end
376
+
377
+ let(:main_xsd) do
378
+ <<~XSD
379
+ <?xml version="1.0" encoding="UTF-8"?>
380
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
381
+ xmlns:b="http://example.com/s102-base"
382
+ targetNamespace="http://example.com/s102-main"
383
+ elementFormDefault="qualified">
384
+ <xs:import namespace="http://example.com/s102-base"
385
+ schemaLocation="base.xsd"/>
386
+ <xs:complexType name="MetricSet">
387
+ <xs:sequence>
388
+ <xs:element name="metric" type="b:ImportedMetric"
389
+ maxOccurs="unbounded"/>
390
+ </xs:sequence>
391
+ </xs:complexType>
392
+ <xs:element name="root">
393
+ <xs:complexType>
394
+ <xs:sequence>
395
+ <xs:element name="name" type="xs:string"/>
396
+ <xs:element name="metrics" type="MetricSet" minOccurs="0"/>
397
+ </xs:sequence>
398
+ </xs:complexType>
399
+ </xs:element>
400
+ </xs:schema>
401
+ XSD
402
+ end
403
+
404
+ let(:instance_xml) do
405
+ <<~XML
406
+ <m:root xmlns:m="http://example.com/s102-main"
407
+ xmlns:b="http://example.com/s102-base">
408
+ <m:name>S-102</m:name>
409
+ <m:metrics>
410
+ <m:metric>
411
+ <b:name>depth</b:name>
412
+ <b:valueType>real</b:valueType>
413
+ </m:metric>
414
+ <m:metric>
415
+ <b:name>uncertainty</b:name>
416
+ <b:valueType>TVU</b:valueType>
417
+ </m:metric>
418
+ </m:metrics>
419
+ </m:root>
420
+ XML
421
+ end
422
+
423
+ let(:register_id) { :s102_hydration_reg }
424
+
425
+ it "reports the schema's target namespace for the namespace: option" do
426
+ expect(Lutaml::Model::Schema.target_namespace(main_xsd))
427
+ .to eq("http://example.com/s102-main")
428
+ end
429
+
430
+ # The compile→hydrate contract runs in a subprocess: the suite's
431
+ # per-example GlobalRegister reset wipes the metaschema registrations
432
+ # that self-register at class-file load, and no in-process re-sync
433
+ # restores the full parse-time state. A fresh process is the honest
434
+ # environment for the consumer-facing contract (#406 drives it).
435
+ it "hydrates a prefixed instance into the compiled root model" do
436
+ Dir.mktmpdir do |dir|
437
+ File.write(File.join(dir, "base.xsd"), base_xsd)
438
+ File.write(File.join(dir, "main.xsd"), main_xsd)
439
+ File.write(File.join(dir, "instance.xml"), instance_xml)
440
+
441
+ probe = <<~RUBY
442
+ require "lutaml/model"
443
+
444
+ Lutaml::Model::Schema.from_xml(
445
+ File.read("#{dir}/main.xsd"),
446
+ output_dir: "#{dir}/s102_models",
447
+ load_classes: true,
448
+ namespace: Lutaml::Model::Schema.target_namespace(
449
+ File.read("#{dir}/main.xsd"),
450
+ ),
451
+ module_namespace: "S102HydrationModels",
452
+ register_id: "#{register_id}",
453
+ location: "#{dir}/main.xsd",
454
+ )
455
+
456
+ parsed = S102HydrationModels::CTRoot
457
+ .from_xml(File.read("#{dir}/instance.xml"))
458
+
459
+ puts "name=\#{parsed.name.inspect}"
460
+ puts "value_types=\#{parsed.metrics.metric.map(&:value_type).inspect}"
461
+ puts "default_register=\#{Lutaml::Model::Config.default_register.inspect}"
462
+ RUBY
463
+
464
+ _stdout, stderr, status = Open3.capture3(RbConfig.ruby, "-I", "lib",
465
+ "-e", probe)
466
+ expect(status).to be_success, stderr
467
+
468
+ expect(_stdout).to include('name="S-102"')
469
+ # maxOccurs="unbounded" members hydrate as collections and the
470
+ # imported-schema scalar resolves through the derivation's
471
+ # register at parse time
472
+ expect(_stdout).to include('value_types=["real", "TVU"]')
473
+ expect(_stdout).to include("default_register=:default")
474
+ end
475
+ end
476
+ end
357
477
  end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+
5
+ RSpec.describe Lutaml::Xml::Schema::XsdSchema do
6
+ # issue #1184: the xs:pattern expressibility probe is structural —
7
+ # the constructs Ruby's engine adds beyond XSD 1.0's regexp are
8
+ # detected syntactically, on every lane (a compile probe cannot
9
+ # vouch where engines compile inexpressible patterns silently, and
10
+ # lanes without a validator never probed at all).
11
+ def probe(source)
12
+ described_class.reject_invalid_xsd_pattern!(/#{Regexp.escape(source)}/x, source)
13
+ end
14
+
15
+ shared_examples "inexpressible" do |source, detail|
16
+ it "rejects #{source.inspect}" do
17
+ expect { probe(source) }
18
+ .to raise_error(Lutaml::Model::Error, /not expressible.*#{detail}/)
19
+ end
20
+ end
21
+
22
+ it_behaves_like "inexpressible", "(?=.*[0-9])[a-z]+", "lookaround"
23
+ it_behaves_like "inexpressible", "a(?!b)", "lookaround"
24
+ it_behaves_like "inexpressible", "(?<=a)b", "lookaround"
25
+ it_behaves_like "inexpressible", "a(?>b|c)", "atomic"
26
+ it_behaves_like "inexpressible", "a(?(1)b|c)", "conditional"
27
+ it_behaves_like "inexpressible", "(a)\\1", "backreference"
28
+ it_behaves_like "inexpressible", "(?<word>a)\\k<word>", "backreference"
29
+ it_behaves_like "inexpressible", "a*+", "possessive quantifier"
30
+ it_behaves_like "inexpressible", "a{2,3}+", "possessive quantifier"
31
+ it_behaves_like "inexpressible", "a+?", "lazy quantifier"
32
+ it_behaves_like "inexpressible", "a*??", "lazy quantifier"
33
+ it_behaves_like "inexpressible", "\\Ga+", "anchor"
34
+
35
+ it "admits plain groups and quantifiers" do
36
+ expect { probe("[a-z]+(foo|bar)*baz?") }.not_to raise_error
37
+ end
38
+
39
+ it "does not false-positive on escapes or character classes" do
40
+ expect { probe("\\[\\d\\]") }.not_to raise_error
41
+ expect { probe("[a\\-z\\*+?]{2}") }.not_to raise_error
42
+ end
43
+ end
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+
5
+ RSpec.describe Lutaml::Xml::Schema::Builder do
6
+ # issue #1184: schema generation rides the CONFIGURED engine through
7
+ # the moxml layer. The dedicated Nokogiri/Oga wrappers keep their
8
+ # lanes; every other engine (ox, leptris, rexml) generates through
9
+ # the Moxml wrapper instead of silently substituting Nokogiri.
10
+
11
+ describe "engine-following selection" do
12
+ it "keeps the dedicated Nokogiri wrapper when Nokogiri is requested" do
13
+ builder = described_class.new(adapter_type: :nokogiri)
14
+
15
+ expect(builder.adapter_type).to eq(:nokogiri)
16
+ expect(builder.builder).to be_a(described_class::Nokogiri)
17
+ end
18
+
19
+ it "routes other configured engines through the Moxml wrapper" do
20
+ builder = described_class.new(adapter_type: :ox)
21
+
22
+ expect(builder.adapter_type).to eq(:ox)
23
+ expect(builder.builder).to be_a(described_class::Moxml)
24
+ end
25
+ end
26
+
27
+ describe "Moxml wrapper emission" do
28
+ let(:builder) do
29
+ described_class.new(adapter_type: :ox) do |xml|
30
+ xml.schema(targetNamespace: "http://example.com") do
31
+ xml.element(name: "name", type: "xs:string")
32
+ end
33
+ end
34
+ end
35
+
36
+ it "emits the XML declaration with the encoding" do
37
+ expect(builder.to_xml).to start_with("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
38
+ end
39
+
40
+ it "emits the nested schema DSL shape" do
41
+ xml = builder.to_xml
42
+
43
+ expect(xml).to include("<schema")
44
+ expect(xml).to include("targetNamespace=\"http://example.com\"")
45
+ # the empty-element form is lane-serialized; both forms are
46
+ # model-legal XML — the DSL shape is what parity binds here
47
+ expect(xml).to match(/<element name="name" type="xs:string"\s*\/?>(<\/element>)?/)
48
+ end
49
+
50
+ it "honors the pretty option" do
51
+ expect(builder.to_xml(pretty: true)).to include("\n")
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,120 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "spec_helper"
4
+
5
+ RSpec.describe "XSD 1.1 constructs (#1203)" do
6
+ it "maps xs:assert on a complexType from the parsed XSD" do
7
+ xsd = <<~XSD
8
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
9
+ <xs:complexType name="t">
10
+ <xs:sequence>
11
+ <xs:element name="a" maxOccurs="unbounded"/>
12
+ </xs:sequence>
13
+ <xs:assert test="count(xs:a) &gt; 1"
14
+ xpathDefaultNamespace="##targetNamespace"/>
15
+ </xs:complexType>
16
+ </xs:schema>
17
+ XSD
18
+
19
+ schema = Lutaml::Xml::Schema::Xsd.parse(xsd)
20
+ assert = schema.complex_type.first.assert.first
21
+
22
+ expect(assert).not_to be_nil
23
+ expect(assert.test).to eq("count(xs:a) > 1")
24
+ expect(assert.xpath_default_namespace).to eq("##targetNamespace")
25
+ end
26
+
27
+ it "maps xs:assert inside simpleContent and complexContent " \
28
+ "derivations" do
29
+ xsd = <<~XSD
30
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
31
+ <xs:complexType name="simple">
32
+ <xs:simpleContent>
33
+ <xs:extension base="xs:string">
34
+ <xs:assert test="string-length(.) &gt; 0"/>
35
+ </xs:extension>
36
+ </xs:simpleContent>
37
+ </xs:complexType>
38
+ <xs:complexType name="complex">
39
+ <xs:complexContent>
40
+ <xs:restriction base="xs:anyType">
41
+ <xs:assert test="true()"/>
42
+ </xs:restriction>
43
+ </xs:complexContent>
44
+ </xs:complexType>
45
+ </xs:schema>
46
+ XSD
47
+
48
+ schema = Lutaml::Xml::Schema::Xsd.parse(xsd)
49
+ simple = schema.complex_type.find { |t| t.name == "simple" }
50
+ complex = schema.complex_type.find { |t| t.name == "complex" }
51
+
52
+ expect(simple.simple_content.extension.assert.first.test)
53
+ .to eq("string-length(.) > 0")
54
+ expect(complex.complex_content.restriction.assert.first.test)
55
+ .to eq("true()")
56
+ end
57
+
58
+ it "maps xs:openContent on a complexType" do
59
+ xsd = <<~XSD
60
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
61
+ <xs:complexType name="t">
62
+ <xs:sequence>
63
+ <xs:element name="a"/>
64
+ </xs:sequence>
65
+ <xs:openContent mode="suffix"/>
66
+ </xs:complexType>
67
+ </xs:schema>
68
+ XSD
69
+
70
+ schema = Lutaml::Xml::Schema::Xsd.parse(xsd)
71
+ open_content = schema.complex_type.first.open_content
72
+
73
+ expect(open_content).not_to be_nil
74
+ expect(open_content.mode).to eq("suffix")
75
+ end
76
+
77
+ it "maps xs:alternative on an element declaration" do
78
+ xsd = <<~XSD
79
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
80
+ <xs:element name="shape">
81
+ <xs:alternative test="@kind='circle'" type="CircleType"
82
+ xpathDefaultNamespace="##targetNamespace"/>
83
+ <xs:alternative type="DefaultType"/>
84
+ </xs:element>
85
+ </xs:schema>
86
+ XSD
87
+
88
+ schema = Lutaml::Xml::Schema::Xsd.parse(xsd)
89
+ alternatives = schema.element.first.alternative
90
+
91
+ expect(alternatives.map(&:type)).to eq(%w[CircleType DefaultType])
92
+ expect(alternatives.first.test).to eq("@kind='circle'")
93
+ expect(alternatives.first.xpath_default_namespace)
94
+ .to eq("##targetNamespace")
95
+ end
96
+
97
+ it "round-trips the constructs through to_xml" do
98
+ xsd = <<~XSD
99
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
100
+ <xs:complexType name="t">
101
+ <xs:openContent mode="interleave"/>
102
+ <xs:assert test="true()"/>
103
+ </xs:complexType>
104
+ <xs:element name="e">
105
+ <xs:alternative test="@k='v'" type="T"/>
106
+ </xs:element>
107
+ </xs:schema>
108
+ XSD
109
+
110
+ schema = Lutaml::Xml::Schema::Xsd.parse(xsd)
111
+ emitted = schema.to_xml
112
+
113
+ expect(emitted).to include("<xs:assert")
114
+ expect(emitted).to include('test="true()"')
115
+ expect(emitted).to include("<xs:openContent")
116
+ expect(emitted).to include('mode="interleave"')
117
+ expect(emitted).to include("<xs:alternative")
118
+ expect(emitted).to include('type="T"')
119
+ end
120
+ end
data/spec/spec_helper.rb CHANGED
@@ -33,6 +33,21 @@ RSpec.configure do |config|
33
33
  Lutaml::Model::GlobalRegister.instance.reset if defined?(Lutaml::Model::GlobalRegister)
34
34
  end
35
35
 
36
+ # Restore the configured XML adapter after each example:
37
+ # adapter-switching specs set Config.xml_adapter_type directly and
38
+ # the drift used to leak into later specs. The moxml-routed XSD
39
+ # machinery follows the CURRENT config by design (#1184), which
40
+ # turned that leak into order-dependent schema-suite failures —
41
+ # the restore pins every example back to the spec_helper default.
42
+ config.around do |example|
43
+ previous = Lutaml::Model::Config.xml_adapter_type
44
+ begin
45
+ example.run
46
+ ensure
47
+ Lutaml::Model::Config.xml_adapter_type = previous if previous
48
+ end
49
+ end
50
+
36
51
  # Reset adapter state between adapter-switching tests
37
52
  config.after(:each, :adapter_test) do
38
53
  Lutaml::Model::AdapterScope.reset! if defined?(Lutaml::Model::AdapterScope)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.182
4
+ version: 0.8.184
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-25 00:00:00.000000000 Z
11
+ date: 2026-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -876,16 +876,19 @@ files:
876
876
  - lib/lutaml/xml/rexml/element.rb
877
877
  - lib/lutaml/xml/schema.rb
878
878
  - lib/lutaml/xml/schema/builder.rb
879
+ - lib/lutaml/xml/schema/builder/moxml.rb
879
880
  - lib/lutaml/xml/schema/builder/nokogiri.rb
880
881
  - lib/lutaml/xml/schema/builder/oga.rb
881
882
  - lib/lutaml/xml/schema/builtin_types.rb
882
883
  - lib/lutaml/xml/schema/relaxng_schema.rb
883
884
  - lib/lutaml/xml/schema/xsd.rb
884
885
  - lib/lutaml/xml/schema/xsd/all.rb
886
+ - lib/lutaml/xml/schema/xsd/alternative.rb
885
887
  - lib/lutaml/xml/schema/xsd/annotation.rb
886
888
  - lib/lutaml/xml/schema/xsd/any.rb
887
889
  - lib/lutaml/xml/schema/xsd/any_attribute.rb
888
890
  - lib/lutaml/xml/schema/xsd/appinfo.rb
891
+ - lib/lutaml/xml/schema/xsd/assert.rb
889
892
  - lib/lutaml/xml/schema/xsd/attribute.rb
890
893
  - lib/lutaml/xml/schema/xsd/attribute_group.rb
891
894
  - lib/lutaml/xml/schema/xsd/base.rb
@@ -924,6 +927,7 @@ files:
924
927
  - lib/lutaml/xml/schema/xsd/namespace_mapping.rb
925
928
  - lib/lutaml/xml/schema/xsd/namespace_uri_remapping.rb
926
929
  - lib/lutaml/xml/schema/xsd/notation.rb
930
+ - lib/lutaml/xml/schema/xsd/open_content.rb
927
931
  - lib/lutaml/xml/schema/xsd/pattern.rb
928
932
  - lib/lutaml/xml/schema/xsd/redefine.rb
929
933
  - lib/lutaml/xml/schema/xsd/restriction_complex_content.rb
@@ -1883,6 +1887,7 @@ files:
1883
1887
  - spec/lutaml/model/schema/renderers/restricted_type_spec.rb
1884
1888
  - spec/lutaml/model/schema/renderers/union_spec.rb
1885
1889
  - spec/lutaml/model/schema/xml_compiler_runtime_spec.rb
1890
+ - spec/lutaml/model/schema/xsd_pattern_probe_spec.rb
1886
1891
  - spec/lutaml/model/schema/xsd_schema_spec.rb
1887
1892
  - spec/lutaml/model/schema/yaml_schema_spec.rb
1888
1893
  - spec/lutaml/model/sequence_choice_compositor_spec.rb
@@ -2096,6 +2101,7 @@ files:
2096
2101
  - spec/lutaml/xml/reusable_mapping_spec.rb
2097
2102
  - spec/lutaml/xml/reused_elements_namespace_spec.rb
2098
2103
  - spec/lutaml/xml/root_mappings/nested_child_mappings_spec.rb
2104
+ - spec/lutaml/xml/schema/builder_moxml_spec.rb
2099
2105
  - spec/lutaml/xml/schema/compiler_spec.rb
2100
2106
  - spec/lutaml/xml/schema/facet_round_trip_spec.rb
2101
2107
  - spec/lutaml/xml/schema/rnc_compiler_spec.rb
@@ -2126,6 +2132,7 @@ files:
2126
2132
  - spec/lutaml/xml/schema/xsd/unresolvable_schema_location_spec.rb
2127
2133
  - spec/lutaml/xml/schema/xsd/validation_error_spec.rb
2128
2134
  - spec/lutaml/xml/schema/xsd/validation_result_spec.rb
2135
+ - spec/lutaml/xml/schema/xsd/xsd_11_constructs_spec.rb
2129
2136
  - spec/lutaml/xml/schema/xsd/xsd_spec.rb
2130
2137
  - spec/lutaml/xml/schema_primer_spec.rb
2131
2138
  - spec/lutaml/xml/serializable_namespace_spec.rb