moxml 0.5.171 → 0.5.173

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +23 -0
  3. data/conformance/moxml-conformance.json +413 -0
  4. data/docs/_pages/model-coverage.adoc +1 -0
  5. data/docs/_references/processing-model.adoc +7 -1
  6. data/lib/moxml/adapter/base.rb +9 -0
  7. data/lib/moxml/adapter/customized_leptris/declaration.rb +9 -0
  8. data/lib/moxml/adapter/customized_leptris/doctype.rb +8 -0
  9. data/lib/moxml/adapter/customized_leptris/entity_reference.rb +8 -0
  10. data/lib/moxml/adapter/customized_leptris/text_segment.rb +8 -0
  11. data/lib/moxml/adapter/customized_leptris.rb +5 -0
  12. data/lib/moxml/adapter/customized_libxml/cdata.rb +2 -0
  13. data/lib/moxml/adapter/customized_libxml/comment.rb +2 -0
  14. data/lib/moxml/adapter/customized_libxml/declaration.rb +2 -0
  15. data/lib/moxml/adapter/customized_libxml/element.rb +2 -0
  16. data/lib/moxml/adapter/customized_libxml/entity_reference.rb +2 -0
  17. data/lib/moxml/adapter/customized_libxml/node.rb +2 -0
  18. data/lib/moxml/adapter/customized_libxml/processing_instruction.rb +2 -0
  19. data/lib/moxml/adapter/customized_libxml/text.rb +2 -0
  20. data/lib/moxml/adapter/customized_libxml.rb +3 -0
  21. data/lib/moxml/adapter/customized_oga/entity_decoder.rb +8 -0
  22. data/lib/moxml/adapter/customized_oga/raw_value_override.rb +8 -0
  23. data/lib/moxml/adapter/customized_oga/xml_declaration.rb +8 -0
  24. data/lib/moxml/adapter/customized_oga/xml_generator.rb +1 -1
  25. data/lib/moxml/adapter/customized_oga.rb +4 -0
  26. data/lib/moxml/adapter/customized_ox/attribute.rb +5 -0
  27. data/lib/moxml/adapter/customized_ox/entity_reference.rb +5 -0
  28. data/lib/moxml/adapter/customized_ox/namespace.rb +5 -0
  29. data/lib/moxml/adapter/customized_ox/text.rb +6 -0
  30. data/lib/moxml/adapter/customized_ox.rb +3 -0
  31. data/lib/moxml/adapter/customized_rexml/entity_reference.rb +5 -0
  32. data/lib/moxml/adapter/customized_rexml/formatter.rb +6 -0
  33. data/lib/moxml/adapter/customized_rexml.rb +4 -0
  34. data/lib/moxml/adapter/leptris.rb +31 -0
  35. data/lib/moxml/adapter.rb +13 -0
  36. data/lib/moxml/version.rb +1 -1
  37. data/lib/moxml/xsd/builtin_lexical.rb +100 -0
  38. data/spec/moxml/adapter/customized_lifecycle_audit_spec.rb +49 -0
  39. data/spec/moxml/adapter_capabilities_spec.rb +48 -0
  40. data/spec/moxml/adapter_registry_spec.rb +44 -0
  41. data/spec/moxml/customized_lifecycle_spec.rb +47 -0
  42. data/spec/moxml/xsd_conformance_cases_spec.rb +37 -0
  43. data/spec/support/model_coverage.rb +4 -0
  44. metadata +7 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd5e790791e306829e87770a45424b006c9a535c95c825adfc7d0800816ceb7d
4
- data.tar.gz: c3348f9fb7c6c0ccf00ab4bc16bba51b0812331d12d8478d2a77e09b8a600e58
3
+ metadata.gz: be4403ff94123c6d65bf53402d99fee7462bd4d3e9c3ae34f87ff43170fddc29
4
+ data.tar.gz: 642a836819599fc943103d87d0148cf34e40544d94cf376b4d2d74e5d65bc25e
5
5
  SHA512:
