moxml 0.5.170 → 0.5.172

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/README.adoc +6 -7
  3. data/Rakefile +23 -0
  4. data/conformance/moxml-conformance.json +413 -0
  5. data/lib/moxml/adapter/customized_leptris/declaration.rb +9 -0
  6. data/lib/moxml/adapter/customized_leptris/doctype.rb +8 -0
  7. data/lib/moxml/adapter/customized_leptris/entity_reference.rb +8 -0
  8. data/lib/moxml/adapter/customized_leptris/text_segment.rb +8 -0
  9. data/lib/moxml/adapter/customized_leptris.rb +5 -0
  10. data/lib/moxml/adapter/customized_libxml/cdata.rb +2 -0
  11. data/lib/moxml/adapter/customized_libxml/comment.rb +2 -0
  12. data/lib/moxml/adapter/customized_libxml/declaration.rb +2 -0
  13. data/lib/moxml/adapter/customized_libxml/element.rb +2 -0
  14. data/lib/moxml/adapter/customized_libxml/entity_reference.rb +2 -0
  15. data/lib/moxml/adapter/customized_libxml/node.rb +2 -0
  16. data/lib/moxml/adapter/customized_libxml/processing_instruction.rb +2 -0
  17. data/lib/moxml/adapter/customized_libxml/text.rb +2 -0
  18. data/lib/moxml/adapter/customized_libxml.rb +3 -0
  19. data/lib/moxml/adapter/customized_oga/entity_decoder.rb +8 -0
  20. data/lib/moxml/adapter/customized_oga/raw_value_override.rb +8 -0
  21. data/lib/moxml/adapter/customized_oga/xml_declaration.rb +8 -0
  22. data/lib/moxml/adapter/customized_oga/xml_generator.rb +1 -1
  23. data/lib/moxml/adapter/customized_oga.rb +4 -0
  24. data/lib/moxml/adapter/customized_ox/attribute.rb +5 -0
  25. data/lib/moxml/adapter/customized_ox/entity_reference.rb +5 -0
  26. data/lib/moxml/adapter/customized_ox/namespace.rb +5 -0
  27. data/lib/moxml/adapter/customized_ox/text.rb +6 -0
  28. data/lib/moxml/adapter/customized_ox.rb +3 -0
  29. data/lib/moxml/adapter/customized_rexml/entity_reference.rb +5 -0
  30. data/lib/moxml/adapter/customized_rexml/formatter.rb +6 -0
  31. data/lib/moxml/adapter/customized_rexml.rb +4 -0
  32. data/lib/moxml/adapter/leptris.rb +15 -32
  33. data/lib/moxml/adapter/nokogiri.rb +12 -4
  34. data/lib/moxml/adapter.rb +33 -0
  35. data/lib/moxml/context.rb +1 -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_deprecation_spec.rb +49 -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/sax_entity_parity_spec.rb +27 -2
  43. data/spec/moxml/xsd_conformance_cases_spec.rb +37 -0
  44. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68f6b7acd8107269dc0e15246d3990ef57d3afaa0516896c43fa2db3acfc4cc5
4
- data.tar.gz: b6511730c2af6f71b66b1a07b118260fc76c6069bd000be29539beb7462522b5
3
+ metadata.gz: f8719e57bb76ceb63baa171d151028d8aff538fc351be7397b6ec5a492c8bdf1
4
+ data.tar.gz: 8fa85d23570f0588da0eb5d4ce5f83d59fb28e325d587f7210d3380a8afd5e33
5
5
  SHA512:
6
- metadata.gz: b3c3f675bc7ecc526414d7cf045e33dbbcd14ff4b52794552a7ccd4d69b6efab0e3bf14cf5d56e05e3b48e7852795a6a9181ac15c98504233dac324c0c54a6ec
7
- data.tar.gz: 47fdcc6d4e46766f75bf4927b89ae95931d8920e0fc5f8213a48167b2f5b19ded9f1807bbf13c2351e8735e71e3210f7829f913a7bbb2a82781ca88a68405729
6
+ metadata.gz: b93fc457a9d7435e2a55cb4fb5e3320d37b5949e77b184c640dd65a8b21954aab9987f204c8916411d9bfe6e11f7f0e358faa78f1ee9cfe3477f52b2d209e857
7
+ data.tar.gz: 78c66d6b3bdbb800b8cf23dde851235ab3a621bbb30fd0c413db06f9f856ba245b56f9a2c4a4d8220ca313b3bb2ef447d5737733387052bd82f2151cfd7bcdc5
data/README.adoc CHANGED
@@ -95,7 +95,8 @@ adapter refuses to load below its floor.
95
95
 
96
96
  |Ox
97
97
  |>= 2.14
98
- |Tested against the 2.14 line.
98
+ |DEPRECATED (#491) — warned at configuration; use :leptris (primary)
99
+ or :nokogiri. Removal after the deprecation cycle.
99
100
 
100
101
  |Oga
101
102
  |3.4 / 3.5
@@ -105,8 +106,9 @@ moxml's customized generator and decoder overrides.
105
106
 
106
107
  |LibXML (libxml-ruby)
107
108
  |>= 5.0
108
- |6.x works and is the installed default on Ruby >= 3.2 (libxml-ruby
109
- 6.0 itself requires Ruby >= 3.2); Ruby 3.1 resolves 5.x.
109
+ |DEPRECATED (#491) — warned at configuration; use :nokogiri (the
110
+ same libxml2 engine, governed by the consistency suite). Removal
111
+ after the deprecation cycle.
110
112
 
111
113
  |Leptris (leptris-ruby)
112
114
  |>= 1.9.194.1
@@ -114,10 +116,7 @@ moxml's customized generator and decoder overrides.
114
116
  Raised from 1.9.32 (2026-09-20): every known consumer resolves a
115
117
  modern binding, and the sub-1.9.194 accommodation paths are deleted.
116
118
  Newer bindings unlock more native surface automatically:
117
- 1.9.163.7+ single-result XPath seams, 1.9.174.4+ C-minted identity
118
- wrappers, 1.9.174.6+ one-dispatch subtree walks, 1.9.177+ first-class
119
- entity references (`entity_mode: :keep`), 1.9.193.4+ native plan rows
120
- (`Moxml::Plan`), 1.9.194.1+ hot-read aliases, 1.9.201.1+ the C struct
119
+ 1.9.194.1+ hot-read aliases, 1.9.201.1+ the C struct
121
120
  executor (`Moxml::StructPlan`; the floor is the varargs-mint fix),
122
121
  1.9.204+ native document-level parts (created DOCTYPEs as native
123
122
  nodes, document-PI removal, declaration clear), 1.9.240+ the bulk
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
+ }
@@ -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
@@ -1,5 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Stand-in XML declaration node.
4
+ #
5
+ # Engine gap (upstream oga): Oga::XML::XmlDeclaration is not writable —
6
+ # version/encoding/standalone cannot be set on an instance the way the
7
+ # facade contract requires, so this subclass owns the state and renders
8
+ # the declaration itself. Upstream tracker:
9
+ # https://github.com/yorickpeterse/oga
10
+
3
11
  require "oga"
4
12
 
5
13
  module Moxml