moxml 0.5.14 → 0.5.15
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 +14 -5
- data/lib/moxml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '098d93bb8d9951a645e7f49e4031993942b8965368b8dcdbcc6e590514633571'
|
|
4
|
+
data.tar.gz: b1f5f35e34a6a458547d7740860d0bdb7d786fb857532050191ac2c188906794
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4bdb52155bbfeb4f4e8567d2feb3e0b705562340db67955c346a0c1980823743ef882fb44c0d4abd6a42eefa5b1a8fd8bf77f2c20fd72c8074f70e187e0fe199
|
|
7
|
+
data.tar.gz: cb5f85126e157a7271c052632bdcd6a42c4f2e99c9096bac69ea50aa5cfd75b98f9bc94f5d502f63298cc2e9c687706cb45a49aeeae17d6abd56d1301b858d8d
|
|
@@ -43,6 +43,14 @@ module Moxml
|
|
|
43
43
|
leptris_pi_node_get_data
|
|
44
44
|
].all? { |fn| ::Leptris::XML::FFI.respond_to?(fn) }
|
|
45
45
|
|
|
46
|
+
# leptris-ruby#103: prefixed attribute tests inside predicates
|
|
47
|
+
# stopped resolving through the document's in-scope declarations
|
|
48
|
+
# on released 1.9.37–1.9.39; 1.9.40 (engine 1.9.14+) restored
|
|
49
|
+
# the fallback. Older bindings keep the Ruby-engine routing in
|
|
50
|
+
# native_expression?.
|
|
51
|
+
PREFIXED_ATTR_PREDICATES_NATIVE =
|
|
52
|
+
Gem::Version.new(::Leptris::VERSION) >= Gem::Version.new("1.9.40")
|
|
53
|
+
|
|
46
54
|
NO_PARSE_ERRORS = [].freeze
|
|
47
55
|
private_constant :NO_PARSE_ERRORS
|
|
48
56
|
|
|
@@ -705,7 +713,7 @@ module Moxml
|
|
|
705
713
|
ast = XPath::Parser.parse_with_cache(expression)
|
|
706
714
|
next false if ast_contains_type?(ast, :variable)
|
|
707
715
|
next false if uses_xmlns_prefix?(ast)
|
|
708
|
-
next false if prefixed_attribute_test?(ast)
|
|
716
|
+
next false if !PREFIXED_ATTR_PREDICATES_NATIVE && prefixed_attribute_test?(ast)
|
|
709
717
|
|
|
710
718
|
!selects_attribute_results?(ast)
|
|
711
719
|
end
|
|
@@ -745,10 +753,11 @@ module Moxml
|
|
|
745
753
|
end
|
|
746
754
|
end
|
|
747
755
|
|
|
748
|
-
#
|
|
749
|
-
# tests inside predicates (@p:kind='a'); the Ruby
|
|
750
|
-
# An attribute test is a :test whose parent axis
|
|
751
|
-
# "attribute"; bare ones (namespace nil) stay native.
|
|
756
|
+
# Released native engines 1.9.37–1.9.39 do not match prefixed
|
|
757
|
+
# attribute tests inside predicates (@p:kind='a'); the Ruby
|
|
758
|
+
# engine does. An attribute test is a :test whose parent axis
|
|
759
|
+
# is "attribute"; bare ones (namespace nil) stay native.
|
|
760
|
+
# Retired above PREFIXED_ATTR_PREDICATES_NATIVE (1.9.40+).
|
|
752
761
|
def prefixed_attribute_test?(ast, parent_axis = nil)
|
|
753
762
|
if ast.type == :test && parent_axis == "attribute"
|
|
754
763
|
ns = ast.value[:namespace]
|
data/lib/moxml/version.rb
CHANGED
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.5.
|
|
4
|
+
version: 0.5.15
|
|
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-08-
|
|
11
|
+
date: 2026-08-30 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
|