moxml 0.6.9 → 0.6.11

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: cc0dda0f9bbdf4fb0a15c838dfc7473b449e748b89a06297251b8eca26fc1b00
4
- data.tar.gz: 7ed72ebaab1c2314a15bde5fcc28c1faa972505d18ad2377aaddaf6d6ba3e7a4
3
+ metadata.gz: 00eccdc5e729d9351e2248793f63390fd187422f230b24cb7e004b48a987214c
4
+ data.tar.gz: c38c15b437514f9cd5b6fdbfca07248f50446f66fd3123c241bca91557d3124b
5
5
  SHA512:
6
- metadata.gz: 60fb29b4a82b964bc1021ab7eeb1f632ab36535ad59f1b546bc6562d46b41fd6e1ef1a92906ff1010bc0f3520fd2aa871a503f7b327e64d8c2852c9611504a48
7
- data.tar.gz: c388f5f4f58a8e357c736d4cb23afe08b241c007207e70e13f3589baa10341eed4d2da77e6d46e54ccd81da2ded30aa3fd5d935f0d8464b6f6d3b4c334fff3ca
6
+ metadata.gz: e9dea42308d15473d1c16e9505e9aa20c4d432230721217790676ca94996ce1acc331900b44a7cc43e1b1943d509694b6ec77480d26c3cc84e561bcc342130b5
7
+ data.tar.gz: 4e212373a3d89dda208cc841a88a5b460effefab472e1d80341aae1e70b29af920ac7e97de144e0c1aba82f8c6779756c4bd5c048bff5c5e040ea93010472bb2
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.410"
15
+ gem "leptris", "~> 1.9.420.2"
16
16
  gem "libxml-ruby", ">= 5.0"
17
17
  gem "nokogiri", "~> 1.18"
18
18
  gem "oga"
data/README.adoc CHANGED
@@ -77,7 +77,7 @@ https://github.com/leptris/leptris-ruby[leptris-ruby] FFI binding
77
77
  every measured bulk operation — parse, XPath, serialization, SAX, and
78
78
  the compiled Moxml::Plan / Moxml::StructPlan materialization paths
79
79
  (StructPlan runs 2.3-2.6x raw Nokogiri on the benchmark shape);
80
- requires leptris >= 1.9.410.0 (see version table below).
80
+ requires leptris >= 1.9.420.2 (see version table below).
81
81
 
82
82
  === Underlying library versions
83
83
 
@@ -115,9 +115,9 @@ same libxml2 engine, governed by the consistency suite). Removal
115
115
  after the deprecation cycle.
116
116
 
117
117
  |Leptris (leptris-ruby)
118
- |>= 1.9.410.0
118
+ |>= 1.9.420.2
119
119
  |ENFORCED hard floor — `MINIMUM_BINDING_VERSION`; the adapter refuses
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)
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) → 1.9.420.2 (2026-11-14)
121
121
  (2026-10-30, the tested pair): every accommodation path below it is
122
122
  deleted and all native faces through the 1.9.385 parent-axis train
123
123
  are unconditional. The capability report
@@ -126,7 +126,7 @@ pair serves; cross-import schema sets (`Context#xsd_set`) ride the
126
126
  compile_set face (1.9.386.0 ✓, the floor now requires it).
127
127
  |===
128
128
 
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.
129
+ NOTE: moxml's dev Gemfile pins `leptris ~> 1.9.420.2` (the tested pair; the gemspec itself has zero runtime dependencies). The adapter enforces the floor at load.
130
130
  `ox ~> 2.14`, `libxml-ruby >= 5.0`, and the vendored oga fork — the CI
131
131
  matrix tests exactly those floors.
132
132
 
@@ -147,7 +147,7 @@ the runtime environment:
147
147
  ----
148
148
  # Automatic detection — picks the best available adapter
149
149
  ctx = Moxml.new
150
- ctx.config.adapter_name # => :leptris (leptris >= 1.9.410.0), :nokogiri otherwise
150
+ ctx.config.adapter_name # => :leptris (leptris >= 1.9.420.2), :nokogiri otherwise
151
151
 
152
152
  # Explicit override — always takes precedence
153
153
  ctx = Moxml.new(:ox)
@@ -31,12 +31,16 @@ 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
+ # Raised 1.9.410.0 -> 1.9.420.2 (2026-11-14, owner directive):
35
+ # bind_consumer_contract (leptris-ruby#635) - the consumer
36
+ # contract's C-defined children/attribute shapes on the hot
37
+ # klasses; the face is floor-guaranteed instead of probe-gated.
34
38
  # Raised 1.9.386.0 -> 1.9.410.0 (2026-11-10, owner directive
35
39
  # "update floors"): the namespace-aware strict admission
36
40
  # (leptris#1964, 1.9.409) and the schG2 child-typing fix
37
41
  # (leptris#1979, 1.9.410) - the XSD conformance answers the
38
42
  # dataset and the suite now pin REQUIRE this wave.
