moxml 0.6.4 → 0.6.5

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: ded5a4e91431d2dc0aa52f5ed3a013dafe8ff9dc5dbcb3490a4793c2e50882bc
4
- data.tar.gz: 132da396e0ecb742951521cfcc12f04e1a250bd81607d8f0b9a00db1c926712f
3
+ metadata.gz: e72bde533d70d24badbc7842d4b159d3117ce8012927058de45ed59eb5f0ea04
4
+ data.tar.gz: bed3791ded78c2dc173b94e73d321c751fc542ad98a9799b05f68e677c1ac5eb
5
5
  SHA512:
6
- metadata.gz: df4fc2b129067c6ae6a7571abd150dcc53851e71a234cc11513842bddc45e4534502a983bd61c952ba8db8b54f85beefb9dc01dc4893e5df9155482ea2119758
7
- data.tar.gz: 5703c216bd7bfd25da921e8c3b9f0dc9e87df3112cd644809a4564c1903007687611f1d734a8515b3477b8f75b6133eeb62ce0196a3d7ba6a4f3c1522448fb02
6
+ metadata.gz: 216db2a989bf0d2543b68f458f38f18dd83200aaa16a903b7a5ee21c884c68f933d4ce41d4878944e37ab32b5e77488a1dffb232ce1898139cf0d65af4d60a9c
7
+ data.tar.gz: bf51b0cd141d2225c494587000bdfe5f491d78d0f02edc5e0049a61948d4cfd1485b3fa233e26c2db475acb785ccab28084ab27cbb6945d59096cf66780cfcd1
data/Gemfile CHANGED
@@ -12,7 +12,7 @@ gem "base64"
12
12
  gem "benchmark"
13
13
  gem "benchmark-ips"
14
14
  gem "get_process_mem"
15
- gem "leptris", "~> 1.9.386"
15
+ gem "leptris", "~> 1.9.410"
16
16
  gem "libxml-ruby", ">= 5.0"
17
17
  gem "nokogiri", "~> 1.18"
18
18
  gem "oga"
data/README.adoc CHANGED
@@ -31,7 +31,13 @@ specified normatively in the
31
31
  https://lutaml.github.io/moxml/_references/processing-model[Processing Model]
32
32
  document, pinned as executable expectations in the consistency suite, and its
33
33
  known engine differences are tracked in the
34
- https://lutaml.github.io/moxml/_pages/divergences[divergence register].
34
+ https://lutaml.github.io/moxml/_pages/divergences[divergence register]. The
35
+ expectations are also exported as data — the
36
+ https://lutaml.github.io/moxml/_pages/conformance[conformance dataset]
37
+ (7 families, 177 cases at schema 5), driven row-for-row by the Rust
38
+ (https://github.com/lutaml/moxml-rs[moxml-rs]) and TypeScript
39
+ (https://github.com/lutaml/moxml-ts[@lutaml/moxml]) tiers, so a runner
40
+ mismatch on any row is a model finding, not a dialect difference.
35
41
 
36
42
  Key features:
37
43
 
@@ -71,7 +77,7 @@ https://github.com/leptris/leptris-ruby[leptris-ruby] FFI binding
71
77
  every measured bulk operation — parse, XPath, serialization, SAX, and
72
78
  the compiled Moxml::Plan / Moxml::StructPlan materialization paths
73
79
  (StructPlan runs 2.3-2.6x raw Nokogiri on the benchmark shape);
74
- requires leptris >= 1.9.386.0 (see version table below).
80
+ requires leptris >= 1.9.410.0 (see version table below).
75
81
 
76
82
  === Underlying library versions
77
83
 
@@ -109,18 +115,18 @@ same libxml2 engine, governed by the consistency suite). Removal
109
115
  after the deprecation cycle.
110
116
 
111
117
  |Leptris (leptris-ruby)
112
- |>= 1.9.386.0
118
+ |>= 1.9.410.0
113
119
  |ENFORCED hard floor — `MINIMUM_BINDING_VERSION`; the adapter refuses
114
- to load below it. Raised 1.9.32 → 1.9.194.1 (2026-09-20) → 1.9.386.0
120
+ to load below it. Raised 1.9.32 → 1.9.194.1 (2026-09-20) → 1.9.386.0 (2026-10-30) → 1.9.410.0 (2026-11-10)
115
121
  (2026-10-30, the tested pair): every accommodation path below it is
116
122
  deleted and all native faces through the 1.9.385 parent-axis train
117
123
  are unconditional. The capability report
118
124
  (`Moxml::Adapter::Leptris.capabilities`) answers what the installed
119
125
  pair serves; cross-import schema sets (`Context#xsd_set`) ride the
120
- compile_set face (1.9.386.0 ✓).
126
+ compile_set face (1.9.386.0 ✓, the floor now requires it).
121
127
  |===
122
128
 
123
- NOTE: moxml's dev Gemfile pins `leptris ~> 1.9.386` (the tested pair; the gemspec itself has zero runtime dependencies). The adapter enforces the floor at load.
129
+ NOTE: moxml's dev Gemfile pins `leptris ~> 1.9.410` (the tested pair; the gemspec itself has zero runtime dependencies). The adapter enforces the floor at load.
124
130
  `ox ~> 2.14`, `libxml-ruby >= 5.0`, and the vendored oga fork — the CI
125
131
  matrix tests exactly those floors.
126
132
 
@@ -130,7 +136,7 @@ When no adapter is explicitly specified, Moxml selects one automatically based o
130
136
  the runtime environment:
131
137
 
132
138
  . If the installed leptris gem supports programmatic document
133
- construction (`Leptris::XML::Document.create`, leptris >= 1.9.386.0), Leptris is used
139
+ construction (`Leptris::XML::Document.create`; the floor guarantees it), Leptris is used
134
140
  . Otherwise, Moxml detects already-loaded XML libraries in this order:
135
141
  .. Nokogiri
136
142
  .. Ox
@@ -141,7 +147,7 @@ the runtime environment:
141
147
  ----
142
148
  # Automatic detection — picks the best available adapter
143
149
  ctx = Moxml.new
144
- ctx.config.adapter_name # => :leptris (leptris >= 1.9.386.0), :nokogiri otherwise
150
+ ctx.config.adapter_name # => :leptris (leptris >= 1.9.410.0), :nokogiri otherwise
145
151
 
146
152
  # Explicit override — always takes precedence
147
153
  ctx = Moxml.new(:ox)
data/Rakefile CHANGED
@@ -182,8 +182,11 @@ namespace :conformance do
182
182
  regex = Moxml::XSD::SchemaRules::XsdRegex::CONFORMANCE_CASES
183
183
  wildcards = Moxml::XSD::SchemaRules::Wildcard::WILDCARD_CASES
184
184
  entities = Moxml::EntityRegistry::ENTITY_CONFORMANCE_CASES
185
+ serialization = Moxml::SerializationCases::CONFORMANCE_CASES
186
+ c14n = Moxml::C14nCases::CONFORMANCE_CASES
187
+ xsd_structural = Moxml::XsdStructuralCases::CONFORMANCE_CASES
185
188
  payload = {
186
- schema: 3,
189
+ schema: 5,
187
190
  generator: "moxml #{Moxml::VERSION}",
188
191
  cases: {
189
192
  "builtin_lexical" => lexical.map do |type, lexical_value, expected|
@@ -217,13 +220,24 @@ namespace :conformance do
217
220
  "standard" => standard, "restore" => restore
218
221
  }
219
222
  end,
223
+ "serialization" => serialization.map do |id, input, output|
224
+ { "id" => id, "input" => input, "output" => output }
225
+ end,
226
+ "c14n" => c14n.map do |id, input, canonical|
227
+ { "id" => id, "input" => input, "canonical" => canonical }
228
+ end,
229
+ "xsd_structural" => xsd_structural.map do |id, schema, instance, valid|
230
+ { "id" => id, "schema" => schema, "instance" => instance,
231
+ "valid" => valid }
232
+ end,
220
233
  },
221
234
  }