6
- metadata.gz: 2972a94dc0bf75896d29432c1856b949090cbd8547b60c402376f2d715c743c8e029af2181531fbd327d6615a3a6aef5cb83144c5ff2b6389f35bd3ab6dfea59
7
- data.tar.gz: c89e1be189130b17f0a7f61c67c9caba0624f589c29a2407effba7fb50da72304d33db77001185cb7b079729a7a29140d32e8a492269a58cf748a8e99f0276a2
6
+ metadata.gz: 0ac3bb7ae1148c02ed3c9812c448c8a20e521854f201c20ef22a22dbbc4cd9c12f01d0d1ea4d19f29d4f35f6781d83ace0d4db88957877a8758a621c4b720ecb
7
+ data.tar.gz: 2513f3da33f3b1836276b51428e9db7e814416db761bcaa3813bf0fd326851359e5a3cc6bb2e62401f0bbbf0aaa44b44dc7992dbb58a4bc475849cc659dd720d
data/Rakefile CHANGED
@@ -350,4 +350,27 @@ namespace :docs do
350
350
  end
351
351
  end
352
352
 
353
+ namespace :conformance do
354
+ desc "Export the cross-language conformance dataset to JSON (#496)"
355
+ task :export do
356
+ require "json"
357
+ require_relative "lib/moxml"
358
+ dataset = Moxml::XSD::BuiltinLexical::CONFORMANCE_CASES
359
+ payload = {
360
+ schema: 1,
361
+ generator: "moxml #{Moxml::VERSION}",
362
+ cases: {
363
+ "builtin_lexical" => dataset.map do |type, lexical, expected|
364
+ { "type" => type, "lexical" => lexical, "valid" => expected }
365
+ end,
366
+ },
367
+ }
368
+ dir = File.expand_path("conformance", __dir__)
369
+ FileUtils.mkdir_p(dir)
370
+ target = File.join(dir, "moxml-conformance.json")
371
+ File.write(target, "#{JSON.pretty_generate(payload)}\n")
372
+ puts "conformance: exported #{dataset.size} cases to #{target}"
373
+ end
374
+ end
375
+
353
376
  task default: :spec
