leptris 1.9.383.0 → 1.9.384.0
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/Rakefile +1 -1
- data/lib/leptris/vendor/aarch64-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/aarch64-linux-musl/libleptris.so +0 -0
- data/lib/leptris/vendor/arm-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/arm-linux-musl/libleptris.so +0 -0
- data/lib/leptris/vendor/arm64-darwin/libleptris.dylib +0 -0
- data/lib/leptris/vendor/ppc64le-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/s390x-linux-musl/libleptris.so +0 -0
- data/lib/leptris/vendor/x86_64-darwin/libleptris.dylib +0 -0
- data/lib/leptris/vendor/x86_64-linux/libleptris.so +0 -0
- data/lib/leptris/vendor/x86_64-linux-musl/libleptris.so +0 -0
- data/lib/leptris/version.rb +1 -1
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +14 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/xpath/vm.c +8 -0
- data/vendor-src/libleptris/test/xpath/test_bytecode_vm.cpp +36 -0
- data/vendor-src/libleptris/vcpkg.json +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: 7b61e04df94a447b4e6d0441407cfa9d6a22d2b0c2a672dfdc660d11acbb79f2
|
|
4
|
+
data.tar.gz: e782a0a58f547516238175a940fa1ce0dfab39a527f257442f62efc160bd63bb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a389283a1f7881902e029bba7722cf8eb39836b534395055399af001b72e08e463a7a18ed3d2bfb98f7c28bc4868e681a576cb0ac282f3b5d27eb4444ada0aa5
|
|
7
|
+
data.tar.gz: 6bb506aaecd5522b8401c15c840e5ca4957070fa082e2dbaa1c7dc3a7378cc91537dddfc0b00ac60a4b2d61a0241a1b6a6b797d320434df0399c23cf61532b7f
|
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.
|
|
11
|
+
LIBLEPTRIS_VERSION = "1.9.384"
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/leptris/version.rb
CHANGED
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.384] - 2026-10-27
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- XPath: a parent step after an attribute step (`./@id/..`) yields
|
|
8
|
+
the OWNING element (XPath 1.0 section 2.2) — the VM parent axis
|
|
9
|
+
handled namespace/element/text contexts but attributes fell
|
|
10
|
+
through to the child-tree parent link (NULL for attributes), so
|
|
11
|
+
the step came back empty. Metanorma-standoc's SVG id
|
|
12
|
+
disambiguation drives exactly this shape and consumed the wrong
|
|
13
|
+
results downstream (#1867; the wrong-answer half of #1866).
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
3
17
|
## [1.9.383] - 2026-10-26
|
|
4
18
|
|
|
5
19
|
### Fixed
|
|
@@ -768,6 +768,14 @@ struct leptris_xpath_result* vm_apply_axis_parent(XPathContext* ctx, XPathVM* vm
|
|
|
768
768
|
if (in && (int)in->type == (int)LEPTRIS_NODE_NAMESPACE) {
|
|
769
769
|
/* Namespace nodes' parent is the OWNER element (63). */
|
|
770
770
|
parent = ((LeptrisNamespaceNode*)in)->owner;
|
|
771
|
+
} else if (in && (int)in->type == (int)LEPTRIS_NODE_ATTRIBUTE) {
|
|
772
|
+
/* Attribute nodes' parent is the OWNER element (XPath
|
|
773
|
+
* 1.0 §2.2: `../` after an attribute step names the
|
|
774
|
+
* element carrying the attribute). Attributes are not
|
|
775
|
+
* in the child tree, so the any-kind parent link below
|
|
776
|
+
* is NULL for them (leptris#1866, standoc svg cleanup:
|
|
777
|
+
* `./@id/..`). */
|
|
778
|
+
parent = ((LeptrisAttributeNode*)in)->owner;
|
|
771
779
|
} else if (node_is_element(in)) {
|
|
772
780
|
parent = leptris_element_get_parent((LeptrisElement)in);
|
|
773
781
|
} else {
|
|
@@ -114,6 +114,42 @@ TEST(XPathBytecodeSpecializedAxes, AttributeNameMatches) {
|
|
|
114
114
|
leptris_document_free(doc);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
TEST(XPathBytecodeSpecializedAxes, ParentAfterAttributeStep) {
|
|
118
|
+
const char xml[] =
|
|
119
|
+
"<root><child id=\"a\"><leaf/></child></root>";
|
|
120
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
121
|
+
LeptrisDocument doc = leptris_parse_string(xml, std::strlen(xml), &st);
|
|
122
|
+
ASSERT_NE(doc, nullptr);
|
|
123
|
+
|
|
124
|
+
/* leptris#1866: `..` after an attribute step yields the OWNING
|
|
125
|
+
* element (XPath 1.0 §2.2). The VM parent axis handled
|
|
126
|
+
* namespace/element/text contexts but attributes fell through
|
|
127
|
+
* to the child-tree parent link (NULL for attrs) — the step
|
|
128
|
+
* came back empty (standoc svg cleanup: `./@id/..`). */
|
|
129
|
+
LeptrisXPathResult r1 = leptris_xpath_eval(
|
|
130
|
+
doc, nullptr, "count(//child/@id/..)");
|
|
131
|
+
ASSERT_NE(r1, nullptr);
|
|
132
|
+
EXPECT_DOUBLE_EQ(leptris_xpath_result_number(r1), 1.0);
|
|
133
|
+
leptris_xpath_result_free(r1);
|
|
134
|
+
|
|
135
|
+
LeptrisXPathResult r2 = leptris_xpath_eval(
|
|
136
|
+
doc, nullptr, "name(//child/@id/..)");
|
|
137
|
+
ASSERT_NE(r2, nullptr);
|
|
138
|
+
char* s = leptris_xpath_result_string(r2);
|
|
139
|
+
EXPECT_STREQ(s, "child");
|
|
140
|
+
leptris_free_string(s);
|
|
141
|
+
leptris_xpath_result_free(r2);
|
|
142
|
+
|
|
143
|
+
/* a bare parent step on the element itself is unchanged */
|
|
144
|
+
LeptrisXPathResult r3 = leptris_xpath_eval(
|
|
145
|
+
doc, nullptr, "count(//leaf/..)");
|
|
146
|
+
ASSERT_NE(r3, nullptr);
|
|
147
|
+
EXPECT_DOUBLE_EQ(leptris_xpath_result_number(r3), 1.0);
|
|
148
|
+
leptris_xpath_result_free(r3);
|
|
149
|
+
|
|
150
|
+
leptris_document_free(doc);
|
|
151
|
+
}
|
|
152
|
+
|
|
117
153
|
TEST(XPathBytecodeSpecializedAxes, SelfAndParentAxes) {
|
|
118
154
|
const char xml[] =
|
|
119
155
|
"<root><child><leaf/></child></root>";
|
|
@@ -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.
|
|
4
|
+
"version": "1.9.384",
|
|
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,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: leptris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.384.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|