lutaml-xsd 1.2.90 → 1.2.91

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: 455a2b544740a5953b1d2195962d89a3b549c8daa3b97c97b8bc8a9739bec815
4
- data.tar.gz: 5157237514326ad902236ce4a3f2f67940680ef8a3e0f2a080d3012a2ee6c6c1
3
+ metadata.gz: 2e393ac1e891791490925386f06e9f862e04287ab8866248e63075bcb22c16db
4
+ data.tar.gz: 383756510350cd3d61ffe29751e5ff06985efb4fab626c91e218db1546976bd8
5
5
  SHA512:
6
- metadata.gz: 539801642fef0b0625c6d647305411294f71164f0ebc49b92993895b473784112aafde653b46cc87f32d3b278dc71a7eed6468b366343a1731bd51304102814a
7
- data.tar.gz: 00413b4b3e957a333d13285ad87219cdec576d7ac135dbc7d8561aee6f41b3bd613338910b4b366622805e685c7c34cbb204b6bfbc74376bee5c5b3424e2723c
6
+ metadata.gz: bd0a4bb5ccb6da00c0adb3eb0f7621e45c431bcaa0cfdaa2d8c47e5775a411b77eff718a47b6b2ee5dd357ec8bb890b541589c6ba557b9e80af3ed0d3fc8aecd
7
+ data.tar.gz: 2a0a5ca5c6da7a35161eacf0a40bd1c4b8e50297d9659e6b696478edc6cecebebf6725d1ba70974978f43e5286ff4d2e0a4fdd85ba4e83535ebe7c2b7d1cabf3
data/TODO.conformance.md CHANGED
@@ -238,6 +238,9 @@ corners.
238
238
  | mixed="true" on a particle-less complexType rejects text (ctA033/ctA035) | 2 | leptris-rs#35 (sub 2) |
239
239
  | xs:redefine composition compiles to an EMPTY content model (idF025/033/034, idG018/019/027/028) | 7 | leptris-rs#35 (sub 3) |
240
240
  | Default-supplied content on an empty list-typed element (stZ072) | 1 | leptris-rs#35 (sub 4) |
241
+ | Fixed+empty ROOT-content legs (stE050, stE055) — survivors of the #25/#35 wave | 2 | leptris-rs#45 |
242
+ | Substitution member bound to a same-name local of another type (elemZ020) — survivor of #29 | 1 | leptris-rs#46 |
243
+ | Parsed schemas discard xmlns prefix maps — qualified QName resolution impossible (particlesQ032 class) | 1+ | lutaml-model#1131 |
241
244
  | Fixed + empty ATTRIBUTE values still rejected — the #25 attribute leg (addB104, attO006) | 2 | leptris-rs#36 |
242
245
  | Content model enforced on NILLED elements (QFE1700g2, particlesIa002) | 2 | leptris-rs#26 |
243
246
  | dateTime enumeration rejects timezone-equal forms (dateTime_enumeration005a/b) | 2 | leptris-rs#27 |
@@ -58,6 +58,13 @@ module Lutaml
58
58
  # the lenient unresolvable path (idF/idG/idH class).
59
59
  @redefined_targets = []
60
60
  @redefined_body_names = []
61
+ # Redefine SIMPLE-type bodies: the body is the effective type
62
+ # for every reference to the name (§4.2.2 — redefine modifies
63
+ # the schema as a whole, including target-document
64
+ # components; stZ033: the target doc's own b2 carries the
65
+ # redefined enumeration). The facet walk never recurses into
66
+ # named bases, so the body's base reference terminates here.
67
+ @redefined_simple_bodies = {}
61
68
  @elements = index_elements
62
69
  end
63
70
 
@@ -212,6 +219,11 @@ module Lutaml
212
219
  def resolve_named_type(local_name, owner_ns = nil)
213
220
  return nil if local_name.nil? || local_name.empty?
214
221
 
222
+ # A redefine SIMPLE-type body is the effective type for every
223
+ # reference to the name.
224
+ body = @redefined_simple_bodies[local_name]
225
+ return body if body
226
+
215
227
  list = named_type_candidates(local_name)
216
228
  return nil if list.empty?
217
229
  # A nil owner means the referencing declaration lives in NO
@@ -696,7 +708,13 @@ module Lutaml
696
708
  end
697
709
  Array(red.simple_type).each do |body|
698
710
  name = body.name.to_s
699
- @redefined_body_names << name unless name.empty?
711
+ next if name.empty?
712
+
713
+ @redefined_body_names << name
714
+ # The body IS the effective type (§4.2.2): every reference
715
+ # to the name — including the target document's own — sees
716
+ # the redefined facets.
717
+ @redefined_simple_bodies[name] = body
700
718
  end
701
719
  Array(red.attribute_group).each do |group|
702
720
  name = group.name.to_s
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Xsd
5
- VERSION = "1.2.90"
5
+ VERSION = "1.2.91"
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.90
4
+ version: 1.2.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.