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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7718cf666bbec3e128c6dd2458d85e59f58757654b67021137e931e92271d19
4
- data.tar.gz: 9cece9a47663dcc7c0665201beac6914edc30f08d3680d9ba8bfee64bb2819bd
3
+ metadata.gz: eba09fc16aa561683806817a781f554c6cef6cde6a05fc0e578bba10c2184002
4
+ data.tar.gz: 6c6b91d6a48cb4c9c9b1afce56d4d4e7e92517e1074fa4f02cb1c7eeb2d9d287
5
5
  SHA512:
6
- metadata.gz: 49695f1c96011b812601dfaa6a200403523563737bdb1e470d9f8d5c67fb9e3e6948ede1fef108a2a344df68ef31d69ac931a3f2363d173b7ac7546673ca9340
7
- data.tar.gz: a02fe7e50a379fe9d84d1a705234d6c49fba0c52fcf6c4867899ae91aa7b2bc618590bed20bf01a518a6d83b268e440e0beab58f2752eb6d6808a68bdef3b46b
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.163.2"
4
+ VERSION = "1.9.163.3"
5
5
  end
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.163.2
4
+ version: 1.9.163.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.