lutaml-xsd 1.2.89 → 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: ee81fb06ad80e4da277c32dd4bd6dd3a5cdfbad94d2ba5c3fdef2b3a09cd64db
4
- data.tar.gz: 43b043d4d772dd55838bbf7790d2d1bc7bfc9dda1c296377ac519d2acd75b7f2
3
+ metadata.gz: 2e393ac1e891791490925386f06e9f862e04287ab8866248e63075bcb22c16db
4
+ data.tar.gz: 383756510350cd3d61ffe29751e5ff06985efb4fab626c91e218db1546976bd8
5
5
  SHA512:
6
- metadata.gz: 2f3d851982c4b705f7bf3a2757110ac2ef8647031004618a3f105ebf4479ec214cb308395abd38c4bc85ab4edf2d432ec2822d6e5034ec1cda11d32b03e91e10
7
- data.tar.gz: af59e1a701a4d46d9e82e79b908b350fbd53d5381e74efc8c841113cc914672c7cd96f846a59faa0281b8cfeb81d20b65b1f2812edd7aad15bb37eff47206702
6
+ metadata.gz: bd0a4bb5ccb6da00c0adb3eb0f7621e45c431bcaa0cfdaa2d8c47e5775a411b77eff718a47b6b2ee5dd357ec8bb890b541589c6ba557b9e80af3ed0d3fc8aecd
7
+ data.tar.gz: 2a0a5ca5c6da7a35161eacf0a40bd1c4b8e50297d9659e6b696478edc6cecebebf6725d1ba70974978f43e5286ff4d2e0a4fdd85ba4e83535ebe7c2b7d1cabf3
data/TODO.conformance.md CHANGED
@@ -120,7 +120,7 @@ pinned commit) is measured via `rake conformance:w3c`:
120
120
 
121
121
  | mode | pass-rate |
122
122
  |---|---|
123
- | pipeline | 4613/4696 (98.23%) |
123
+ | pipeline | 4614/4696 (98.25%) |
124
124
 
125
125
  (2026-11-02, bundled-stack measurement with the escape,
126
126
  hint-following, pattern-alternative, identity-crash, engine-set,
@@ -144,7 +144,7 @@ lockfile refresh) → 4411 (93.9%) → 4430 (94.3%) → 4435 (94.4%) →
144
144
  → 4557 (97.0%) → 4565 (97.2%) → 4569 (97.3%) → 4562 (drift raw) →
145
145
  4563 (97.17%, ref-namespace round) → 4573 (97.38%, group-content
146
146
  round) → 4578 (97.49%, attribute-prohibition round) → 4585 (97.64%,
147
- multi-document round) → 4588 (97.7%, type-binding round) → 4592 (97.79%, model-161 ride) → 4611 (98.19%, engine-406 ride) → 4613 (98.23%, temporal-enumeration round), +652 net over the 1.2.43 baseline. The escapes round (PR #197 — \d→\p{Nd},
147
+ multi-document round) → 4588 (97.7%, type-binding round) → 4592 (97.79%, model-161 ride) → 4611 (98.19%, engine-406 ride) → 4613 (98.23%, temporal-enumeration round) → 4614 (98.25%, simple-type-children round), +653 net over the 1.2.43 baseline. The escapes round (PR #197 — \d→\p{Nd},
148
148
  \w/\W/\s to their XSD value spaces) collapses Regex 120→69;
149
149
  same-step pattern facets now behave as alternatives and
150
150
  whitespace-only text reaches the facets intact (PR #200), Regex
@@ -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 |
@@ -512,6 +515,22 @@ tuple keys, node-set field violations and absent-field rows handled, cross-eleme
512
515
  checks bind the no-ns int ct-A to the ns-b boolean children —
513
516
  'true' vs xsd:int — the per-child type plumbing under hint
514
517
  layering), full type-redefine body semantics.
518
+ - SIMPLE-TYPE-CHILDREN ROUND (2026-11-05, third attempt — the first
519
+ two regressed 15 at scale): +1 DataTypes (dtZ86723; suite
520
+ 4613->4614 = 98.25%, zero regressions, rspec green). A simple
521
+ type has no element content: the builtin assessment reports
522
+ children even when the lexical text is valid. THREE guards make
523
+ it sound where the earlier attempts were not: xs:anyType
524
+ overrides admit anything (isDefault072); unresolvable type
525
+ REFERENCES arrive at the builtin path as BARE NAMES through the
526
+ lenient fallback (resolve_element_type returns
527
+ schema_element.type on miss) — only xs/xsd-prefixed names are
528
+ builtin-typed, so the redefine-lenient tabletype class
529
+ (idF/idG) never triggers. The full 19-case battery — including
530
+ every case both earlier attempts regressed — passes. THE ROOT
531
+ CAUSE DISCOVERY: the lenient string fallback meant every
532
+ failed type resolution silently took the builtin path — the
533
+ children check is the first consumer that had to distinguish.
515
534
  - TEMPORAL-ENUMERATION ROUND (2026-11-05): +2 DataTypes (10->8,
516
535
  dateTime_enumeration005a/b; suite 4611->4613 = 98.23%, zero
517
536
  regressions, rspec green). Enumeration membership is a VALUE-space
@@ -1049,6 +1049,33 @@ module Lutaml
1049
1049
  declared: nil)
1050
1050
  value = effective_text(xml_element, declared)
1051
1051
  validate_fixed_content(xml_element, declared, value, collector)
1052
+ # A simple type has no element content: children under a
1053
+ # builtin-typed element are illegal even when the lexical
1054
+ # text is fine (dtZ86723 — the xsi:type-overridden root
1055
+ # carries a stray child beside a valid int). xs:anyType
1056
+ # overrides admit anything (isDefault072); unresolvable
1057
+ # type REFERENCES arrive here as bare names (the lenient
1058
+ # fallback returns schema_element.type) and are not
1059
+ # builtin-typed at all (idF/idG's redefine-lenient
1060
+ # "tabletype").
1061
+ prefix = type_name.to_s.split(":").first
1062
+ local = type_name.to_s.split(":").last
1063
+ if !xml_element.children.empty? &&
1064
+ BUILTIN_PREFIXES.include?(prefix) &&
1065
+ local != "anyType"
1066
+ report_error(
1067
+ collector,
1068
+ code: "simple_type_element_content",
1069
+ message: "Element '#{xml_element.name}' has a simple " \
1070
+ "type (#{type_name}) and cannot carry " \
1071
+ "element children",
1072
+ location: xml_element.xpath,
1073
+ context: {
1074
+ element: xml_element.name,
1075
+ type: type_name,
1076
+ },
1077
+ )
1078
+ end
1052
1079
  answer = engine_builtin_answer(type_name, value)
1053
1080
  return if answer.nil?
1054
1081
  return if answer
@@ -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.89"
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.89
4
+ version: 1.2.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.