39
- MINIMUM_BINDING_VERSION = "1.9.410.0"
43
+ MINIMUM_BINDING_VERSION = "1.9.420.2"
40
44
 
41
45
  # Snapshot-backed attribute listing native (moxml#520): the
42
46
  # listing face serves reads from the binding's flat packet face —
@@ -107,6 +111,32 @@ module Moxml
107
111
  end
108
112
  end
109
113
 
114
+ # The consumer-contract lane's attribute object
115
+ # (leptris-ruby#635): the shape the bound C factory constructs -
116
+ # (name, value, owner). Covers the walk+read contract
117
+ # (.name/.value); full attribute-node faces stay on the contract
118
+ # classes.
119
+ class LaneAttribute
120
+ attr_reader :name, :value, :owner, :ns_uri
121
+
122
+ # ns_uri: the attribute's in-scope namespace URI from the
123
+ # engine (nil for bare attributes). The lane builds its own
124
+ # Namespace struct - the full wrapper namespace stays on the
125
+ # contract classes.
126
+ LaneNamespace = Struct.new(:uri)
127
+
128
+ def initialize(name, value, owner = nil, ns_uri = nil)
129
+ @name = name
130
+ @value = value
131
+ @owner = owner
132
+ @ns_uri = ns_uri
133
+ end
134
+
135
+ def namespace
136
+ @ns_uri ? LaneNamespace.new(@ns_uri) : nil
137
+ end
138
+ end
139
+
110
140
  if Gem::Version.new(::Leptris::VERSION.to_s) <
111
141
  Gem::Version.new(MINIMUM_BINDING_VERSION)
112
142
  raise Moxml::AdapterError.new(
@@ -160,12 +190,12 @@ module Moxml
160
190
  # objects, no FFI::Pointer. Supersedes the snapshot face for
161
191
  # the one-pass hydration walks the XMI lanes are (the binding
162
192
  # memo is a retention penalty there). Probed on the compiled
163
- # ext; the version floor pairs it (misrelease races — the
164
- # NATIVE_PLAN_STRUCTS lesson).
193
+ # ext alone: the 1.9.406.1 version pairing died with the
194
+ # 1.9.420.2 floor (every floor-passing binding carries the
195
+ # face); the probe gates the compiled bundle's presence, which
196
+ # no floor can.
165
197
  ELEMENT_ATTR_PACKET =
166
198
  NATIVE_READ_LAYER &&
167
- Gem::Version.new(::Leptris::VERSION) >=
168
- Gem::Version.new("1.9.406.1") &&
169
199
  ::Leptris::XML::Native.respond_to?(:attribute_packet)
170
200
 
171
201
  # leptris-ruby#529: the whole XPath node-set result as an Array
@@ -2136,6 +2166,18 @@ module Moxml
2136
2166
  ::Leptris::XML::Native.define_hot_readers(hot_tx)
2137
2167
  hot_tx.remove_method(:attribute)
2138
2168
  hot_tx.remove_method(:name)
2169
+ # The consumer-contract binding (leptris-ruby#635): the
2170
+ # descent's shapes constructed in C - children serving
2171
+ # the #530 memo'd list wrapped by the NodeSet factory,
2172
+ # attribute serving the decode getter wrapped by the
2173
+ # attribute factory. Bound on the hot element class
2174
+ # only (the contract kinds keep the Ruby-mediated set).
2175
+ if ::Leptris::XML::Native.respond_to?(:bind_consumer_contract)
2176
+ ::Leptris::XML::Native.bind_consumer_contract(
2177
+ hot_el, Moxml::NodeSet,
2178
+ Moxml::Adapter::Leptris::LaneAttribute
2179
+ )
2180
+ end
2139
2181
  hot_set = [hot_el, hot_tx, Identity::COMMENT,
2140
2182
  Identity::CDATA,
2141
2183
  Identity::PROCESSING_INSTRUCTION].freeze
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.9"
4
+ VERSION = "0.6.11"
5
5
  end
@@ -62,11 +62,11 @@ RSpec.describe Moxml::Adapter do
62
62
  Moxml::Config.default_adapter = ambient
63
63
  end
64
64
 
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
65
+ it "pins the leptris binding floor at 1.9.420.2 (raised 2026-09-20, 2026-10-30, 2026-11-10, and 2026-11-14; enforced at load)" do
66
66
  skip "leptris not installed" unless described_class.available?(:leptris)
67
67
 
68
68
  adapter = described_class.load(:leptris)
69
- expect(adapter::MINIMUM_BINDING_VERSION).to eq("1.9.410.0")
69
+ expect(adapter::MINIMUM_BINDING_VERSION).to eq("1.9.420.2")
70
70
  expect(Gem::Version.new(Leptris::VERSION))
71
71
  .to be >= Gem::Version.new(adapter::MINIMUM_BINDING_VERSION)
72
72
  end
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.9
4
+ version: 0.6.11
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-13 00:00:00.000000000 Z
11
+ date: 2026-11-15 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