leptris 1.9.401.0 → 1.9.402.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 +28 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/rng/rng_regex.c +36 -2
- data/vendor-src/libleptris/src/leptris/xsd/compile.c +6 -0
- data/vendor-src/libleptris/src/leptris/xsd/validate.c +6 -2
- data/vendor-src/libleptris/test/xsd/test_xsd_compile.cpp +29 -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: d5f94b3da7e10b2b6d9e8f48651c4ed543d8ea018df365eef5a6f537ee6e27f3
|
|
4
|
+
data.tar.gz: 5d26cabfa01b4ef93cfda24e5dcd65d31a87a7e88d8099eecf2da0b25fff80e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40f4dece236fd7c93eb49dc9cf3b75fc39a24c1ace2838dbd84908a9d99bed0510b60475ca26a0b29c964c79c9f44fdb2a3a557fd95bbef58880e0387b528ad0
|
|
7
|
+
data.tar.gz: d285d269c17532b3ab641548e310484321809cbf922a6ea474a87c6757346b9bc8986aa7937c97d7987ce3c05a32e8eb0d060d90f09bfcc62468518842cb5444
|
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.402"
|
|
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,33 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.402] - 2026-11-02
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **`\\w` is the complement of punctuation/separators/controls
|
|
8
|
+
(leptris#1936 reV family, 39 rows, PR #1948).** XSD Part 2
|
|
9
|
+
App. F defines wordChar as NOT in `\\p{P}\\p{Z}\\p{C}` —
|
|
10
|
+
Sm/Sc/No/Mn/Me are all word chars. The engine's `\\w` was
|
|
11
|
+
ASCII-only, so `\\W` accepted every non-ASCII letter, mark,
|
|
12
|
+
superscript, fraction slash and currency sign (reV6-43). A
|
|
13
|
+
`cat_neg` flag on the regex class node expresses the category
|
|
14
|
+
complement; `\\W` inherits through its negation. reV 42/42
|
|
15
|
+
oracle agreement against the real suite documents.
|
|
16
|
+
- **Global elements with inline anonymous types get their
|
|
17
|
+
declaration (leptris#1936 stE, 15 rows, PR #1948).** The
|
|
18
|
+
global-element capture required both `name` and `type`
|
|
19
|
+
attributes — a global element whose type is an inline
|
|
20
|
+
`<xs:simpleType>` child never produced a declaration, so the
|
|
21
|
+
element's `fixed` value constraint and the type both vanished
|
|
22
|
+
and every instance validated. The `nm`-only branch now records
|
|
23
|
+
`fixed` alongside the #1592 synthesized-slot type.
|
|
24
|
+
- **The element `fixed` VALUE constraint fires regardless of type
|
|
25
|
+
resolution (PR #1948).** The check sat after the type
|
|
26
|
+
resolution's anyType early-return and its `*text` guard let
|
|
27
|
+
empty content pass a non-empty fixed value.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
3
31
|
## [1.9.401] - 2026-11-01
|
|
4
32
|
|
|
5
33
|
### Fixed
|
|
@@ -55,6 +55,11 @@ typedef struct RreNode {
|
|
|
55
55
|
* LEPTRIS_HAS_UTF8PROC (without it the escapes fail loudly). */
|
|
56
56
|
unsigned cat_set;
|
|
57
57
|
unsigned cat_mask;
|
|
58
|
+
/* cat_neg (#1936 reV33-43): the class matches when the codepoint
|
|
59
|
+
* is NOT in the masked categories — XSD \w is defined as the
|
|
60
|
+
* complement of punctuation/separators/controls, not the union
|
|
61
|
+
* of letters (Sm/Sc/Sk are word chars per the suite). */
|
|
62
|
+
unsigned cat_neg;
|
|
58
63
|
/* cat_strict (moxml#464): a class-internal COMPLEMENT builtin
|
|
59
64
|
* ([\I], [\D]) needs bitmap AND cats to agree — the normal
|
|
60
65
|
* union can't express "not in the set" once the bitmap holds
|
|
@@ -125,10 +130,36 @@ static void cls_add_builtin(RreNode* n, char c) {
|
|
|
125
130
|
}
|
|
126
131
|
break;
|
|
127
132
|
case 'w':
|
|
128
|
-
|
|
133
|
+
/* XSD 1.0 Part 2 App. F: wordChar is the COMPLEMENT of
|
|
134
|
+
* punctuation, separators and controls — Sm/Sc/No/Mn/
|
|
135
|
+
* Me are all word chars (the suite's reV rows: U+2044,
|
|
136
|
+
* U+20A0, U+00B2, U+20DD never match \W). The ASCII-only
|
|
137
|
+
* form made \W accept every non-ASCII non-punct char
|
|
138
|
+
* (#1936 reV family). */
|
|
129
139
|
for (int i = 'a'; i <= 'z'; i++) cls_add(n, (unsigned char)i);
|
|
130
140
|
for (int i = 'A'; i <= 'Z'; i++) cls_add(n, (unsigned char)i);
|
|
141
|
+
for (int i = '0'; i <= '9'; i++) cls_add(n, (unsigned char)i);
|
|
131
142
|
cls_add(n, '_');
|
|
143
|
+
#if defined(LEPTRIS_HAS_UTF8PROC)
|
|
144
|
+
n->cat_set = 1;
|
|
145
|
+
n->cat_neg = 1;
|
|
146
|
+
n->cat_mask =
|
|
147
|
+
(1u << UTF8PROC_CATEGORY_PC) |
|
|
148
|
+
(1u << UTF8PROC_CATEGORY_PD) |
|
|
149
|
+
(1u << UTF8PROC_CATEGORY_PS) |
|
|
150
|
+
(1u << UTF8PROC_CATEGORY_PE) |
|
|
151
|
+
(1u << UTF8PROC_CATEGORY_PI) |
|
|
152
|
+
(1u << UTF8PROC_CATEGORY_PF) |
|
|
153
|
+
(1u << UTF8PROC_CATEGORY_PO) |
|
|
154
|
+
(1u << UTF8PROC_CATEGORY_ZL) |
|
|
155
|
+
(1u << UTF8PROC_CATEGORY_ZP) |
|
|
156
|
+
(1u << UTF8PROC_CATEGORY_ZS) |
|
|
157
|
+
(1u << UTF8PROC_CATEGORY_CC) |
|
|
158
|
+
(1u << UTF8PROC_CATEGORY_CF) |
|
|
159
|
+
(1u << UTF8PROC_CATEGORY_CN) |
|
|
160
|
+
(1u << UTF8PROC_CATEGORY_CO) |
|
|
161
|
+
(1u << UTF8PROC_CATEGORY_CS);
|
|
162
|
+
#endif
|
|
132
163
|
break;
|
|
133
164
|
case 's':
|
|
134
165
|
cls_add(n, ' ');
|
|
@@ -175,7 +206,9 @@ static void cls_add_builtin(RreNode* n, char c) {
|
|
|
175
206
|
(1u << UTF8PROC_CATEGORY_NL) |
|
|
176
207
|
(1u << UTF8PROC_CATEGORY_ND) |
|
|
177
208
|
(1u << UTF8PROC_CATEGORY_MN) |
|
|
178
|
-
(1u << UTF8PROC_CATEGORY_MC)
|
|
209
|
+
(1u << UTF8PROC_CATEGORY_MC) |
|
|
210
|
+
(1u << UTF8PROC_CATEGORY_ME) |
|
|
211
|
+
(1u << UTF8PROC_CATEGORY_NO);
|
|
179
212
|
#else
|
|
180
213
|
for (int i = 0x80; i < 0x100; i++) cls_add(n, (unsigned char)i);
|
|
181
214
|
#endif
|
|
@@ -256,6 +289,7 @@ static int cls_has_cp(const RreNode* n, unsigned cp) {
|
|
|
256
289
|
int c = (n->cat_mask &
|
|
257
290
|
(1u << utf8proc_get_property((utf8proc_int32_t)cp)
|
|
258
291
|
->category)) != 0;
|
|
292
|
+
if (n->cat_neg) c = !c;
|
|
259
293
|
hit = n->cat_strict ? (hit && c) : (hit || c);
|
|
260
294
|
}
|
|
261
295
|
#else
|
|
@@ -2462,6 +2462,12 @@ static void xsd_capture_root(struct leptris_xsd_schema* s,
|
|
|
2462
2462
|
if (s->target_ns) d->ns = xsd_strdup(s->target_ns);
|
|
2463
2463
|
if (has_inline)
|
|
2464
2464
|
d->type = xsd_strdup(synth);
|
|
2465
|
+
/* #1936 (stE): the fixed VALUE constraint rides
|
|
2466
|
+
* the decl whatever the type shape — inline
|
|
2467
|
+
* anonymous types used to lose it entirely. */
|
|
2468
|
+
d->fixed = xsd_strdup(
|
|
2469
|
+
leptris_element_attribute((LeptrisElement)n,
|
|
2470
|
+
"fixed"));
|
|
2465
2471
|
const char* sg = leptris_element_attribute(
|
|
2466
2472
|
(LeptrisElement)n, "substitutionGroup");
|
|
2467
2473
|
if (sg) {
|
|
@@ -797,13 +797,17 @@ static void validate_element(struct xsd_validator* v,
|
|
|
797
797
|
break;
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
/* #1936 (stE): the element's fixed VALUE constraint applies
|
|
801
|
+
* regardless of the type resolution — inline anonymous types
|
|
802
|
+
* leave eff_type NULL and used to skip the check entirely. An
|
|
803
|
+
* empty content also violates a non-empty fixed value. */
|
|
801
804
|
if (d->fixed) {
|
|
802
805
|
const char* text = leptris_element_text(elem);
|
|
803
|
-
if (text &&
|
|
806
|
+
if (text && strcmp(text, d->fixed) != 0)
|
|
804
807
|
verrfk(v, "content-model", "element", local,
|
|
805
808
|
"content does not match the fixed value");
|
|
806
809
|
}
|
|
810
|
+
if (!eff_type) return; /* anyType */
|
|
807
811
|
/* XSD 1.0 §2.6.2/§3.3.4 (moxml#433): xsi:type on the instance
|
|
808
812
|
* names the type definition this element is assessed against —
|
|
809
813
|
* it replaces the declared type and wins over XSD 1.1
|
|
@@ -397,6 +397,35 @@ TEST(XsdDatatypes, LengthFacetCountsOctetsForHexBinary) {
|
|
|
397
397
|
// leptris#1936 (stG010/stH005, the REAL suite documents): a list
|
|
398
398
|
// value space is whitespace=collapse — element content "\n\tCA\n "
|
|
399
399
|
// normalizes to "CA" before the enumeration/pattern facets run.
|
|
400
|
+
// leptris#1936 (the reV family, 39 rows): XSD \w is the COMPLEMENT
|
|
401
|
+
// of punctuation/separators/controls — letters (U+1D7C9 Lo), marks
|
|
402
|
+
// (U+20DD Me), No (U+00B2), Sm (U+2044), Sc (U+20A0) are all word
|
|
403
|
+
// chars, so \W must reject them; \W matches real punctuation.
|
|
404
|
+
TEST(XsdDatatypes, WComplementCoversUnicodeWordChars) {
|
|
405
|
+
const char xsd[] =
|
|
406
|
+
"<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">"
|
|
407
|
+
"<xs:simpleType name=\"nonWord\"><xs:restriction base=\"xs:string\">"
|
|
408
|
+
"<xs:pattern value=\"\\W\"/></xs:restriction></xs:simpleType>"
|
|
409
|
+
"<xs:element name=\"r\" type=\"nonWord\"/></xs:schema>";
|
|
410
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
411
|
+
LeptrisXsdSchema s = leptris_xsd_compile(xsd, strlen(xsd), &st);
|
|
412
|
+
ASSERT_EQ(st, LEPTRIS_OK);
|
|
413
|
+
ASSERT_NE(s, (LeptrisXsdSchema)0);
|
|
414
|
+
#ifdef LEPTRIS_HAS_UTF8PROC
|
|
415
|
+
/* The complement runs over the utf8proc categories; builds
|
|
416
|
+
* without the tables keep the ASCII word set (documented
|
|
417
|
+
* degradation), so these rows are capability-pinned. */
|
|
418
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "nonWord", "\xF0\x9D\x9F\x89"), 0); // U+1D7C9 Lo
|
|
419
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "nonWord", "\xE2\x83\x9D"), 0); // U+20DD Me
|
|
420
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "nonWord", "\xC2\xB2"), 0); // U+00B2 No
|
|
421
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "nonWord", "\xE2\x81\x84"), 0); // U+2044 Sm
|
|
422
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "nonWord", "\xE2\x82\xA0"), 0); // U+20A0 Sc
|
|
423
|
+
#endif
|
|
424
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "nonWord", "#"), 1); // real punct
|
|
425
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "nonWord", " "), 1); // separator
|
|
426
|
+
leptris_xsd_free(s);
|
|
427
|
+
}
|
|
428
|
+
|
|
400
429
|
TEST(XsdDatatypes, ListValueSpaceCollapsesBeforeFacets) {
|
|
401
430
|
const char xsd[] =
|
|
402
431
|
"<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">"
|
|
@@ -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.402",
|
|
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.402.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-11-
|
|
11
|
+
date: 2026-11-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|