222
235
  dir = File.expand_path("conformance", __dir__)
223
236
  FileUtils.mkdir_p(dir)
224
237
  target = File.join(dir, "moxml-conformance.json")
225
238
  File.write(target, "#{JSON.pretty_generate(payload)}\n")
226
- total = lexical.size + regex.size + wildcards.size + entities.size
239
+ total = lexical.size + regex.size + wildcards.size + entities.size +
240
+ serialization.size + c14n.size + xsd_structural.size
227
241
  puts "conformance: exported #{total} cases to #{target}"
228
242
  end
229
243
  end
@@ -62,9 +62,10 @@ module Scoreboard
62
62
  "runner-window variance (2026-10-26/27: 6.17x-8.48x across runs)",
63
63
  "walk+read (warm)" =>
64
64
  "runner-window variance (2026-10-26/27: 0.54x-0.76x across runs)",
65
- "walk+read (cold)" => "leptris-ruby#527 (1.9.380 crossing regression)",
65
+ "walk+read (cold)" =>
66
+ "wrapper-mint floor (leptris-ruby#527: engine flat 374->380; #622 asks)",
66
67
  "children recursion (cold)" =>
67
- "leptris-ruby#527 (1.9.380 crossing regression)",
68
+ "wrapper-mint floor (leptris-ruby#527: engine flat 374->380; #622 asks)",
68
69
  }.freeze
69
70
 
70
71
  Field = Struct.new(:name, :unit, :value)