@@ -0,0 +1,413 @@
1
+ {
2
+ "schema": 1,
3
+ "generator": "moxml 0.5.171",
4
+ "cases": {
5
+ "builtin_lexical": [
6
+ {
7
+ "type": "xs:token",
8
+ "lexical": "a b",
9
+ "valid": true
10
+ },
11
+ {
12
+ "type": "xs:ID",
13
+ "lexical": " id ",
14
+ "valid": true
15
+ },
16
+ {
17
+ "type": "xs:NMTOKEN",
18
+ "lexical": "\tx ",
19
+ "valid": true
20
+ },
21
+ {
22
+ "type": "xs:ID",
23
+ "lexical": "1d",
24
+ "valid": false
25
+ },
26
+ {
27
+ "type": "xs:integer",
28
+ "lexical": "11111111111111111111111111111",
29
+ "valid": true
30
+ },
31
+ {
32
+ "type": "xs:positiveInteger",
33
+ "lexical": "11111111111111111111111111111",
34
+ "valid": true
35
+ },
36
+ {
37
+ "type": "xs:nonNegativeInteger",
38
+ "lexical": "11111111111111111111111111111",
39
+ "valid": true
40
+ },
41
+ {
42
+ "type": "xs:negativeInteger",
43
+ "lexical": "-100000000000000000000",
44
+ "valid": true
45
+ },
46
+ {
47
+ "type": "xs:nonPositiveInteger",
48
+ "lexical": "0",
49
+ "valid": true
50
+ },
51
+ {
52
+ "type": "xs:nonPositiveInteger",
53
+ "lexical": "-0",
54
+ "valid": true
55
+ },
56
+ {
57
+ "type": "xs:long",
58
+ "lexical": "9223372036854775807",
59
+ "valid": true
60
+ },
61
+ {
62
+ "type": "xs:long",
63
+ "lexical": "9223372036854775808",
64
+ "valid": false
65
+ },
66
+ {
67
+ "type": "xs:unsignedLong",
68
+ "lexical": "18446744073709551615",
69
+ "valid": true
70
+ },
71
+ {
72
+ "type": "xs:unsignedLong",
73
+ "lexical": "18446744073709551616",
74
+ "valid": false
75
+ },
76
+ {
77
+ "type": "xs:byte",
78
+ "lexical": "128",
79
+ "valid": false
80
+ },
81
+ {
82
+ "type": "xs:unsignedByte",
83
+ "lexical": "256",
84
+ "valid": false
85
+ },
86
+ {
87
+ "type": "xs:float",
88
+ "lexical": "+INF",
89
+ "valid": true
90
+ },
91
+ {
92
+ "type": "xs:double",
93
+ "lexical": "-INF",
94
+ "valid": true
95
+ },
96
+ {
97
+ "type": "xs:float",
98
+ "lexical": "NaN",
99
+ "valid": true
100
+ },
101
+ {
102
+ "type": "xs:float",
103
+ "lexical": "1.5E-3",
104
+ "valid": true
105
+ },
106
+ {
107
+ "type": "xs:decimal",
108
+ "lexical": "5.",
109
+ "valid": true
110
+ },
111
+ {
112
+ "type": "xs:decimal",
113
+ "lexical": ".5",
114
+ "valid": true
115
+ },
116
+ {
117
+ "type": "xs:decimal",
118
+ "lexical": "1e3",
119
+ "valid": false
120
+ },
121
+ {
122
+ "type": "xs:date",
123
+ "lexical": "2024-02-29",
124
+ "valid": true
125
+ },
126
+ {
127
+ "type": "xs:date",
128
+ "lexical": "1999-02-29",
129
+ "valid": false
130
+ },
131
+ {
132
+ "type": "xs:date",
133
+ "lexical": "2024-04-31",
134
+ "valid": false
135
+ },
136
+ {
137
+ "type": "xs:date",
138
+ "lexical": "2024-13-01",
139
+ "valid": false
140
+ },
141
+ {
142
+ "type": "xs:date",
143
+ "lexical": "not-a-date",
144
+ "valid": false
145
+ },
146
+ {
147
+ "type": "xs:dateTime",
148
+ "lexical": "2024-02-29T23:59:59Z",
149
+ "valid": true
150
+ },
151
+ {
152
+ "type": "xs:dateTime",
153
+ "lexical": "1999-02-29T00:00:00",
154
+ "valid": false
155
+ },
156
+ {
157
+ "type": "xs:dateTime",
158
+ "lexical": "not-a-date",
159
+ "valid": false
160
+ },
161
+ {
162
+ "type": "xs:dateTimeStamp",
163
+ "lexical": "2024-02-29T00:00:00Z",
164
+ "valid": true
165
+ },
166
+ {
167
+ "type": "xs:dateTimeStamp",
168
+ "lexical": "2024-02-29T00:00:00",
169
+ "valid": false
170
+ },
171
+ {
172
+ "type": "xs:time",
173
+ "lexical": "23:59:59.999+05:30",
174
+ "valid": true
175
+ },
176
+ {
177
+ "type": "xs:time",
178
+ "lexical": "24:00:00",
179
+ "valid": false
180
+ },
181
+ {
182
+ "type": "xs:time",
183
+ "lexical": "25:20:00",
184
+ "valid": false
185
+ },
186
+ {
187
+ "type": "xs:time",
188
+ "lexical": "13:20:60",
189
+ "valid": false
190
+ },
191
+ {
192
+ "type": "xs:gYearMonth",
193
+ "lexical": "2024-02Z",
194
+ "valid": true
195
+ },
196
+ {
197
+ "type": "xs:gYearMonth",
198
+ "lexical": "2024-13",
199
+ "valid": false
200
+ },
201
+ {
202
+ "type": "xs:gMonthDay",
203
+ "lexical": "--02-29",
204
+ "valid": true
205
+ },
206
+ {
207
+ "type": "xs:gMonthDay",
208
+ "lexical": "--02-30",
209
+ "valid": false
210
+ },
211
+ {
212
+ "type": "xs:gDay",
213
+ "lexical": "---31",
214
+ "valid": true
215
+ },
216
+ {
217
+ "type": "xs:gDay",
218
+ "lexical": "---32",
219
+ "valid": false
220
+ },
221
+ {
222
+ "type": "xs:duration",
223
+ "lexical": "P1Y2M3DT4H5M6.5S",
224
+ "valid": true
225
+ },
226
+ {
227
+ "type": "xs:duration",
228
+ "lexical": "PT0S",
229
+ "valid": true
230
+ },
231
+ {
232
+ "type": "xs:duration",
233
+ "lexical": "-P1D",
234
+ "valid": true
235
+ },
236
+ {
237
+ "type": "xs:duration",
238
+ "lexical": "P",
239
+ "valid": false
240
+ },
241
+ {
242
+ "type": "xs:duration",
243
+ "lexical": "PT",
244
+ "valid": false
245
+ },
246
+ {
247
+ "type": "xs:duration",
248
+ "lexical": "P1Y2MT",
249
+ "valid": false
250
+ },
251
+ {
252
+ "type": "xs:duration",
253
+ "lexical": "P200.5Y",
254
+ "valid": false
255
+ },
256
+ {
257
+ "type": "xs:dayTimeDuration",
258
+ "lexical": "P1DT2H",
259
+ "valid": true
260
+ },
261
+ {
262
+ "type": "xs:dayTimeDuration",
263
+ "lexical": "P1Y",
264
+ "valid": false
265
+ },
266
+ {
267
+ "type": "xs:yearMonthDuration",
268
+ "lexical": "P1Y2M",
269
+ "valid": true
270
+ },
271
+ {
272
+ "type": "xs:yearMonthDuration",
273
+ "lexical": "P1D",
274
+ "valid": false
275
+ },
276
+ {
277
+ "type": "xs:yearMonthDuration",
278
+ "lexical": "P1YT1H",
279
+ "valid": false
280
+ },
281
+ {
282
+ "type": "xs:base64Binary",
283
+ "lexical": "aGVsbG8=",
284
+ "valid": true
285
+ },
286
+ {
287
+ "type": "xs:base64Binary",
288
+ "lexical": "abcd",
289
+ "valid": true
290
+ },
291
+ {
292
+ "type": "xs:base64Binary",
293
+ "lexical": "abcde",
294
+ "valid": false
295
+ },
296
+ {
297
+ "type": "xs:base64Binary",
298
+ "lexical": "a b",
299
+ "valid": false
300
+ },
301
+ {
302
+ "type": "xs:hexBinary",
303
+ "lexical": "0A",
304
+ "valid": true
305
+ },
306
+ {
307
+ "type": "xs:hexBinary",
308
+ "lexical": "0AB",
309
+ "valid": false
310
+ },
311
+ {
312
+ "type": "xs:QName",
313
+ "lexical": "foo",
314
+ "valid": true
315
+ },
316
+ {
317
+ "type": "xs:QName",
318
+ "lexical": "ns:foo",
319
+ "valid": true
320
+ },
321
+ {
322
+ "type": "xs:QName",
323
+ "lexical": "xmlns:xsi",
324
+ "valid": false
325
+ },
326
+ {
327
+ "type": "xs:QName",
328
+ "lexical": ":foo",
329
+ "valid": false
330
+ },
331
+ {
332
+ "type": "xs:QName",
333
+ "lexical": "a:b:c",
334
+ "valid": false
335
+ },
336
+ {
337
+ "type": "xs:NOTATION",
338
+ "lexical": "foo",
339
+ "valid": true
340
+ },
341
+ {
342
+ "type": "xs:IDREFS",
343
+ "lexical": "a b",
344
+ "valid": true
345
+ },
346
+ {
347
+ "type": "xs:IDREFS",
348
+ "lexical": "a",
349
+ "valid": true
350
+ },
351
+ {
352
+ "type": "xs:IDREFS",
353
+ "lexical": "",
354
+ "valid": false
355
+ },
356
+ {
357
+ "type": "xs:NMTOKENS",
358
+ "lexical": "a.b-c:d e",
359
+ "valid": true
360
+ },
361
+ {
362
+ "type": "xs:ENTITIES",
363
+ "lexical": "a 1",
364
+ "valid": false
365
+ },
366
+ {
367
+ "type": "xs:string",
368
+ "lexical": "anything <>&",
369
+ "valid": true
370
+ },
371
+ {
372
+ "type": "xs:anyURI",
373
+ "lexical": "http://example.com/a b",
374
+ "valid": true
375
+ },
376
+ {
377
+ "type": "xs:boolean",
378
+ "lexical": "true",
379
+ "valid": true
380
+ },
381
+ {
382
+ "type": "xs:boolean",
383
+ "lexical": "0",
384
+ "valid": true
385
+ },
386
+ {
387
+ "type": "xs:boolean",
388
+ "lexical": "TRUE",
389
+ "valid": false
390
+ },
391
+ {
392
+ "type": "xs:language",
393
+ "lexical": "en-US",
394
+ "valid": true
395
+ },
396
+ {
397
+ "type": "xs:language",
398
+ "lexical": "en_US",
399
+ "valid": false
400
+ },
401
+ {
402
+ "type": "xs:Name",
403
+ "lexical": "a:b",
404
+ "valid": true
405
+ },
406
+ {
407
+ "type": "xs:NCName",
408
+ "lexical": "a:b",
409
+ "valid": false
410
+ }
411
+ ]
412
+ }
413
+ }
@@ -48,6 +48,7 @@ Generated by `bundle exec rake docs:coverage` from the coverage matrix and the d
48
48
  | validation schema sets | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
