leptris 1.9.400.0 → 1.9.401.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 +17 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/xsd/datatypes.c +35 -1
- data/vendor-src/libleptris/test/xsd/test_xsd_compile.cpp +23 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 73c3a57df8e49fb02a11fa3e7a910bba209e72a2052ec8fd96eef1265531c04d
|
|
4
|
+
data.tar.gz: aace004026653c394ed7928c1455a730a7eda31fa786f02b2ea429764a4fbc5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8fbad61c15192553fa7fa20ff5e3a839552cb7a1ad96bd69804cd9ca2a8640e5fdd9cc60559b2b2025e1e578506b6d2f4be6d3630262b5e977f2d285809b8111
|
|
7
|
+
data.tar.gz: 89978d069948ad43f631dde1f621c260afd4a7cd198c74e19cc580134547981b1ad46febb8900cedc5474c3a418e1027bfb333b3d53bc142f257bec1016ad7ff
|
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.401"
|
|
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,22 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.401] - 2026-11-01
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **List value spaces collapse whitespace before the facets
|
|
8
|
+
(leptris#1936 stG010/stH005, PR #1945).** Caught by running the
|
|
9
|
+
REAL W3C suite documents (vendored in lutaml-xsd) through the
|
|
10
|
+
xmllint-arbiter harness: a list-derived restriction's
|
|
11
|
+
enumeration facet compared the RAW element content — stG010's
|
|
12
|
+
value arrives as newline-tab-CA-newline-spaces and never matched
|
|
13
|
+
enum "CA" — and a whole-list pattern had the same hole (stH005).
|
|
14
|
+
List value spaces are whitespace=collapse (Part 2): the value is
|
|
15
|
+
normalized before the pattern/enumeration/length family runs.
|
|
16
|
+
Suite 142/142; both documents validate. (xsd)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
3
20
|
## [1.9.400] - 2026-11-01
|
|
4
21
|
|
|
5
22
|
### Fixed
|
|
@@ -510,7 +510,41 @@ static int facet_check_body(const XsdSimple* s, const char* v,
|
|
|
510
510
|
const char* terminal_base, int chain_is_list);
|
|
511
511
|
static int facet_check(const XsdSimple* s, const char* v,
|
|
512
512
|
const char* terminal_base, int chain_is_list) {
|
|
513
|
-
|
|
513
|
+
/* #1936 (stG010): a LIST value space is whitespace=collapse —
|
|
514
|
+
* element content arrives as "\n\tCA\n " and the enumeration
|
|
515
|
+
* /pattern facets must see the collapsed form ("CA"), not the
|
|
516
|
+
* raw text. */
|
|
517
|
+
int list_valued = chain_is_list || s->deriv == XSD_SIMPLE_LIST ||
|
|
518
|
+
(terminal_base &&
|
|
519
|
+
(strcmp(terminal_base, "xs:IDREFS") == 0 ||
|
|
520
|
+
strcmp(terminal_base, "xs:NMTOKENS") == 0 ||
|
|
521
|
+
strcmp(terminal_base, "xs:ENTITIES") == 0));
|
|
522
|
+
if (!list_valued)
|
|
523
|
+
return facet_check_body(s, v, terminal_base, chain_is_list);
|
|
524
|
+
while (*v == ' ' || *v == '\t' || *v == '\n' || *v == '\r') v++;
|
|
525
|
+
size_t n = strlen(v);
|
|
526
|
+
while (n > 0 && (v[n-1] == ' ' || v[n-1] == '\t' ||
|
|
527
|
+
v[n-1] == '\n' || v[n-1] == '\r'))
|
|
528
|
+
n--;
|
|
529
|
+
char* collapsed = (char*)malloc(n + 1);
|
|
530
|
+
if (!collapsed)
|
|
531
|
+
return facet_check_body(s, v, terminal_base, chain_is_list);
|
|
532
|
+
size_t o = 0;
|
|
533
|
+
int in_ws = 0;
|
|
534
|
+
for (size_t i = 0; i < n; i++) {
|
|
535
|
+
char ch = v[i];
|
|
536
|
+
if (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') {
|
|
537
|
+
if (!in_ws && o) collapsed[o++] = ' ';
|
|
538
|
+
in_ws = 1;
|
|
539
|
+
} else {
|
|
540
|
+
collapsed[o++] = ch;
|
|
541
|
+
in_ws = 0;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
if (o && collapsed[o-1] == ' ') o--;
|
|
545
|
+
collapsed[o] = 0;
|
|
546
|
+
int rc = facet_check_body(s, collapsed, terminal_base, chain_is_list);
|
|
547
|
+
free(collapsed);
|
|
514
548
|
return rc;
|
|
515
549
|
}
|
|
516
550
|
static int facet_check_body(const XsdSimple* s, const char* v,
|
|
@@ -394,6 +394,29 @@ TEST(XsdDatatypes, LengthFacetCountsOctetsForHexBinary) {
|
|
|
394
394
|
// an ANONYMOUS inline simpleType must validate the value against
|
|
395
395
|
// that base before its own facets — length on a list-with-length-2
|
|
396
396
|
// counts items, not characters of the whole lexical.
|
|
397
|
+
// leptris#1936 (stG010/stH005, the REAL suite documents): a list
|
|
398
|
+
// value space is whitespace=collapse — element content "\n\tCA\n "
|
|
399
|
+
// normalizes to "CA" before the enumeration/pattern facets run.
|
|
400
|
+
TEST(XsdDatatypes, ListValueSpaceCollapsesBeforeFacets) {
|
|
401
|
+
const char xsd[] =
|
|
402
|
+
"<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">"
|
|
403
|
+
"<xs:simpleType name=\"myToken\"><xs:list itemType=\"xs:NMTOKEN\"/>"
|
|
404
|
+
"</xs:simpleType>"
|
|
405
|
+
"<xs:simpleType name=\"fooType\"><xs:restriction base=\"myToken\">"
|
|
406
|
+
"<xs:enumeration value=\"CA\"/><xs:enumeration value=\"OR\"/>"
|
|
407
|
+
"</xs:restriction></xs:simpleType>"
|
|
408
|
+
"<xs:element name=\"r\" type=\"fooType\"/></xs:schema>";
|
|
409
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
410
|
+
LeptrisXsdSchema s = leptris_xsd_compile(xsd, strlen(xsd), &st);
|
|
411
|
+
ASSERT_EQ(st, LEPTRIS_OK);
|
|
412
|
+
ASSERT_NE(s, (LeptrisXsdSchema)0);
|
|
413
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "fooType", "\n\tCA\n "), 1);
|
|
414
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "fooType", "CA"), 1);
|
|
415
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "fooType", " OR "), 1);
|
|
416
|
+
EXPECT_EQ(leptris_xsd_simple_valid(s, "fooType", "CA OR"), 0);
|
|
417
|
+
leptris_xsd_free(s);
|
|
418
|
+
}
|
|
419
|
+
|
|
397
420
|
TEST(XsdDatatypes, RestrictionInlineBaseDrivesFacets) {
|
|
398
421
|
const char xsd[] =
|
|
399
422
|
"<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.401",
|
|
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",
|