moxml 0.5.11 → 0.5.12
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/lib/moxml/adapter/leptris.rb +17 -7
- data/lib/moxml/version.rb +1 -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: 7f702d6c51c5df49bdb2bf0ac5189d3fe0716d94093ced7decdb743dcf87fa5d
|
|
4
|
+
data.tar.gz: 56316b016c8865d6290033873477d9dcc92b04e1e16ae77716626398bd976ad3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1e503460e2b5d645cd4147d4164d2a67c254e8e2174b145fbf4f17dab222d1eae03216b7a35dca18a800684c3c904daf9633140f262195f212d9dd235ccc675
|
|
7
|
+
data.tar.gz: 4cf7957e370339230fc4d184a7fd6b9312bd3f5e8f9e843984ed4e56967e33597d18abef6479de69cde47af781a65703427349cdaff16eaf317cdb39ba8cd135
|
|
@@ -27,6 +27,12 @@ module Moxml
|
|
|
27
27
|
# DTD ATTLIST defaults, matching libxml2/Nokogiri semantics;
|
|
28
28
|
# ParseOptions::DTDATTR opts in (leptris/leptris#606).
|
|
29
29
|
DTDATTR_SUPPORTED = ::Leptris::XML::ParseOptions.const_defined?(:DTDATTR)
|
|
30
|
+
# leptris-ruby 1.9.32 (#89): traverse is subtree-bounded again —
|
|
31
|
+
# earlier 1.9.x walks followed the document chain and swept
|
|
32
|
+
# following siblings, so element materialize had to fall back
|
|
33
|
+
# to the generic wrapper walk.
|
|
34
|
+
TRAVERSE_SUBTREE_BOUNDED =
|
|
35
|
+
Gem::Version.new(::Leptris::VERSION) >= Gem::Version.new("1.9.32")
|
|
30
36
|
|
|
31
37
|
class << self
|
|
32
38
|
def attachments
|
|
@@ -282,13 +288,17 @@ module Moxml
|
|
|
282
288
|
# ER expansion); the bulk path has no marker handling.
|
|
283
289
|
return nil if doc.nil? || attachments.get(doc, :entity_markers)
|
|
284
290
|
|
|
285
|
-
#
|
|
286
|
-
#
|
|
287
|
-
# the
|
|
288
|
-
#
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
291
|
+
# On bindings whose traverse follows the document chain
|
|
292
|
+
# (leptris 1.9.28–1.9.31), element materialize falls back to
|
|
293
|
+
# the generic wrapper walk — only document materialization
|
|
294
|
+
# can filter safely there (issue #140).
|
|
295
|
+
root = if native.is_a?(::Leptris::XML::Document)
|
|
296
|
+
doc.root
|
|
297
|
+
else
|
|
298
|
+
return nil unless TRAVERSE_SUBTREE_BOUNDED
|
|
299
|
+
|
|
300
|
+
native
|
|
301
|
+
end
|
|
292
302
|
return nil if root.nil?
|
|
293
303
|
|
|
294
304
|
depth_memo = {}.compare_by_identity
|
data/lib/moxml/version.rb
CHANGED