49
49
  | validation substitution dismissal | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
50
50
  | loud capability contracts | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
51
+ | engine capability report | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent | equivalent
51
52
  |===
52
53
 
53
54
  *equivalent* — all adapters answer the same observable result. *loud (...)* — the adapter raises the named error for that face. *D-NN* — a registered divergence in link:divergences.html[the register], with its rationale. Every cell cites a pin; see the processing model's `Pins::` line for the enforcing specs.
@@ -314,7 +314,7 @@ answers without raising. RELAX NG rides engines with an RNG face
314
314
 
315
315
  === Errors and loud degradation
316
316
 
317
- Pins:: `spec/consistency/loud_degradation_spec.rb`
317
+ Pins:: `spec/consistency/loud_degradation_spec.rb`, `spec/moxml/adapter_capabilities_spec.rb`
318
318
 
319
319
  * `Moxml::Error` hierarchy; `Moxml::XPathError`, `Moxml::XsltError`,
320
320
  `Moxml::AdapterError` (e.g. schema-handle/adapter misroute),
@@ -324,6 +324,12 @@ Pins:: `spec/consistency/loud_degradation_spec.rb`
324
324
  * Adapter degradation is loud: a present-but-unusable preferred adapter
325
325
  warns at configuration and misroutes fail at the wrap, not deep in