@@ -1,6 +1,6 @@
1
1
  {
2
- "schema": 3,
3
- "generator": "moxml 0.5.175",
2
+ "schema": 5,
3
+ "generator": "moxml 0.6.4",
4
4
  "cases": {
5
5
  "builtin_lexical": [
6
6
  {
@@ -1033,6 +1033,218 @@
1033
1033
  "standard": false,
1034
1034
  "restore": false
1035
1035
  }
1036
+ ],
1037
+ "serialization": [
1038
+ {
1039
+ "id": "empty-root",
1040
+ "input": "<r/>",
1041
+ "output": "<r></r>"
1042
+ },
1043
+ {
1044
+ "id": "simple-text",
1045
+ "input": "<r>x</r>",
1046
+ "output": "<r>x</r>"
1047
+ },
1048
+ {
1049
+ "id": "attr-amp",
1050
+ "input": "<r a=\"x &amp; y\"/>",
1051
+ "output": "<r a=\"x &amp; y\"></r>"
1052
+ },
1053
+ {
1054
+ "id": "attr-lt",
1055
+ "input": "<r a=\"1 &lt; 2\"/>",
1056
+ "output": "<r a=\"1 &lt; 2\"></r>"
1057
+ },
1058
+ {
1059
+ "id": "attr-quote",
1060
+ "input": "<r a='say \"hi\"'/>",
1061
+ "output": "<r a=\"say &quot;hi&quot;\"></r>"
1062
+ },
1063
+ {
1064
+ "id": "text-escape",
1065
+ "input": "<r>1 &lt; 2 &amp; 3</r>",
1066
+ "output": "<r>1 &lt; 2 &amp; 3</r>"
1067
+ },
1068
+ {
1069
+ "id": "text-gt",
1070
+ "input": "<r>1 &gt; 2</r>",
1071
+ "output": "<r>1 &gt; 2</r>"
1072
+ },
1073
+ {
1074
+ "id": "cdata",
1075
+ "input": "<r><![CDATA[a]]><b/></r>",
1076
+ "output": "<r><![CDATA[a]]><b></b></r>"
1077
+ },
1078
+ {
1079
+ "id": "comment",
1080
+ "input": "<r><!--c--></r>",
1081
+ "output": "<r><!--c--></r>"
1082
+ },
1083
+ {
1084
+ "id": "pi",
1085
+ "input": "<r><?pi data?></r>",
1086
+ "output": "<r><?pi data?></r>"
1087
+ },
1088
+ {
1089
+ "id": "namespace-default",
1090
+ "input": "<r xmlns=\"urn:x\"><a/></r>",
1091
+ "output": "<r xmlns=\"urn:x\"><a></a></r>"
1092
+ },
1093
+ {
1094
+ "id": "namespace-prefixed-attr",
1095
+ "input": "<r xmlns:p=\"urn:p\" p:a=\"1\"/>",
1096
+ "output": "<r xmlns:p=\"urn:p\" p:a=\"1\"></r>"
1097
+ },
1098
+ {
1099
+ "id": "mixed-content",
1100
+ "input": "<r>a<b/>c</r>",
1101
+ "output": "<r>a<b></b>c</r>"
1102
+ },
1103
+ {
1104
+ "id": "attr-newline",
1105
+ "input": "<r a=\"x&#10;y\"/>",
1106
+ "output": "<r a=\"x&#10;y\"></r>"
1107
+ },
1108
+ {
1109
+ "id": "crlf-text",
1110
+ "input": "<r>a\r\nb</r>",
1111
+ "output": "<r>a\nb</r>"
1112
+ },
1113
+ {
1114
+ "id": "combo",
1115
+ "input": "<r a='1'>t&amp;t</r>",
1116
+ "output": "<r a=\"1\">t&amp;t</r>"
1117
+ },
1118
+ {
1119
+ "id": "nested-empty",
1120
+ "input": "<r><a><b/></a></r>",
1121
+ "output": "<r><a><b></b></a></r>"
1122
+ },
1123
+ {
1124
+ "id": "text-apos",
1125
+ "input": "<r>it&apos;s</r>",
1126
+ "output": "<r>it's</r>"
1127
+ },
1128
+ {
1129
+ "id": "numeric-ref",
1130
+ "input": "<r>&#65;&#233;</r>",
1131
+ "output": "<r>Aé</r>"
1132
+ },
1133
+ {
1134
+ "id": "high-codepoint-attr",
1135
+ "input": "<r a=\"é\"/>",
1136
+ "output": "<r a=\"é\"></r>"
1137
+ }
1138
+ ],
1139
+ "c14n": [
1140
+ {
1141
+ "id": "attr-order",
1142
+ "input": "<r b=\"2\" a=\"1\"/>",
1143
+ "canonical": "<r a=\"1\" b=\"2\"></r>"
1144
+ },
1145
+ {
1146
+ "id": "ns-rewrite",
1147
+ "input": "<n:r xmlns:n=\"urn:n\" xmlns:m=\"urn:m\"><n:a m:k=\"v\"/></n:r>",
1148
+ "canonical": "<n:r xmlns:m=\"urn:m\" xmlns:n=\"urn:n\"><n:a m:k=\"v\"></n:a></n:r>"
1149
+ },
1150
+ {
1151
+ "id": "ns-hoist",
1152
+ "input": "<r xmlns=\"urn:x\"><a xmlns=\"urn:y\"/></r>",
1153
+ "canonical": "<r xmlns=\"urn:x\"><a xmlns=\"urn:y\"></a></r>"
1154
+ },
1155
+ {
1156
+ "id": "text-escape",
1157
+ "input": "<r>1 &lt; 2 &amp; 3</r>",
1158
+ "canonical": "<r>1 &lt; 2 &amp; 3</r>"
1159
+ },
1160
+ {
1161
+ "id": "cdata-to-text",
1162
+ "input": "<r><![CDATA[raw data]]><b/></r>",
1163
+ "canonical": "<r>raw data<b></b></r>"
1164
+ },
1165
+ {
1166
+ "id": "comment-dropped",
1167
+ "input": "<r><!--gone--><a/></r>",
1168
+ "canonical": "<r><a></a></r>"
1169
+ },
1170
+ {
1171
+ "id": "pi-kept",
1172
+ "input": "<r><?pi data?><a/></r>",
1173
+ "canonical": "<r><?pi data?><a></a></r>"
1174
+ },
1175
+ {
1176
+ "id": "entity-expanded",
1177
+ "input": "<r>a&lt;b&amp;c</r>",
1178
+ "canonical": "<r>a&lt;b&amp;c</r>"
1179
+ },
1180
+ {
1181
+ "id": "empty-elements",
1182
+ "input": "<r><a/><b></b></r>",
1183
+ "canonical": "<r><a></a><b></b></r>"
1184
+ },
1185
+ {
1186
+ "id": "whitespace-preserved",
1187
+ "input": "<r> x <a/> y </r>",
1188
+ "canonical": "<r> x <a></a> y </r>"
1189
+ },
1190
+ {
1191
+ "id": "attr-quote-norm",
1192
+ "input": "<r a='single \"double\"'/>",
1193
+ "canonical": "<r a=\"single &quot;double&quot;\"></r>"
1194
+ },
1195
+ {
1196
+ "id": "utf8-high",
1197
+ "input": "<r>café — naïve</r>",
1198
+ "canonical": "<r>café — naïve</r>"
1199
+ },
1200
+ {
1201
+ "id": "nested-ns-default",
1202
+ "input": "<r xmlns=\"urn:a\"><c:b xmlns:c=\"urn:c\"><d xmlns=\"urn:d\"/></c:b></r>",
1203
+ "canonical": "<r xmlns=\"urn:a\"><c:b xmlns:c=\"urn:c\"><d xmlns=\"urn:d\"></d></c:b></r>"
1204
+ },
1205
+ {
1206
+ "id": "mixed-attrs-ns",
1207
+ "input": "<r xmlns:p=\"urn:p\" p:a=\"1\" b=\"2\" xmlns:q=\"urn:q\" q:c=\"3\"/>",
1208
+ "canonical": "<r xmlns:p=\"urn:p\" xmlns:q=\"urn:q\" b=\"2\" p:a=\"1\" q:c=\"3\"></r>"
1209
+ }
1210
+ ],
1211
+ "xsd_structural": [
1212
+ {
1213
+ "id": "builtin-lexical-valid",
1214
+ "schema": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:t\" xmlns=\"urn:t\"><xs:element name=\"doc\"><xs:complexType><xs:sequence><xs:element name=\"n\" type=\"xs:int\"/><xs:element name=\"flag\" type=\"xs:boolean\"/></xs:sequence><xs:attribute name=\"a\" type=\"xs:string\"/><xs:anyAttribute namespace=\"##any\" processContents=\"strict\"/></xs:complexType></xs:element><xs:attribute name=\"ext\" type=\"xs:string\"/></xs:schema>",
1215
+ "instance": "<d:doc xmlns:d=\"urn:t\" a=\"x\"><n>42</n><flag>true</flag></d:doc>",
1216
+ "valid": true
1217
+ },
1218
+ {
1219
+ "id": "builtin-lexical-invalid",
1220
+ "schema": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:t\" xmlns=\"urn:t\"><xs:element name=\"doc\"><xs:complexType><xs:sequence><xs:element name=\"n\" type=\"xs:int\"/><xs:element name=\"flag\" type=\"xs:boolean\"/></xs:sequence><xs:attribute name=\"a\" type=\"xs:string\"/><xs:anyAttribute namespace=\"##any\" processContents=\"strict\"/></xs:complexType></xs:element><xs:attribute name=\"ext\" type=\"xs:string\"/></xs:schema>",
1221
+ "instance": "<d:doc xmlns:d=\"urn:t\" a=\"x\"><n>not-an-int</n><flag>true</flag></d:doc>",
1222
+ "valid": false
1223
+ },
1224
+ {
1225
+ "id": "strict-admission-declared",
1226
+ "schema": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:t\" xmlns=\"urn:t\"><xs:element name=\"doc\"><xs:complexType><xs:sequence><xs:element name=\"n\" type=\"xs:int\"/><xs:element name=\"flag\" type=\"xs:boolean\"/></xs:sequence><xs:attribute name=\"a\" type=\"xs:string\"/><xs:anyAttribute namespace=\"##any\" processContents=\"strict\"/></xs:complexType></xs:element><xs:attribute name=\"ext\" type=\"xs:string\"/></xs:schema>",
1227
+ "instance": "<d:doc xmlns:d=\"urn:t\" xmlns:t=\"urn:t\" t:ext=\"y\" a=\"x\"><n>1</n><flag>false</flag></d:doc>",
1228
+ "valid": true
1229
+ },
1230
+ {
1231
+ "id": "strict-admission-undeclared",
1232
+ "schema": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:t\" xmlns=\"urn:t\"><xs:element name=\"doc\"><xs:complexType><xs:sequence><xs:element name=\"n\" type=\"xs:int\"/><xs:element name=\"flag\" type=\"xs:boolean\"/></xs:sequence><xs:attribute name=\"a\" type=\"xs:string\"/><xs:anyAttribute namespace=\"##any\" processContents=\"strict\"/></xs:complexType></xs:element><xs:attribute name=\"ext\" type=\"xs:string\"/></xs:schema>",
1233
+ "instance": "<d:doc xmlns:d=\"urn:t\" ghost=\"z\" a=\"x\"><n>1</n><flag>false</flag></d:doc>",
1234
+ "valid": false
1235
+ },
1236
+ {
1237
+ "id": "substitution-member",
1238
+ "schema": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:s\" xmlns=\"urn:s\"><xs:element name=\"shape\" type=\"xs:string\" abstract=\"true\"/><xs:element name=\"circle\" type=\"xs:string\" substitutionGroup=\"shape\"/><xs:element name=\"canvas\"><xs:complexType><xs:sequence><xs:element ref=\"shape\" maxOccurs=\"unbounded\"/></xs:sequence></xs:complexType></xs:element></xs:schema>",
1239
+ "instance": "<s:canvas xmlns:s=\"urn:s\"><s:circle>unit</s:circle></s:canvas>",
1240
+ "valid": true
1241
+ },
1242
+ {
1243
+ "id": "wildcard-lax-other-ns",
1244
+ "schema": "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:t\" xmlns=\"urn:t\"><xs:element name=\"doc\"><xs:complexType><xs:sequence><xs:any processContents=\"lax\" namespace=\"##other\"/></xs:sequence></xs:complexType></xs:element></xs:schema>",
1245
+ "instance": "<d:doc xmlns:d=\"urn:t\" xmlns:o=\"urn:o\"><o:kid/></d:doc>",
1246
+ "valid": true
1247
+ }
1036
1248
  ]
1037
1249
  }
1038
1250
  }
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: Conformance dataset
3
+ nav_order: 5.5
4
+ ---
5
+
6
+ == One dataset, every tier
7
+
8
+ The conformance dataset is the model's committed answers exported as
9
+ data: 177 cases across 7 families, each row a question and the one
10
+ answer every implementation must produce. It exists so that
11
+ "engine-choice invariance" is not a prose claim but an executable
12
+ expectation that runs on every tier — Ruby, Rust, and TypeScript.
13
+
14
+ A runner mismatch on any row is a **real model finding**: report it
15
+ and fix the tier (or, if the model itself is wrong, amend the model
16
+ document first). Rows are never bent to match an implementation.
17
+
18
+ == Families (schema 5)
19
+
20
+ [cols="4,1,6"]
21
+ |===
22
+ |Family |Rows |What it pins
23
+
24
+ |builtin_lexical
25
+ |81
26
+ |The lexical space of every XSD builtin type — which strings each
27
+ type accepts.
28
+
29
+ |xsd_regex_translation
30
+ |21
31
+ |How XSD `pattern` facets translate into host-regex semantics, and
32
+ which patterns are translatable at all.
33
+
34
+ |schema_wildcards
35
+ |24
36
+ |Namespace wildcard admission: `##any`/`##other`/namespace lists,
37
+ `processContents`, `notNamespace`/`notQName` exclusions.
38
+
39
+ |entity_registry
40
+ |11
41
+ |The entity name ↔ codepoint registry: declaration, resolution, and
42
+ restore shapes per `entity_load_mode`.
43
+
44
+ |serialization
45
+ |20
46
+ |Emitter shapes: long-form empty elements, attribute escaping
47
+ (`&amp;`, `&lt;`, `&quot;`, numeric references for tab/newline),
48
+ namespace declarations verbatim.
49
+
50
+ |c14n
51
+ |14
52
+ |Canonical XML 1.0 vectors, byte-identical on every adapter — sorted
53
+ attributes, expanded references, comments dropped.
54
+
55
+ |xsd_structural
56
+ |6
57
+ |Single-file schema + instance pairs with the committed facade
58
+ verdict (the engine verdict AND the strict wildcard admission
59
+ re-check).
60
+ |===
61
+
62
+ == Where it lives
63
+
64
+ The source of truth is the Ruby case tables
65
+ (`lib/moxml/*_cases.rb` and the XSD rule tables). Export:
66
+
67
+ [source,console]
68
+ ----
69
+ rake conformance:export
70
+ ----
71
+
72
+ writes `conformance/moxml-conformance.json` — `schema` records the
73
+ dataset revision, `generator` the exporting moxml version. Every
74
+ schema bump is a reviewed change: rows are added or amended through
75
+ PRs that cite the model section they enforce.
76
+
77
+ == The runners
78
+
79
+ [cols="2,3"]
80
+ |===
81
+ |Tier |Runner
82
+
83
+ |Ruby
84
+ |`spec/consistency/conformance_families_spec.rb` and the family
85
+ specs — pins every row through every available adapter.
86
+
87
+ |Rust
88
+ |link:https://github.com/lutaml/moxml-rs[moxml-rs] — the dataset
89
+ vendored at its release pin, driven by `cargo test`.
90
+
91
+ |TypeScript
92
+ |link:https://github.com/lutaml/moxml-ts[@lutaml/moxml] — fetches the
93
+ pinned wasm bundles (`scripts/fetch-wasm.sh`), drives the families
94
+ through the engine and model faces with vitest.
95
+ |===
96
+
97
+ The vendored-pin chain moxml → moxml-rs → moxml-ts means every tier
98
+ tests the same rows: a dataset revision ships as a moxml release, the
99
+ Rust crate re-vendors it at its next release, and the TS package pins
100
+ both bundles.
101
+
102
+ == Why data, not prose
103
+
104
+ The dataset has already caught a class of bug that prose cannot: the
105
+ wasm32 build of one engine passed every native test while silently
106
+ corrupting its output — attribute character references vanished on
107
+ serialize and the canonicalizer emitted mangled bytes. Native suites
108
+ were green because the defect lived in the engine's freestanding
109
+ build, which only compiles under wasm32. Driving the dataset rows
110
+ through the bundle caught both shapes immediately
111
+ (leptris-rs#69). This is the standing argument for the runners: the
112
+ same rows, executed in every environment the model promises.
@@ -174,16 +174,27 @@ lutaml-xsd conformance runner (locations registration
174
174
  lutaml/lutaml-xsd#234); pinned in `spec/moxml/xsd_composed_spec.rb`.
175
175
 
176
176
  | D-24
177
- | leptris (XSD engine lane, 1.9.409+)
178
- | The 1.9.409 namespace-aware particle typing regresses the W3C
179
- schG2 composition (A imports no-ns B; expected valid): the engine
180
- types the no-namespace `<e1>` variant's children against ns-a's
181
- same-name declarations, so the lane answers INVALID where the model
182
- says VALID. v1.9.410 (leptris/leptris#1976) fixed the element
183
- resolution — the false lexical rows for the import-RESOLVED compile
184
- remain: the child-typing branch still resolves the no-ns `e1`'s
185
- `<a1>` against ns-a's `ct-A`, tracked upstream as
186
- leptris/leptris#1979. Until it lands the lexical rows pass through
187
- the facade untouched (they are not admission rows and are never
188
- dismissable).
177
+ | leptris (XSD engine lane, 1.9.409-1.9.410) + vendored corpus
178
+ | The 1.9.409 namespace-aware particle typing regressed the W3C
179
+ schG2 composition (A imports no-ns B imports ns-c C; expected
180
+ valid). Two stacked causes, both RESOLVED: the engine's ns-blind
181
+ child-typing branch (fixed v1.9.410 db4d860c, leptris/leptris#1979
182
+ — the resolved-lane spec compiles the corpus case from its file
183
+ path to zero errors) and the VENDORED corpus copy missing the
184
+ `schG1_c.xsd` C unit, which starved the composition of the no-ns
185
+ unit's types (upstream w3c/xsdtests carries it; the vendored
186
+ snapshot does not). With binding >= 1.9.412.1 and the complete
187
+ composition, schG2 answers VALID through the facade — the #522
188
+ 16-case set stands at 16/16. Lexical rows were never
189
+ facade-dismissable; no moxml change was required.
190
+
191
+ | D-25
192
+ | oga, rexml, ox, headed_ox, libxml
193
+ | A `&#10;` character reference in an attribute value serializes as
194
+ a LITERAL newline instead of the escaped form — round-trip lossy,
195
+ since the next parse normalizes a literal attribute newline to a
196
+ space (XML 1.0 §3.3.3). The committed answer is the escaped form
197
+ (nokogiri, leptris emit it). Pinned in
198
+ `spec/consistency/serialization_family_spec.rb` (the family pins
199
+ the primary adapters).
189
200
  |===
@@ -9,14 +9,19 @@ This section covers the fundamental concepts and essential information for
9
9
  working with Moxml.
10
10
 
11
11
  Start with link:why-moxml[Why Moxml] for the invariant and the evidence
12
- apparatus, then link:model-coverage[Model coverage] for the
13
- adapter-by-adapter proof.
12
+ apparatus, link:model-coverage[Model coverage] for the
13
+ adapter-by-adapter proof, and link:conformance[Conformance dataset]
14
+ for the cross-language rows that pin it.
14
15
 
15
16
  === Topics covered
16
17
 
17
18
  link:installation[Installation]::
18
19
  How to install Moxml and select an XML adapter for your needs.
19
20
 
21
+ link:conformance[Conformance dataset]::
22
+ The 177-case dataset — the model's committed answers as data — and
23
+ the Ruby, Rust, and TypeScript runners that enforce them.
24
+
20
25
  link:quick-start[Quick start]::
21
26
  Get up and running with Moxml in minutes with practical examples.
22
27
 
@@ -28,6 +28,13 @@ Pins:: none
28
28
  against each other; the reference is pure Ruby. (The Opal
29
29
  transpile lane was removed in #489 phase 4 — the JS surface is
30
30
  the moxml-ts wasm binding.)
31
+ `rake conformance:export` distills the expectations into
32
+ `conformance/moxml-conformance.json` — the cross-language dataset
33
+ (7 families, 177 cases at schema 5) that the Rust
34
+ (link:https://github.com/lutaml/moxml-rs[moxml-rs]) and TypeScript
35
+ (link:https://github.com/lutaml/moxml-ts[@lutaml/moxml]) tiers run
36
+ row-for-row; a runner mismatch on any row is a model finding. See
37
+ the site's xref:conformance.adoc[conformance dataset] page.
31
38
  3. Adapter implementations and capability gates — representations.
32
39
 
33
40
  A pin cites the model section it enforces
@@ -31,7 +31,12 @@ module Moxml
31
31
  # "raise all floors"): the tested pair — every gate below it
32
32
  # unwound, and the floor is ENFORCED (the load refuses below it;
33
33
  # the README's "older bindings do not load" claim is now true).
34
- MINIMUM_BINDING_VERSION = "1.9.386.0"
34
+ # Raised 1.9.386.0 -> 1.9.410.0 (2026-11-10, owner directive
35
+ # "update floors"): the namespace-aware strict admission
36
+ # (leptris#1964, 1.9.409) and the schG2 child-typing fix
37
+ # (leptris#1979, 1.9.410) - the XSD conformance answers the
38
+ # dataset and the suite now pin REQUIRE this wave.
39
+ MINIMUM_BINDING_VERSION = "1.9.410.0"
35
40
 
36
41
  # Snapshot-backed attribute listing native (moxml#520): the
37
42
  # listing face serves reads from the binding's flat packet face —
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moxml
4
+ # The c14n conformance family (#490 item 8, family 6): canonical
5
+ # C14N 1.0 vectors (comments dropped — the default digest shape).
6
+ # Every row canonicalizes to IDENTICAL bytes on all seven adapters
7
+ # (the Ruby reference and the leptris native delegation are pinned
8
+ # byte-for-byte by the c14n suite). Consumed by
9
+ # `rake conformance:export` and the cross-language runners.
10
+ module C14nCases
11
+ CONFORMANCE_CASES = [
12
+ ["attr-order", '<r b="2" a="1"/>', '<r a="1" b="2"></r>'],
13
+ ["ns-rewrite",
14
+ '<n:r xmlns:n="urn:n" xmlns:m="urn:m"><n:a m:k="v"/></n:r>',
15
+ '<n:r xmlns:m="urn:m" xmlns:n="urn:n"><n:a m:k="v"></n:a></n:r>'],
16
+ ["ns-hoist", '<r xmlns="urn:x"><a xmlns="urn:y"/></r>',
17
+ '<r xmlns="urn:x"><a xmlns="urn:y"></a></r>'],
18
+ ["text-escape", "<r>1 &lt; 2 &amp; 3</r>", "<r>1 &lt; 2 &amp; 3</r>"],
19
+ ["cdata-to-text", "<r><![CDATA[raw data]]><b/></r>",
20
+ "<r>raw data<b></b></r>"],
21
+ ["comment-dropped", "<r><!--gone--><a/></r>", "<r><a></a></r>"],
22
+ ["pi-kept", "<r><?pi data?><a/></r>", "<r><?pi data?><a></a></r>"],
23
+ ["entity-expanded", "<r>a&lt;b&amp;c</r>", "<r>a&lt;b&amp;c</r>"],
24
+ ["empty-elements", "<r><a/><b></b></r>", "<r><a></a><b></b></r>"],
25
+ ["whitespace-preserved", "<r> x <a/> y </r>",
26
+ "<r> x <a></a> y </r>"],
27
+ ["attr-quote-norm", '<r a=\'single "double"\'/>',
28
+ '<r a="single &quot;double&quot;"></r>'],
29
+ ["utf8-high", "<r>café — naïve</r>", "<r>café — naïve</r>"],
30
+ ["nested-ns-default",
31
+ '<r xmlns="urn:a"><c:b xmlns:c="urn:c"><d xmlns="urn:d"/></c:b></r>',
32
+ '<r xmlns="urn:a"><c:b xmlns:c="urn:c"><d xmlns="urn:d"></d></c:b></r>'],
33
+ ["mixed-attrs-ns",
34
+ '<r xmlns:p="urn:p" p:a="1" b="2" xmlns:q="urn:q" q:c="3"/>',
35
+ '<r xmlns:p="urn:p" xmlns:q="urn:q" b="2" p:a="1" q:c="3"></r>'],
36
+ ].map(&:freeze).freeze
37
+ end
38
+ end
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moxml
4
+ # The serialization conformance family (#490 item 8, family 5): the
5
+ # committed element-level serialization answers, one row per shape.
6
+ # Each row's output is the round-trip-correct form — admitted only
7
+ # after parse -> serialize -> parse -> serialize byte-equality on
8
+ # both primary engines. Comparison basis: `doc.root.to_xml(indent: 0)`
9
+ # (element level; the document face carries adapter-divergent
10
+ # trailing newlines). Consumed by `rake conformance:export` and the
11
+ # cross-language runners; rows are the model's answers, so a runner
12
+ # mismatch is a finding, not a data question.
13
+ module SerializationCases
14
+ CONFORMANCE_CASES = [
15
+ ["empty-root", "<r/>", "<r></r>"],
16
+ ["simple-text", "<r>x</r>", "<r>x</r>"],
17
+ ["attr-amp", "<r a=\"x &amp; y\"/>", "<r a=\"x &amp; y\"></r>"],
18
+ ["attr-lt", "<r a=\"1 &lt; 2\"/>", "<r a=\"1 &lt; 2\"></r>"],
19
+ ["attr-quote", "<r a='say \"hi\"'/>",
20
+ "<r a=\"say &quot;hi&quot;\"></r>"],
21
+ ["text-escape", "<r>1 &lt; 2 &amp; 3</r>", "<r>1 &lt; 2 &amp; 3</r>"],
22
+ ["text-gt", "<r>1 &gt; 2</r>", "<r>1 &gt; 2</r>"],
23
+ ["cdata", "<r><![CDATA[a]]><b/></r>",
24
+ "<r><![CDATA[a]]><b></b></r>"],
25
+ ["comment", "<r><!--c--></r>", "<r><!--c--></r>"],
26
+ ["pi", "<r><?pi data?></r>", "<r><?pi data?></r>"],
27
+ ["namespace-default", "<r xmlns=\"urn:x\"><a/></r>",
28
+ "<r xmlns=\"urn:x\"><a></a></r>"],
29
+ ["namespace-prefixed-attr", "<r xmlns:p=\"urn:p\" p:a=\"1\"/>",
30
+ "<r xmlns:p=\"urn:p\" p:a=\"1\"></r>"],
31
+ ["mixed-content", "<r>a<b/>c</r>", "<r>a<b></b>c</r>"],
32
+ ["attr-newline", "<r a=\"x&#10;y\"/>", "<r a=\"x&#10;y\"></r>"],
33
+ ["crlf-text", "<r>a\r\nb</r>", "<r>a\nb</r>"],
34
+ ["combo", "<r a='1'>t&amp;t</r>", "<r a=\"1\">t&amp;t</r>"],
35
+ ["nested-empty", "<r><a><b/></a></r>",
36
+ "<r><a><b></b></a></r>"],
37
+ ["text-apos", "<r>it&apos;s</r>", "<r>it's</r>"],
38
+ ["numeric-ref", "<r>&#65;&#233;</r>", "<r>Aé</r>"],
39
+ ["high-codepoint-attr", "<r a=\"é\"/>", "<r a=\"é\"></r>"],
40
+ ].map(&:freeze).freeze
41
+ end
42
+ end
data/lib/moxml/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.6.4"
4
+ VERSION = "0.6.5"
5
5
  end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Moxml
4
+ # The XSD-structural conformance family (#490 item 8, family 7):
5
+ # single-file schema + instance pairs — namespace-aligned admission
6
+ # shapes (builtin lexical, strict wildcard with a global in the
7
+ # target namespace, substitution groups, lax ##other wildcards).
8
+ # Every row's verdict is verified identical on both primary engines
9
+ # through `Context#xsd_file`. Schemas are compact single-line
10
+ # documents (whitespace-insensitive to the compiler); instances use
11
+ # explicit prefixes because attribute defaults never qualify.
12
+ # Multi-file composition shapes (imports, redefines) stay in the
13
+ # W3C corpus lanes — these rows are deliberately self-contained for
14
+ # the cross-language runners.
15
+ module XsdStructuralCases
16
+ XSD_LEXICAL =
17
+ '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:t" xmlns="urn:t"><xs:element name="doc"><xs:complexType><xs:sequence><xs:element name="n" type="xs:int"/><xs:element name="flag" type="xs:boolean"/></xs:sequence><xs:attribute name="a" type="xs:string"/><xs:anyAttribute namespace="##any" processContents="strict"/></xs:complexType></xs:element><xs:attribute name="ext" type="xs:string"/></xs:schema>'
18
+ XSD_SUBS =
19
+ '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:s" xmlns="urn:s"><xs:element name="shape" type="xs:string" abstract="true"/><xs:element name="circle" type="xs:string" substitutionGroup="shape"/><xs:element name="canvas"><xs:complexType><xs:sequence><xs:element ref="shape" maxOccurs="unbounded"/></xs:sequence></xs:complexType></xs:element></xs:schema>'
20
+ XSD_WILDCARD =
21
+ '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:t" xmlns="urn:t"><xs:element name="doc"><xs:complexType><xs:sequence><xs:any processContents="lax" namespace="##other"/></xs:sequence></xs:complexType></xs:element></xs:schema>'
22
+
23
+ CONFORMANCE_CASES = [
24
+ ["builtin-lexical-valid", XSD_LEXICAL,
25
+ '<d:doc xmlns:d="urn:t" a="x"><n>42</n><flag>true</flag></d:doc>',
26
+ true],
27
+ ["builtin-lexical-invalid", XSD_LEXICAL,
28
+ '<d:doc xmlns:d="urn:t" a="x"><n>not-an-int</n><flag>true</flag></d:doc>',
29
+ false],
30
+ ["strict-admission-declared", XSD_LEXICAL,
31
+ '<d:doc xmlns:d="urn:t" xmlns:t="urn:t" t:ext="y" a="x"><n>1</n><flag>false</flag></d:doc>',
32
+ true],
33
+ ["strict-admission-undeclared", XSD_LEXICAL,
34
+ '<d:doc xmlns:d="urn:t" ghost="z" a="x"><n>1</n><flag>false</flag></d:doc>',
35
+ false],
36
+ ["substitution-member", XSD_SUBS,
37
+ '<s:canvas xmlns:s="urn:s"><s:circle>unit</s:circle></s:canvas>',
38
+ true],
39
+ ["wildcard-lax-other-ns", XSD_WILDCARD,
40
+ '<d:doc xmlns:d="urn:t" xmlns:o="urn:o"><o:kid/></d:doc>',
41
+ true],
42
+ ].map(&:freeze).freeze
43
+ end
44
+ end
data/lib/moxml.rb CHANGED
@@ -89,6 +89,9 @@ module Moxml
89
89
  autoload :Builder, "moxml/builder"
90
90
  autoload :Entity, "moxml/entity"
91
91
  autoload :EntityRegistry, "moxml/entity_registry"
92
+ autoload :SerializationCases, "moxml/serialization_cases"
93
+ autoload :C14nCases, "moxml/c14n_cases"
94
+ autoload :XsdStructuralCases, "moxml/xsd_structural_cases"
92
95
  autoload :NativeAttachment, "moxml/native_attachment"
93
96
  autoload :XmlUtils, "moxml/xml_utils"
94
97
  autoload :XmlEmitter, "moxml/xml_emitter"
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require "tmpdir"
5
+ require "spec_helper"
6
+
7
+ # Conformance families 6 and 7 (#490 item 8):
8
+ #
9
+ # - c14n: canonical C14N 1.0 vectors (comments dropped). Every row
10
+ # canonicalizes to IDENTICAL bytes on all adapters — the Ruby
11
+ # reference and the leptris native delegation are pinned
12
+ # byte-for-byte by the c14n suite.
13
+ # - xsd_structural: single-file schema + instance pairs, the
14
+ # committed facade verdict, verified identical on both primary
15
+ # engines through `Context#xsd_file`.
16
+ #
17
+ # Both export into conformance/moxml-conformance.json (schema 5) for
18
+ # the cross-language runners; a runner mismatch on any row is a REAL
19
+ # model finding — report it, don't bend the row.
20
+ RSpec.describe "conformance families: c14n and xsd_structural (schema 5)" do
21
+ let(:primary) { %i[nokogiri leptris] }
22
+
23
+ describe "c14n" do
24
+ Moxml::C14nCases::CONFORMANCE_CASES.each do |id, input, canonical|
25
+ it "canonicalizes #{id} to the committed bytes" do
26
+ Moxml::Adapter::AVAILABLE_ADAPTERS.each do |name|
27
+ begin
28
+ doc = Moxml.new(name).parse(input)
29
+ rescue Moxml::Error, NotImplementedError, LoadError
30
+ next
31
+ end
32
+
33
+ expect(Moxml::C14n.canonicalize(doc)).to eq(canonical)
34
+ end
35
+ end
36
+ end
37
+
38
+ it "is exported by the dataset with the committed rows" do
39
+ path = File.expand_path("../../conformance/moxml-conformance.json",
40
+ __dir__)
41
+ family = JSON.parse(File.read(path)).dig("cases", "c14n") || []
42
+ expect(family.map { |row| row["id"] })
43
+ .to eq(Moxml::C14nCases::CONFORMANCE_CASES.map(&:first))
44
+ end
45
+ end
46
+
47
+ describe "xsd_structural" do
48
+ Moxml::XsdStructuralCases::CONFORMANCE_CASES.each do |id, schema, instance, valid|
49
+ it "answers #{id} as #{valid ? 'valid' : 'invalid'} on both primaries" do
50
+ Dir.mktmpdir do |dir|
51
+ schema_path = File.join(dir, "#{id}.xsd")
52
+ File.write(schema_path, schema)
53
+ primary.each do |name|
54
+ ctx = Moxml.new(name)
55
+ errors = ctx.xsd_file(schema_path).validate(ctx.parse(instance))
56
+ expect(errors.empty?).to be(valid),
57
+ "#{id} on #{name}: #{errors.map(&:message).join('; ')}"
58
+ end
59
+ end
60
+ end
61
+ end
62
+
63
+ it "is exported by the dataset with the committed rows" do
64
+ path = File.expand_path("../../conformance/moxml-conformance.json",
65
+ __dir__)
66
+ family = JSON.parse(File.read(path)).dig("cases", "xsd_structural") || []
67
+ expect(family.map { |row| row["id"] })
68
+ .to eq(Moxml::XsdStructuralCases::CONFORMANCE_CASES.map(&:first))
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "json"
4
+ require "spec_helper"
5
+
6
+ # The serialization conformance family (#490 item 8, family 5): the
7
+ # committed element-level serialization answers — the rows are the
8
+ # model, exported to conformance/moxml-conformance.json (schema 4)
9
+ # for the cross-language runners. Every row round-trips idempotently
10
+ # on both primary engines (parse -> serialize twice, byte equality).
11
+ #
12
+ # Cross-adapter note (D-25): oga, rexml, ox, headed_ox and libxml
13
+ # emit a literal newline for a `&#10;` character reference in an
14
+ # attribute value; the committed answer is the round-trip-preserving
15
+ # escaped form (nokogiri, leptris), since a literal newline
16
+ # normalizes to space on the next parse. The family pins the primary
17
+ # adapters; the differential's per-adapter rows follow the register.
18
+ RSpec.describe "serialization conformance family (schema 4)" do
19
+ let(:primary) { %i[nokogiri leptris] }
20
+
21
+ Moxml::SerializationCases::CONFORMANCE_CASES.each do |id, input, output|
22
+ it "serializes #{id} to the committed answer" do
23
+ primary.each do |name|
24
+ doc = Moxml.new(name).parse(input)
25
+ expect(doc.root.to_xml(indent: 0)).to eq(output)
26
+ end
27
+ end
28
+ end
29
+
30
+ it "is exported by the dataset with the committed rows" do
31
+ path = File.expand_path("../../conformance/moxml-conformance.json",
32
+ __dir__)
33
+ dataset = JSON.parse(File.read(path))
34
+ family = dataset.dig("cases", "serialization") || []
35
+ expect(family.size).to eq(
36
+ Moxml::SerializationCases::CONFORMANCE_CASES.size,
37
+ )
38
+ expect(family.map { |row| row["id"] })
39
+ .to eq(Moxml::SerializationCases::CONFORMANCE_CASES.map(&:first))
40
+ end
41
+ end
@@ -46,18 +46,27 @@ RSpec.describe Moxml::Adapter do
46
46
  end
47
47
 
48
48
  it "prefers leptris only when the installed binding meets the floor" do
49
+ # Resolve under cold selection: the degradation specs may have
50
+ # left nokogiri pinned while the probe memo is warm-true (the
51
+ # #523 ordering contract) — the invariant tests the RESOLVED
52
+ # answer, not whichever ambient half-state a random order
53
+ # happens to leave.
54
+ ambient = Moxml::Config.default_adapter
55
+ Moxml::Config.reset_adapter_selection!
49
56
  if Moxml::Config.leptris_preferred_available?
50
57
  expect(Moxml::Config.runtime_default_adapter).to eq(:leptris)
51
58
  else
52
59
  expect(Moxml::Config.runtime_default_adapter).not_to eq(:leptris)
53
60
  end
61
+ ensure
62
+ Moxml::Config.default_adapter = ambient
54
63
  end
55
64
 
56
- it "pins the leptris binding floor at 1.9.386.0 (raised 2026-09-20, raised again 2026-10-30; enforced at load)" do
65
+ it "pins the leptris binding floor at 1.9.410.0 (raised 2026-09-20, 2026-10-30, and 2026-11-10; enforced at load)" do
57
66
  skip "leptris not installed" unless described_class.available?(:leptris)
58
67
 
59
68
  adapter = described_class.load(:leptris)
60
- expect(adapter::MINIMUM_BINDING_VERSION).to eq("1.9.386.0")
69
+ expect(adapter::MINIMUM_BINDING_VERSION).to eq("1.9.410.0")
61
70
  expect(Gem::Version.new(Leptris::VERSION))
62
71
  .to be >= Gem::Version.new(adapter::MINIMUM_BINDING_VERSION)
63
72
  end
@@ -71,7 +71,15 @@ RSpec.describe Moxml::Context do
71
71
 
72
72
  refreshed = doc.root
73
73
  expect(refreshed.name).to eq("x")
74
- expect(context.wrapper_for(refreshed.native)).to equal(refreshed)
74
+
75
+ # Exercise the swap explicitly: the map must answer the wrapper
76
+ # under its CURRENT native after refresh_native!. (Probing the
77
+ # pre-swap mint instead raced the wrap path — identity mints
78
+ # register the map only when the canonical fast path was not
79
+ # taken, which made the assertion order-sensitive.)
80
+ replacement = doc.create_element("y")
81
+ refreshed.refresh_native!(replacement.native)
82
+ expect(context.wrapper_for(replacement.native)).to equal(refreshed)
75
83
  end
76
84
  end
77
85
  end
@@ -13,8 +13,8 @@ require "tmpdir"
13
13
  # engine admission gap itself is RESOLVED in leptris 1.9.409
14
14
  # (leptris#1964 — register entry D-23). The 1.9.409 namespace-aware
15
15
  # particle wave carries an upstream schG2 lexical regression
16
- # (leptris#1976, residual leptris#1979 — register entry D-24); its rows are lexical, not
17
- # admission rows, and pass through untouched here.
16
+ # (leptris#1979 — register entry D-24, RESOLVED: the engine fix landed in 1.9.410
17
+ # and the vendored corpus was missing the schG1_c.xsd C unit); 16/16 verified.
18
18
  RSpec.describe "Moxml::XSD::Schema composed-schema validation (#522)" do
19
19
  let(:ctx) { Moxml.new(:leptris) }
20
20
  let(:main_xsd) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moxml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
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-06 00:00:00.000000000 Z
11
+ date: 2026-11-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Moxml is a unified XML manipulation library that provides a common API
@@ -79,6 +79,7 @@ files:
79
79
  - docs/_pages/best-practices.adoc
80
80
  - docs/_pages/compatibility.adoc
81
81
  - docs/_pages/configuration.adoc
82
+ - docs/_pages/conformance.adoc
82
83
  - docs/_pages/conversion-apis.adoc
83
84
  - docs/_pages/divergences.adoc
84
85
  - docs/_pages/ecosystem.adoc
@@ -202,6 +203,7 @@ files:
202
203
  - lib/moxml/c14n/processor.rb
203
204
  - lib/moxml/c14n/writer.rb
204
205
  - lib/moxml/c14n/xml_base_handler.rb
206
+ - lib/moxml/c14n_cases.rb
205
207
  - lib/moxml/cdata.rb
206
208
  - lib/moxml/comment.rb
207
209
  - lib/moxml/config.rb
@@ -239,6 +241,7 @@ files:
239
241
  - lib/moxml/sax/element_handler.rb
240
242
  - lib/moxml/sax/handler.rb
241
243
  - lib/moxml/sax/namespace_splitter.rb
244
+ - lib/moxml/serialization_cases.rb
242
245
  - lib/moxml/signature.rb
243
246
  - lib/moxml/signature/algorithms.rb
244
247
  - lib/moxml/signature/algorithms/base64_transform.rb
@@ -311,6 +314,7 @@ files:
311
314
  - lib/moxml/xsd.rb
312
315
  - lib/moxml/xsd/builtin_lexical.rb
313
316
  - lib/moxml/xsd/schema_rules.rb
317
+ - lib/moxml/xsd_structural_cases.rb
314
318
  - lib/moxml/xslt.rb
315
319
  - lib/moxml/xslt/stylesheet.rb
316
320
  - moxml.gemspec
@@ -323,6 +327,7 @@ files:
323
327
  - spec/consistency/README.md
324
328
  - spec/consistency/adapter_parity_spec.rb
325
329
  - spec/consistency/citation_hygiene_spec.rb
330
+ - spec/consistency/conformance_families_spec.rb
326
331
  - spec/consistency/differential_taxonomy_spec.rb
327
332
  - spec/consistency/divergence_register_spec.rb
328
333
  - spec/consistency/document_text_spec.rb
@@ -335,6 +340,7 @@ files:
335
340
  - spec/consistency/published_docs_spec.rb
336
341
  - spec/consistency/reference_differential_spec.rb
337
342
  - spec/consistency/round_trip_spec.rb
343
+ - spec/consistency/serialization_family_spec.rb
338
344
  - spec/consistency/spec_constant_uniqueness_spec.rb
339
345
  - spec/consistency/xpath_idioms_spec.rb
340
346
  - spec/consistency/xslt_spec.rb