leptris 1.9.163.2 → 1.9.163.3
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 +15 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/element.rb +10 -0
- 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: eba09fc16aa561683806817a781f554c6cef6cde6a05fc0e578bba10c2184002
|
|
4
|
+
data.tar.gz: 6c6b91d6a48cb4c9c9b1afce56d4d4e7e92517e1074fa4f02cb1c7eeb2d9d287
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c48d64aeddda261adb94f951031d88025704445cbb240b7807b9596834fdb60ebc8ef564438bf2c9d69fd96f6d18c121e4576f9e47b0fd54d7aba1d6c10ce095
|
|
7
|
+
data.tar.gz: 4b06a2d719fb701186f69a2d8f7d88c06576b46846f3baa6683ee05122a771a42a2dc95e6b4268ec8877fd3e9def85671c2d244a4d4ab896910690c0e91bc1d2
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ 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.163.3] - 2026-09-15
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Adoption prunes redundant own declarations (moxml #208
|
|
13
|
+
lineage, libxml2 reparent parity)**: an element carrying its
|
|
14
|
+
own `xmlns` declaration that the attach target already resolves
|
|
15
|
+
identically no longer re-declares it after a move —
|
|
16
|
+
`<r xmlns:p="urn:p"><p:c xmlns:p="urn:p"/></r>` becomes
|
|
17
|
+
`<r xmlns:p="urn:p"><p:c/></r>`. Shadowing declarations (same
|
|
18
|
+
prefix, different URI) are preserved, and standalone detached
|
|
19
|
+
elements keep their declarations. Matches libxml2's
|
|
20
|
+
drop-redundant-namespace-on-reparent behavior, making the
|
|
21
|
+
binding tolerant of both builder call orders.
|
|
22
|
+
|
|
8
23
|
## [1.9.163.2] - 2026-09-14
|
|
9
24
|
|
|
10
25
|
### Added
|
data/lib/leptris/version.rb
CHANGED
data/lib/leptris/xml/element.rb
CHANGED
|
@@ -266,6 +266,16 @@ class Leptris::XML::Element < Leptris::XML::Node
|
|
|
266
266
|
prefix = key.start_with?("xmlns:") ? key.delete_prefix("xmlns:") : nil
|
|
267
267
|
node.add_namespace_definition(prefix, uri)
|
|
268
268
|
end
|
|
269
|
+
# libxml2 reparent parity (moxml #208 lineage): an OWN
|
|
270
|
+
# declaration the attach target already resolves identically
|
|
271
|
+
# is redundant — prune it so serialized output does not
|
|
272
|
+
# re-declare (libxml2 drops these on reparent). Shadowing
|
|
273
|
+
# declarations (same prefix, different URI) are preserved.
|
|
274
|
+
node.namespace_definitions.each do |ns|
|
|
275
|
+
key = ns.prefix ? "xmlns:#{ns.prefix}" : "xmlns"
|
|
276
|
+
next unless target_scope[key] == ns.href
|
|
277
|
+
node.remove_namespace_definition(ns.prefix)
|
|
278
|
+
end
|
|
269
279
|
nil
|
|
270
280
|
end
|
|
271
281
|
|