326
326
  a call.
327
+ * Engines with a capability story answer `Adapter.capabilities` — one
328
+ frozen report of the runtime-variable faces they serve plus their
329
+ engine version, queried once at attach. The support faces (xsd,
330
+ relaxng, xslt, digest) answer even when unconditional; internal
331
+ routing gates the floor made constant are absent by design.
332
+ Adapters without a capability story answer nil.
327
333
 
328
334
  === Performance: a declared, non-semantic channel
329
335
 
@@ -698,6 +698,15 @@ namespace_validation_mode: :strict)
698
698
  nil
699
699
  end
700
700
 
701
+ # The engine capability report (#493): a frozen hash of the
702
+ # runtime-variable faces this adapter serves, plus its engine
703
+ # version — queried once at attach, never version-gate
704
+ # constants. Adapters without a capability story answer nil
705
+ # (documented last resort, plan_rows-style).
706
+ def capabilities
707
+ nil
708
+ end
709
+
701
710
  # Struct-plan executor (Moxml::StructPlan): +spec+ compiles
702
711
  # the consumer's shape as {name => [Struct class, attrs
703
712
  # Hash (name => slot Symbol), text slot, children slot]}.
@@ -1,5 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Wrapper for an XML declaration.
4
+ #
5
+ # Lifecycle record: libleptris models the declaration as document-state
6
+ # flags — setters shipped (leptris#1094) and clear shipped
7
+ # (leptris#1229, binding 1.9.204.0) — but there is still no first-class
8
+ # declaration NODE, so the facade keeps this mutable, removable value
9
+ # object as the node stand-in. Dissolves when libleptris exposes
10
+ # declaration node identity (leptris#1904's successor surface).
11
+
3
12
  module Moxml
