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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8302b1a98c08b34619df4a30d5b84733fa9125eebeeaf1b39b5ba82d0e8fa625
4
- data.tar.gz: e96034377b072b1ee9058ced4a4dd0347e819f6354011810831b07a06e88e138
3
+ metadata.gz: '098d93bb8d9951a645e7f49e4031993942b8965368b8dcdbcc6e590514633571'
4
+ data.tar.gz: b1f5f35e34a6a458547d7740860d0bdb7d786fb857532050191ac2c188906794
5
5
  SHA512:
6
- metadata.gz: bbe5b80c8b6a656e14b45307bf9b41d1ba1a384c33906ed11fc7d861c2f8fbfad33fb08f2b091ea8b295608c025b5045bc6d0ff73927420e07a23635750fec38
7
- data.tar.gz: 994ca51d9e27649ef6d70d2f225408dafdd73e35d5948903e33c978b75c5523d5c11ce889c361ded3c7af74473fe75b107168df5f6ab88ec4af5841f5f530ebf
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
- # Some released native engines do not match prefixed attribute
749
- # tests inside predicates (@p:kind='a'); the Ruby engine does.
750
- # An attribute test is a :test whose parent axis is
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Moxml
4
- VERSION = "0.5.14"
4
+ VERSION = "0.5.15"
5
5
  end
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.14
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-29 00:00:00.000000000 Z
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