leptris 1.9.397.0-aarch64-linux → 1.9.398.0-aarch64-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 +4 -4
- data/Rakefile +1 -1
- data/lib/leptris/version.rb +1 -1
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +20 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/xsd/datatypes.c +12 -2
- data/vendor-src/libleptris/src/leptris/xsd/validate.c +7 -8
- data/vendor-src/libleptris/test/xsd/test_xsd_compile.cpp +56 -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: 1c84575ff4701153bfd035f65d1ab416a7623c56dbac71f4ed1f7c781e902f4d
|
|
4
|
+
data.tar.gz: c71192697eace0cef20fef8c77eddc1ed3ad8abd82be12864a77b6aae3c39127
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '038d13c05f966615bd72c2e78369e0bdff70e20b3409e28117a88fd52f86838fa6266bc63e7cd28cbc70e834ea7f3249c9cc7fb65b62da58fc99cedda80e2258'
|
|
7
|
+
data.tar.gz: e546b900e38bb669cd6c4658d5f896b855555a97e1974e11a6b545d1bb2c071315fd289b78a5b3bd6981f9f799cb7501e635f14a44dab97ee83ddd2868056cfc
|
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.398"
|
|
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
|
data/lib/leptris/version.rb
CHANGED
data/lib/libleptris.so
CHANGED
|
Binary file
|
data/vendor-src/README.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.398] - 2026-10-31
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **gMonth accepts both XSD 1.0 spellings (leptris#1936, PR
|
|
8
|
+
#1937).** The first edition defined the lexical as `--MM--` (the
|
|
9
|
+
W3C suite's gMonth002/004 carry `--03--`); the errata added
|
|
10
|
+
`--MM`. Both validate now, each with its optional timezone.
|
|
11
|
+
- **Absent timezone must end the lexical.** `tz_optional`'s absent
|
|
12
|
+
path returned success without reaching end of string, so the
|
|
13
|
+
g-regional/date family accepted trailing garbage (`--03garbage`,
|
|
14
|
+
`2026-10-08x`). Pinned by a 15-row red-first spec; the XSD
|
|
15
|
+
compile suite stays 138/138.
|
|
16
|
+
- **The automaton size cap is inert at instance validation
|
|
17
|
+
(moxml#514, PR #1938).** The #1894 cap is a resource guard, not a
|
|
18
|
+
validity signal: a document whose content model hits the cap
|
|
19
|
+
validates on its merits instead of failing.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
3
23
|
## [1.9.397] - 2026-10-31
|
|
4
24
|
|
|
5
25
|
### Performance
|
|
@@ -146,7 +146,9 @@ static int two_digits(const char** p) {
|
|
|
146
146
|
return 1;
|
|
147
147
|
}
|
|
148
148
|
static int tz_optional(const char** p) {
|
|
149
|
-
|
|
149
|
+
/* #1936: the absent timezone is only absent at END of string —
|
|
150
|
+
* "2000-01-01garbage" used to pass the g-regional family. */
|
|
151
|
+
if (**p != 'Z' && **p != '+' && **p != '-') return **p == 0;
|
|
150
152
|
if (**p == 'Z') { (*p)++; return **p == 0; }
|
|
151
153
|
(*p)++;
|
|
152
154
|
return two_digits(p) && *(*p) == ':' && (*p)++ && two_digits(p) &&
|
|
@@ -393,7 +395,15 @@ int xsd_builtin_valid(const char* type, const char* v) {
|
|
|
393
395
|
const char* p = v;
|
|
394
396
|
if (*p++ != '-') return 0;
|
|
395
397
|
if (*p++ != '-') return 0;
|
|
396
|
-
|
|
398
|
+
if (!two_digits_bounded(&p, 1, 12)) return 0;
|
|
399
|
+
/* #1936: XSD 1.0 first edition spelled the lexical --MM--
|
|
400
|
+
* (the errata added --MM) — both are valid 1.0 forms, each
|
|
401
|
+
* carrying the optional timezone. */
|
|
402
|
+
if (p[0] == '-' && p[1] == '-') {
|
|
403
|
+
const char* q = p + 2;
|
|
404
|
+
return tz_optional(&q);
|
|
405
|
+
}
|
|
406
|
+
return tz_optional(&p);
|
|
397
407
|
}
|
|
398
408
|
if (strcmp(type, "xs:dateTime") == 0) {
|
|
399
409
|
const char* p = v;
|
|
@@ -392,14 +392,13 @@ static void validate_children(struct xsd_validator* v,
|
|
|
392
392
|
int ok = xsd_content_valid(s, model, xsd_target_ns(s), names, uris,
|
|
393
393
|
n);
|
|
394
394
|
if (ok == -2) {
|
|
395
|
-
/* #1894: pathological occurrence product — the automaton
|
|
396
|
-
* exceeds the compile-time size cap.
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
"(pathological occurrence product)");
|
|
395
|
+
/* #1894/#514: pathological occurrence product — the automaton
|
|
396
|
+
* exceeds the compile-time size cap. The cap is a resource
|
|
397
|
+
* guard, not a validity verdict: the content model is
|
|
398
|
+
* engine-INERT for this element (no instance finding — the
|
|
399
|
+
* consuming validator decides), the same posture as the
|
|
400
|
+
* compile-time guard. The element's content check is skipped
|
|
401
|
+
* and the walk continues; under-report, never false-report. */
|
|
403
402
|
free(names);
|
|
404
403
|
free(uris);
|
|
405
404
|
return;
|
|
@@ -460,6 +460,35 @@ TEST(XsdDatatypes, BuiltinsLexicalMatrix) {
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
+
/* leptris#1936: gMonth accepts BOTH XSD 1.0 spellings — the
|
|
464
|
+
* errata's --MM and the first edition's --MM-- — each with the
|
|
465
|
+
* optional timezone; and the g-regional/date family rejects
|
|
466
|
+
* trailing garbage after an absent timezone. */
|
|
467
|
+
TEST(XsdDatatypes, GMonthSpellingsAndStrictTail) {
|
|
468
|
+
const BuiltinCase rows[] = {
|
|
469
|
+
{"xs:gMonth", "--03", 1},
|
|
470
|
+
{"xs:gMonth", "--03--", 1},
|
|
471
|
+
{"xs:gMonth", "--03Z", 1},
|
|
472
|
+
{"xs:gMonth", "--03--Z", 1},
|
|
473
|
+
{"xs:gMonth", "--03--+05:00", 1},
|
|
474
|
+
{"xs:gMonth", "--03-05:00", 1},
|
|
475
|
+
{"xs:gMonth", "--12", 1},
|
|
476
|
+
{"xs:gMonth", "--13", 0},
|
|
477
|
+
{"xs:gMonth", "--00", 0},
|
|
478
|
+
{"xs:gMonth", "--03garbage", 0},
|
|
479
|
+
{"xs:gMonth", "--03-x", 0},
|
|
480
|
+
{"xs:gMonth", "--03--05:00", 0},
|
|
481
|
+
{"xs:date", "2026-10-08garbage", 0},
|
|
482
|
+
{"xs:gDay", "---05garbage", 0},
|
|
483
|
+
{"xs:gYear", "2026x", 0},
|
|
484
|
+
};
|
|
485
|
+
for (const BuiltinCase& c : rows) {
|
|
486
|
+
SCOPED_TRACE(std::string(c.type) + " : " + c.value);
|
|
487
|
+
EXPECT_EQ(leptris_xsd_builtin_valid(c.type, c.value), c.expect)
|
|
488
|
+
<< c.type << " : " + std::string(c.value);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
463
492
|
/* leptris#1883: the builtin lexical table converges on Datatypes
|
|
464
493
|
* Part 2 — collapse semantics, unbounded integers, +INF spelling,
|
|
465
494
|
* 64-bit bounds, calendar/duration/binary grammars, xmlns prefix. */
|
|
@@ -3657,6 +3686,33 @@ TEST(XsdContent, PathologicalProductFailsLoudlyNotOom) {
|
|
|
3657
3686
|
leptris_xsd_free(s);
|
|
3658
3687
|
}
|
|
3659
3688
|
|
|
3689
|
+
/* lutaml/moxml#514: the cap is a resource guard, not a validity
|
|
3690
|
+
* verdict. A content model whose NFA crosses the cap is engine-INERT
|
|
3691
|
+
* at INSTANCE validation — no structured row flips a suite-valid
|
|
3692
|
+
* document to invalid (the compile-time loud face above is the one
|
|
3693
|
+
* place the guard reports). */
|
|
3694
|
+
TEST(XsdContent, Issue514CapIsInertAtInstanceValidation) {
|
|
3695
|
+
std::string xsd =
|
|
3696
|
+
"<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">"
|
|
3697
|
+
"<xs:element name=\"r\"><xs:complexType><xs:sequence"
|
|
3698
|
+
" minOccurs=\"0\" maxOccurs=\"2000\"><xs:element name=\"e\""
|
|
3699
|
+
" minOccurs=\"0\" maxOccurs=\"2000\"/></xs:sequence>"
|
|
3700
|
+
"</xs:complexType></xs:element></xs:schema>";
|
|
3701
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
3702
|
+
LeptrisXsdSchema s =
|
|
3703
|
+
leptris_xsd_compile(xsd.data(), xsd.size(), &st);
|
|
3704
|
+
ASSERT_EQ(st, LEPTRIS_OK);
|
|
3705
|
+
ASSERT_NE(s, (LeptrisXsdSchema)0);
|
|
3706
|
+
LeptrisDocument d = leptris_parse_string("<r><e/><e/></r>", 15, &st);
|
|
3707
|
+
ASSERT_NE(d, nullptr);
|
|
3708
|
+
/* The instance is suite-valid and stays valid: the capped model
|
|
3709
|
+
* is skipped, not failed. */
|
|
3710
|
+
EXPECT_EQ(leptris_xsd_validate(s, d), 1);
|
|
3711
|
+
EXPECT_EQ(leptris_xsd_error_count(s), 0u);
|
|
3712
|
+
leptris_document_free(d);
|
|
3713
|
+
leptris_xsd_free(s);
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3660
3716
|
TEST(XsdContent, Issue1894ReproStaysUnderCapAndCorrect) {
|
|
3661
3717
|
/* The issue's exact shape — seq maxOccurs=100 x element
|
|
3662
3718
|
* unbounded — lowers to a loop region (not copies) and must stay
|
|
@@ -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.398",
|
|
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",
|