moxml 0.6.3 → 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: 769900ed7676cee2de32bcb98a390616a5284bec301789ab95af7bc3d7384971
4
- data.tar.gz: 9bd2bcb7eda50b2d4246ec8caea424971e291c00cbc6789e14c18c9f1ed61b7f
3
+ metadata.gz: e72bde533d70d24badbc7842d4b159d3117ce8012927058de45ed59eb5f0ea04
4
+ data.tar.gz: bed3791ded78c2dc173b94e73d321c751fc542ad98a9799b05f68e677c1ac5eb
5
5
  SHA512:
6
- metadata.gz: bc5ad58955107e459f8432084c9a049d4217ac9b56a9a378969d14b88bcf8ac7cf582cfa9db899adb116ff5a1e4c88e93153eb9ef5d61066f3d6144045ccd359
7
- data.tar.gz: 1f8b0344a42afbf5c3c8b59e43fa72e322a8700ecc2d39c1450c14f1cbed31c2b81b910ce34f8b20f422792b8e92ddfff0ad967d3fc61f6301722b836dd6f242
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.
@@ -156,3 +156,45 @@ before leptris#1866's fix (the fix itself is not the cause); not a
156
156
  regression of the fix. Noted in
157
157
  `spec/moxml/adapter/leptris_crossdoc_replace_spec.rb`.
158
158
  |===
159
+
160
+ | D-23
161
+ | leptris (XSD engine lane, before 1.9.409)
162
+ | Strict wildcard/anyAttribute admission consulted only the head
163
+ unit's declaration table, so items declared in a NON-head unit of a
164
+ composition (xsi:schemaLocation hint documents) got "not declared
165
+ (strict)" rows. The facade owns the composition: Schema#validate
166
+ resolves the instance's hints against the schema path, walks the
167
+ schema graph (include/import/redefine) for the unit closure, and
168
+ dismisses refutable rows — global declarations AND group members
169
+ (moxml#528; group admission this entry's companion). RESOLVED
170
+ engine-side by leptris/leptris#1964 (v1.9.409, namespace-aware
171
+ particle typing): the 16-case W3C set (attgD019-034, attgC035-038,
172
+ addB114) answers VALID through the facade. Verified through the
173
+ lutaml-xsd conformance runner (locations registration
174
+ lutaml/lutaml-xsd#234); pinned in `spec/moxml/xsd_composed_spec.rb`.
175
+
176
+ | D-24
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).
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