leptris 1.9.38-x86_64-linux → 1.9.39-x86_64-linux
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 +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/sax/dom_dispatch.rb +18 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b626c028c5b4adaa4a25aa24593f4788e742bd91ff2c0a0a6f87c77b9598b00
|
|
4
|
+
data.tar.gz: c223f93d41fe83fceb385138acfb9d7d638387bf0a785568e84d72ab72a047eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c535d149bf8764a1ae7a70d45f19f5762498f9c6cec72433c9daa566b9fc4ec62a642760954328c615fed6a1efca9b15597eedb493f00d8aa7e2f0afe1d7358e
|
|
7
|
+
data.tar.gz: b8eb2e0eeda5d5ed64986f1e47ec3e93f6771e562bc97a7297adbac8b148dd99156fb05cd7e54dd10584662668a5930e39c484aa73cb8614b31e29dac2814a1f
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ All notable changes to Leptris will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.9.39] - 2026-08-29
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Namespace declarations return to SAX events (leptris-ruby#99,
|
|
13
|
+
critical)**: the DOM-backed dispatcher (1.9.36's #95 workaround)
|
|
14
|
+
built start_element pairs from the DOM attribute chain, which
|
|
15
|
+
excludes xmlns declarations — namespace-aware consumers went
|
|
16
|
+
blind (canon's namespace-declaration diffs came back empty). The
|
|
17
|
+
engine's streaming contract carries declarations among the
|
|
18
|
+
attribute pairs; the dispatcher now emits them first in
|
|
19
|
+
declaration order (default as `xmlns`, prefixed as
|
|
20
|
+
`xmlns:prefix`), then the attributes in source order with their
|
|
21
|
+
prefixed names preserved. The exact byte-level interleave of the
|
|
22
|
+
streaming path is unrecoverable from the DOM model and is the
|
|
23
|
+
one documented difference — a spec pins set-equality against
|
|
24
|
+
the engine transport per element.
|
|
25
|
+
|
|
8
26
|
## [1.9.38] - 2026-08-29
|
|
9
27
|
|
|
10
28
|
### Changed
|
data/lib/leptris/version.rb
CHANGED
|
@@ -101,7 +101,7 @@ module Leptris::XML::SAX::DomDispatch
|
|
|
101
101
|
if dispatched[:start_element] == :one_arg
|
|
102
102
|
handler.start_element(qname)
|
|
103
103
|
else
|
|
104
|
-
handler.start_element(qname,
|
|
104
|
+
handler.start_element(qname, declared_pairs(element))
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
visit_children(element.c_ptr, element.document, handler, dispatched)
|
|
@@ -113,6 +113,23 @@ module Leptris::XML::SAX::DomDispatch
|
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
# start_element's pairs with xmlns declarations carried — the
|
|
117
|
+
# engine's streaming contract reports declarations among the
|
|
118
|
+
# attribute pairs (canon-style namespace-aware consumers split
|
|
119
|
+
# them). The DOM model stores declarations and attributes
|
|
120
|
+
# separately, so the exact byte-level interleave is unrecoverable
|
|
121
|
+
# here: declarations emit first in declaration order (default as
|
|
122
|
+
# "xmlns", prefixed as "xmlns:prefix"), then the attributes in
|
|
123
|
+
# source order (leptris-ruby#99).
|
|
124
|
+
def declared_pairs(element)
|
|
125
|
+
defs = element.namespace_definitions
|
|
126
|
+
return attr_pairs(element.c_ptr) if defs.empty?
|
|
127
|
+
pairs = defs.map do |ns|
|
|
128
|
+
[ns.prefix ? "xmlns:#{ns.prefix}" : "xmlns", ns.href]
|
|
129
|
+
end
|
|
130
|
+
pairs.concat(attr_pairs(element.c_ptr))
|
|
131
|
+
end
|
|
132
|
+
|
|
116
133
|
# [name, value] pairs in source order, read straight from the
|
|
117
134
|
# attribute chain — no Attr objects, no hash.
|
|
118
135
|
def attr_pairs(c_ptr)
|