4
13
  module Adapter
5
14
  module CustomizedLeptris
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Wrapper for a programmatic DOCTYPE.
4
+ #
5
+ # Lifecycle record: set shipped (leptris#212, binding 1.9.176) and unset
6
+ # shipped (leptris#1229, binding 1.9.204.0 remove_doctype), but there is
7
+ # still no first-class DOCTYPE NODE — the facade keeps this value object
8
+ # as the node stand-in in the document's attachments. Dissolves with
9
+ # declaration node identity (see customized_leptris/declaration.rb).
10
+
3
11
  module Moxml
4
12
  module Adapter
5
13
  module CustomizedLeptris
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Parse-path face: libleptris expands the five built-in entities at
4
+ # parse time and has no custom ones, so parsed references are carried
5
+ # as Moxml::Entity::Reference values over marker-bearing text.
6
+ # Programmatic creation is native (NATIVE_ENTITY_REFS, binding >= 1.9.177).
7
+ #
8
+ # Lifecycle record: dissolves when parse-time entity reference retention
9
+ # ships — leptris#1904 (references as nodes or bulk positions).
10
+
3
11
  module Moxml
4
12
  module Adapter
5
13
  module CustomizedLeptris
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # A text run split out of a native text node that carried entity
4
+ # markers. Value object: the moxml contract exposes text nodes as
5
+ # separate children around entity references, while libleptris stores
6
+ # them as one marker-bearing text node.
7
+ #
8
+ # Lifecycle record: dissolves with entity reference retention —
9
+ # leptris#1904 (see customized_leptris/entity_reference.rb).
10
+
3
11
  module Moxml
4
12
  module Adapter
5
13
  module CustomizedLeptris
@@ -7,6 +7,11 @@ module Moxml
7
7
  # and document-level processing instructions.
8
8
  # The adapter stores them via NativeAttachment and serializes them
9
9
  # from #to_xml.
10
+ #
11
+ # Lifecycle record (#495): a tracked shim, not an adapter-fate
12
+ # case — the parse-time entity-retention gap is the last engine
13
+ # ask of the #275 mutation-completion round; when the engine ships
14
+ # native retention these classes dissolve into Base.
10
15
  module CustomizedLeptris
11
16
  autoload :Declaration, "moxml/adapter/customized_leptris/declaration"
12
17
  autoload :Doctype, "moxml/adapter/customized_leptris/doctype"
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Lifecycle record: the :libxml adapter is deprecated (#491); this wrapper dies with it.
4
+
3
5
  module Moxml
4
6
  module Adapter
5
7
  module CustomizedLibxml
@@ -2,6 +2,9 @@
2
2
 
3
3
  module Moxml
4
4
  module Adapter
5
+ # Lifecycle record (#495): engine-gap shims for the :libxml
6
+ # adapter, deprecated in moxml#491 -- removed with it after the
7
+ # cycle. No separate upstream ask; the adapter's fate governs.
5
8
  module CustomizedLibxml
6
9
  autoload :Cdata, "moxml/adapter/customized_libxml/cdata"
7
10
  autoload :Comment, "moxml/adapter/customized_libxml/comment"
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Override Oga::EntityDecoder.decode for XML inputs.
4
+ #
5
+ # Engine gap (upstream oga): Oga 3.4's stock Oga::XML::Entities.decode
6
+ # runs multiple passes, turning the well-formed "&amp;#38;" into "&"
7
+ # rather than the correct "&#38;". Upstream tracker:
8
+ # https://github.com/yorickpeterse/oga — the override stays until oga
9
+ # fixes the decoder or the adapter is retired.
10
+
3
11
  require "oga"
4
12
 
5
13
  module Moxml
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Bypass Oga's lazy decoder for user-authored values.
4
+ #
5
+ # Engine gap (upstream oga): Oga::XML::Attribute#value and
6
+ # Oga::XML::Text#text decode @value/@text on first read via
7
+ # Oga::EntityDecoder; EntityDecoderOverride (this directory) must hold
8
+ # user-authored raw values. Upstream tracker:
9
+ # https://github.com/yorickpeterse/oga
10
+
3
11
  require "oga"
4
12
 
5
13
  module Moxml