leptris 1.9.371.0-ppc64le-linux → 1.9.372.0-ppc64le-linux

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: ce241a477870b3f87f210b42e00558040d8d08562df7064749e27120d8070b09
4
- data.tar.gz: 72b0e8e891cb0539cbe8679293e694912c019e3d28a408492b88295f1240ce8a
3
+ metadata.gz: 7c3837afd5728fe2a5aee879a2d5882c4c6f31a640cdd1653212d817c14e93b9
4
+ data.tar.gz: 241f393c34578203aa07886193ec9bcd2f893acee82e0c72e63381d2bcef4c16
5
5
  SHA512:
6
- metadata.gz: 2ae877b4e3b0037d3e3bd03e606ada3f75a4e6ef3e93f0796d9aa2b15ff682ff810c7d46eca0f6157746bfb91755d2655c98c69ca142056ccc036f95c135ebbd
7
- data.tar.gz: a68ccf07157ce2cb5a20a5d9a71874f7fcf8863b616653c32c386dce532acb08fde7891e94e11e5daed74d1fa27c6832be29dd39386cdbc15ed833f068fcd9a4
6
+ metadata.gz: 62147a8c9310653e275816c6a880819d02f55d2110a8e50a9e8e0e9af1cf35876a38e0b54239fc74ffe2b50aaaea996498d79295dd797ebaae78ec93330aac3f
7
+ data.tar.gz: b23e576da9bfd0679d437377c014722d788635db56d4a18fe026e8c0aa4581e4de1c8201b6e4afaac01cd3e9c1033eaed15954f4d46e7349a1a1ee9e1a83e2fe
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ RSpec::Core::RakeTask.new(:spec)
8
8
  # Pin for `rake compile` and the platform-gem builds. Keep in lockstep
9
9
  # with .github/workflows/build.yml (which calls `rake compile`) and the
10
10
  # CHANGELOG when libleptris releases.
11
- LIBLEPTRIS_VERSION = "1.9.371"
11
+ LIBLEPTRIS_VERSION = "1.9.372"
12
12
  # Vendored alongside libleptris for fn:normalize-unicode (TODO
13
13
  # .restructure/20): built per platform with a RELOCATABLE @rpath
14
14
  # install name, loaded by ffi.rb before libleptris so the
@@ -3564,6 +3564,7 @@ LEPTRIS_INIT_EXPORT void Init_native(void)
3564
3564
  * method-cache cost instead of UnboundMethod#bind_call. */
3565
3565
  rb_define_alias(c_native_node, "attr_read", "attribute");
3566
3566
  rb_define_alias(c_native_node, "text_read", "content");
3567
+ rb_define_alias(c_native_node, "name_read", "name");
3567
3568
  rb_define_method(c_native_node, "children", nn_children, 0);
3568
3569
  rb_define_method(c_native_node, "element_children", nn_element_children, 0);
3569
3570
  rb_define_method(c_native_node, "next_sibling", nn_next_sibling, 0);
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.371.0"
4
+ VERSION = "1.9.372.0"
5
5
  end
Binary file
Binary file
data/lib/libleptris.so CHANGED
Binary file
data/vendor-src/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Sources vendored in this gem (recompile rights; the ruby
2
2
  variant builds them at install via extconf.rb):
3
3
 
4
- - libleptris v1.9.371
4
+ - libleptris v1.9.372
5
5
  - utf8proc v2.11.0
6
6
 
