lutaml-xsd 1.2.109 → 1.2.110

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: 1b72159d7cf64cd93b73f0cc4e9801dfa46c57b4aba669421395ae0faa88cc6d
4
- data.tar.gz: c6b1f7d7ecf76b6d9deb32ec13a261d70c87d7292c01be0f61e9b5ed0a1d0646
3
+ metadata.gz: 16069a6293538146b585e29cf696a42e1294e9f8c211d075bcc8f03f44adcb8f
4
+ data.tar.gz: 1049c160550ac6905f09ecc512e06536137d9d4b13cade090cc83fc24b9c355c
5
5
  SHA512:
6
- metadata.gz: 6cfc032057ed3bbf9048ae3f0a8b8f9ff2b75eed8553e323089e3c79c1918ae883d3d16dd5dfb352e2f6ee63f2fee409865cbb93e7af36ed49d9ea41c9b1814f
7
- data.tar.gz: d140656abba61dd935ae4ecc166d8f0dafa612d65a011c9acc56cf17e59393381dbcc5fe6888431094255e4b0762546da3f8320651c36fb3bd0eb01dc54d3585
6
+ metadata.gz: 95556f997483a0c1b5b606c0047c7cfcb39f75b3dae29350a61b4613d78cfa7ec7c961fa4f6fe040e84000110aa92b1b87203cdb94cebcbc580ca6055f65c389
7
+ data.tar.gz: 689fa0a66e8cf18fe44bdaa7081095e631a1b49e6d67d44ba0f49edc6fcf1aaf35f5458ac0d12b901be4435240ecf9cd429b2b2bc7ff42dd94366dee3995db00
data/TODO.conformance.md CHANGED
@@ -546,6 +546,20 @@ tuple keys, node-set field violations and absent-field rows handled, cross-eleme
546
546
  and the schG1/G4/G7 drift (fail in fresh isolation on origin/main
547
547
  stash-verified — inputs/gems/ruby verified identical to the 4641
548
548
  era; mechanism not isolated in-round; owner follow-up).
549
+ - NESTED-TYPE-CANDIDATES ROUND (2026-11-11): +2 (schG2 — a baseline
550
+ parked failure — and the schG1/G4/G7 "drift" trio resolved as REAL
551
+ DEFECTS, not environment: named_type_candidates appended only ONE
552
+ nested candidate per root schema — find_nested_named_type returned
553
+ the first depth-first match and stopped, so a composition importing
554
+ same-named types two levels deep (schG1: a→b→c) NEVER listed the
555
+ deepest candidate; the owner-ns preference missed and list.first
556
+ (ns-a's ct-A) typed the ns-c element — the '123'-is-not-boolean
557
+ swap. find_nested_named_types now collects EVERY match across the
558
+ whole nested tree in document order). SUITE 4637/4696 measured +
559
+ 5 budget exclusions (reZ nested-repeat, unchanged), ZERO
560
+ regressions (stash-attributed per row), rspec 1663 green,
561
+ rubocop clean. schR2 stack-overflow note unchanged (crash masked
562
+ by expected-invalid, counted per convention).
549
563
  - SCH R2 STACK OVERFLOW (2026-11-11): Schema_w3c/schR2/schR2.i
550
564
  (expected invalid) crashes the assessment with a SystemStackError
551
565
  in lutaml-model 0.8.167's Base#resolved_element_order/
@@ -290,8 +290,8 @@ module Lutaml
290
290
  end
291
291
  list << found if found
292
292
 
293
- nested = find_nested_named_type(local_name, schema)
294
- list << nested if nested
293
+ nested = find_nested_named_types(local_name, schema)
294
+ list.concat(nested)
295
295
  end
296
296
  unless @redefined_body_names.include?(local_name)
297
297
  @redefined_targets.each do |schema|
@@ -307,16 +307,18 @@ module Lutaml
307
307
  cache[local_name] = list.uniq
308
308
  end
309
309
 
310
- # Named types declared in documents reached through resolved
311
- # includes/imports — chameleon types (ctE018) live in a
312
- # no-namespace include target.
310
+ # EVERY same-named type across the whole nested include/import
311
+ # tree, in document order. The single-match walk stopped at the
312
+ # FIRST hit (schG1: ns-b's ct-A shadowed ns-c's two imports
313
+ # deep, so the owner-ns preference missed and ns-a's type won
314
+ # for the ns-c element — a same-local-name swap).
313
315
  #
314
- # @return [Object, nil]
315
- def find_nested_named_type(local_name, schema, depth = 0)
316
- return nil if depth > 8
316
+ # @return [Array<Object>]
317
+ def find_nested_named_types(local_name, schema, depth = 0)
318
+ return [] if depth > 8
317
319
 
318
- (Array(schema.include) + Array(schema.import)).each do |nested|
319
- next unless nested.is_a?(Lutaml::Xml::Schema::Xsd::Schema)
320
+ (Array(schema.include) + Array(schema.import)).flat_map do |nested|
321
+ next [] unless nested.is_a?(Lutaml::Xml::Schema::Xsd::Schema)
320
322
 
321
323
  found = Array(nested.complex_type).find do |ct|
322
324
  ct.name == local_name
@@ -324,12 +326,9 @@ module Lutaml
324
326
  found ||= Array(nested.simple_type).find do |st|
325
327
  st.name == local_name
326
328
  end
327
- return found if found
328
-
329
- found = find_nested_named_type(local_name, nested, depth + 1)
330
- return found if found
329
+ [found, *find_nested_named_types(local_name, nested, depth + 1)]
330
+ .compact
331
331
  end
332
- nil
333
332
  end
334
333
 
335
334
  # Builtin numeric types: values compare in the numeric value
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Xsd
5
- VERSION = "1.2.109"
5
+ VERSION = "1.2.110"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-xsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.109
4
+ version: 1.2.110
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.