7
7
  Rebuild by hand:
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.9.372] - 2026-10-19
4
+
5
+ ### Changed
6
+
7
+ - **test: document-context XPath parity pin (leptris-ruby#502).**
8
+ Test-only release: pins the `document()`/context-node parity
9
+ contract with a side-by-side Nokogiri regression spec in
10
+ `test/xpath/test_xpath.cpp` — expressions evaluated with a NULL
11
+ context resolve against the document node, matching Nokogiri.
12
+ No library-code changes; runtime rides re-pin to this engine.
13
+
14
+
3
15
  ## [1.9.371] - 2026-10-19
4
16
 
5
17
  ### Added
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(leptris
6
- VERSION 1.9.371
6
+ VERSION 1.9.372
7
7
  DESCRIPTION "Fast XML parser and XPath evaluator in pure C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -22,6 +22,53 @@ LeptrisDocument ParseWith(const char* xml) {
22
22
  return doc;
23
23
  }
24
24
 
25
+ /* leptris-ruby#502 parity pin: a document-context relative path
26
+ * selects the DOCUMENT's children (XPath 1.0 §2) — libxml2/Nokogiri
27
+ * measured identical: doc.xpath("bibdata/status/stage") with root
28
+ * <metanorma> returns [] (bibdata is a child of the ROOT ELEMENT,
29
+ * one level down); doc.root.xpath(...) finds it. The classic
30
+ * "root-relative" behavior was the OLD moxml adapter's substitution,
31
+ * not Nokogiri semantics. */
32
+ TEST(XPathDocContext, RelativePathFromDocumentContext) {
33
+ LeptrisStatus st = LEPTRIS_OK;
34
+ const char* xml = "<metanorma><bibdata><status>"
35
+ "<stage>published</stage></status></bibdata>"
36
+ "</metanorma>";
37
+ LeptrisDocument d = leptris_parse_string(xml, strlen(xml), &st);
38
+ ASSERT_NE(d, nullptr);
39
+
40
+ /* Nokogiri parity: a relative step naming a NON-child of the
41
+ * document returns empty */
42
+ LeptrisXPathResult r =
43
+ leptris_xpath_eval(d, NULL, "bibdata/status/stage");
44
+ ASSERT_NE(r, nullptr);
45
+ EXPECT_EQ(leptris_xpath_result_count(r), 0u);
46
+ leptris_xpath_result_free(r);
47
+
48
+ /* the root ELEMENT is a child of the document */
49
+ LeptrisXPathResult rn =
50
+ leptris_xpath_eval(d, NULL, "metanorma/bibdata/status/stage");
51
+ ASSERT_NE(rn, nullptr);
52
+ ASSERT_EQ(leptris_xpath_result_count(rn), 1u);
53
+ LeptrisElement e = leptris_xpath_result_get(rn, 0);
54
+ ASSERT_NE(e, nullptr);
55
+ EXPECT_STREQ(leptris_element_name(e), "stage");
56
+ EXPECT_STREQ(leptris_element_text(e), "published");
57
+ leptris_xpath_result_free(rn);
58
+
59
+ /* absolute shapes unchanged */
60
+ LeptrisXPathResult a = leptris_xpath_eval(d, NULL, "/bibdata");
61
+ ASSERT_NE(a, nullptr);
62
+ EXPECT_EQ(leptris_xpath_result_count(a), 0u);
63
+ leptris_xpath_result_free(a);
64
+ LeptrisXPathResult am =
65
+ leptris_xpath_eval(d, NULL, "/metanorma/bibdata/status/stage");
66
+ ASSERT_NE(am, nullptr);
67
+ EXPECT_EQ(leptris_xpath_result_count(am), 1u);
68
+ leptris_xpath_result_free(am);
69
+ leptris_document_free(d);
70
+ }
71
+
25
72
  TEST(XPathAxes, DescendantOrSelfFindsAll) {
26
73
  LeptrisDocument doc = ParseWith(kBasic);
27
74
  ASSERT_NE(doc, nullptr);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
3
3
  "name": "leptris",
4
- "version": "1.9.371",
4
+ "version": "1.9.372",
5
5
  "description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
6
6
  "homepage": "https://github.com/leptris/leptris",
7
7
  "license": "MIT",
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.371.0
4
+ version: 1.9.372.0
5
5
  platform: ppc64le-linux
6
6
  authors:
7
7
  - Ribose Inc.