leptris 1.9.409.0-ppc64le-linux → 1.9.411.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 +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 +21 -0
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/benchmarks/dom/bench_leptris.c +5 -1
- data/vendor-src/libleptris/src/leptris/flat/direct_parse.c +85 -4
- data/vendor-src/libleptris/src/leptris/xsd/compile.c +6 -2
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/Cyrillic.xml +1 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/Cyrillic.xsd +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/reG8.xml +11 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/reG8.xsd +29 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/roundtrip_a.xsd +16 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG1_c.xsd +17 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2.xml +19 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2_a.xsd +27 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2_b.xsd +15 -0
- data/vendor-src/libleptris/test/xsd/test_i1957_1958.cpp +16 -0
- data/vendor-src/libleptris/test/xsd/test_xsd_compile.cpp +75 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4898ddc5b1896abe67499ac2fd21fa551b57604d01843400db8763d28efd9f9f
|
|
4
|
+
data.tar.gz: 9c511b5e4f851c7b2c8f2e048228bf9fc6ea5dcccbc0e8b8da30c07c9528db29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eed587ca158656d003daee72fccb72258c1ce8d88f7b4a782f61e4973edc3935cc48f6bdeaa5a52c37df5ce2eb0305101c9b78ffc7b679ffcf19a08bf62f96cd
|
|
7
|
+
data.tar.gz: 5313c352b09b444cc04dc2f737b4732d7927bdd62b47796c31d810ad4f3b1a3d8965f285a0bb009612ba6c1053ed85b5c1693484391f8eab0b43830791619cb5
|
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.411"
|
|
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,26 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.9.411] - 2026-11-06
|
|
4
|
+
|
|
5
|
+
### Performance
|
|
6
|
+
|
|
7
|
+
- **parse**: the element-open name scan is FUSED with the hash split — `dp_scan_name_fused` produces the extent, the FNV-1a chain, and the last-colon offset in one 4-byte-unrolled walk instead of two passes over the name bytes (#1842 slice 3; line-level-profiled at ~7% of parse on the serialbench shape — attrs 473 / text-scan 405 / wire 219 / name-scan 130 / hash-split 82; ABBA x6 median 1.018x parse, all pairs positive). Hash semantics proven identical to `dp_split_hash_name` and `leptris_name_hash_compute` — parsed and mutated elements keep matching in the child-axis hash lookups.
|
|
8
|
+
|
|
9
|
+
### Tests
|
|
10
|
+
|
|
11
|
+
- engine-level pins for the leptris-rs#47 faces (reG8 char-range + the Cyrillic `\p{IsCyrillic}` block escape — the sweep showed the regex corpus scoring identically on 1.9.406/407/410 with the engine leading libxml2 1400 vs 1390)
|
|
12
|
+
- the vendored W3C schG2 composition (compile_file + both compile_set unit orders + the roundtrip artifact) riding the #1976 no-ns resolution fix
|
|
13
|
+
- the bench harness gained `LEPTRIS_BENCH_ITERS` for sampling-window profiling
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.9.410] - 2026-11-05
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- **xsd**: a no-namespace element no longer resolves to a same-name **namespaced** global declaration. `xsd_find_element_child_ns`'s no-ns branch carried an ns-blind fallback that typed whole subtrees with a foreign namespace's type — the W3C schG2 shape (lutaml-xsd roundtrip compiles unit A alone; the instance's no-ns `<e1>` answered ns-a's `ct-A` and manufactured two false lexical rows). The fallback is removed; a no-ns element resolves only against true no-ns declarations (leptris#1976, PR #1977; full suite 2239/2239 with no corpus reliance on the fallback). Present since before 1.9.407 — it surfaced in the 1.9.409 wave only because the leptris lane replaced nokogiri as the active validator.
|
|
22
|
+
|
|
23
|
+
|
|
3
24
|
## [1.9.409] - 2026-11-05
|
|
4
25
|
|
|
5
26
|
### Fixed
|
|
@@ -138,7 +138,11 @@ void bench_children_iterator(void* ctx) {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
int main(void) {
|
|
141
|
-
|
|
141
|
+
/* LEPTRIS_BENCH_ITERS: profiling hook — `sample` needs a
|
|
142
|
+
* multi-second window; the default 1000 finishes too fast. */
|
|
143
|
+
const char* iters_env = getenv("LEPTRIS_BENCH_ITERS");
|
|
144
|
+
const size_t ITERATIONS =
|
|
145
|
+
iters_env ? (size_t)strtoul(iters_env, NULL, 10) : 1000;
|
|
142
146
|
|
|
143
147
|
printf("\n");
|
|
144
148
|
printf("================================================================\n");
|
|
@@ -348,6 +348,69 @@ static LEPTRIS_ALWAYS_INLINE void dp_scan_name_p(char** pos) {
|
|
|
348
348
|
*pos = s;
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
/* Fused element-open name scan (#1842 slice 3): the extent walk
|
|
352
|
+
* doubles as dp_split_hash_name's FNV-1a hash + last-colon finder,
|
|
353
|
+
* so the name bytes are walked ONCE instead of twice (the profile's
|
|
354
|
+
* name-scan + hash-split cluster, ~7% of parse). Semantics match
|
|
355
|
+
* dp_split_hash_name exactly: h_since restarts at each colon (the
|
|
356
|
+
* split's hash chain), h_all never resets (the hash a colon-bearing
|
|
357
|
+
* name shorter than 3 bytes must keep — the guard would have skipped
|
|
358
|
+
* its colon test), and `colon` is the LAST colon's offset (-1 when
|
|
359
|
+
* none). Returns the scan end. */
|
|
360
|
+
static LEPTRIS_ALWAYS_INLINE char* dp_scan_name_fused(
|
|
361
|
+
char* s, uint16_t* hash_out, ptrdiff_t* colon_out, size_t* len_out) {
|
|
362
|
+
unsigned h_since = 0x811C;
|
|
363
|
+
unsigned h_all = 0x811C;
|
|
364
|
+
ptrdiff_t colon = -1;
|
|
365
|
+
size_t len = 0;
|
|
366
|
+
for (;;) {
|
|
367
|
+
char c = s[0];
|
|
368
|
+
if (DP_UNLIKELY(!IS_NAME_CHAR(c))) break;
|
|
369
|
+
c = s[1];
|
|
370
|
+
if (DP_UNLIKELY(!IS_NAME_CHAR(c))) {
|
|
371
|
+
h_since = ((h_since ^ (unsigned char)s[0]) * 0x0193) & 0xFFFF;
|
|
372
|
+
h_all = ((h_all ^ (unsigned char)s[0]) * 0x0193) & 0xFFFF;
|
|
373
|
+
if (s[0] == ':') { colon = len; h_since = 0x811C; }
|
|
374
|
+
len += 1;
|
|
375
|
+
s += 1;
|
|
376
|
+
break;
|
|
377
|
+
}
|
|
378
|
+
c = s[2];
|
|
379
|
+
if (DP_UNLIKELY(!IS_NAME_CHAR(c))) {
|
|
380
|
+
for (int i = 0; i < 2; i++) {
|
|
381
|
+
h_since = ((h_since ^ (unsigned char)s[i]) * 0x0193) & 0xFFFF;
|
|
382
|
+
h_all = ((h_all ^ (unsigned char)s[i]) * 0x0193) & 0xFFFF;
|
|
383
|
+
if (s[i] == ':') { colon = len; h_since = 0x811C; }
|
|
384
|
+
len += 1;
|
|
385
|
+
}
|
|
386
|
+
s += 2;
|
|
387
|
+
break;
|
|
388
|
+
}
|
|
389
|
+
c = s[3];
|
|
390
|
+
if (DP_UNLIKELY(!IS_NAME_CHAR(c))) {
|
|
391
|
+
for (int i = 0; i < 3; i++) {
|
|
392
|
+
h_since = ((h_since ^ (unsigned char)s[i]) * 0x0193) & 0xFFFF;
|
|
393
|
+
h_all = ((h_all ^ (unsigned char)s[i]) * 0x0193) & 0xFFFF;
|
|
394
|
+
if (s[i] == ':') { colon = len; h_since = 0x811C; }
|
|
395
|
+
len += 1;
|
|
396
|
+
}
|
|
397
|
+
s += 3;
|
|
398
|
+
break;
|
|
399
|
+
}
|
|
400
|
+
for (int i = 0; i < 4; i++) {
|
|
401
|
+
h_since = ((h_since ^ (unsigned char)s[i]) * 0x0193) & 0xFFFF;
|
|
402
|
+
h_all = ((h_all ^ (unsigned char)s[i]) * 0x0193) & 0xFFFF;
|
|
403
|
+
if (s[i] == ':') { colon = len; h_since = 0x811C; }
|
|
404
|
+
len += 1;
|
|
405
|
+
}
|
|
406
|
+
s += 4;
|
|
407
|
+
}
|
|
408
|
+
*hash_out = (uint16_t)((colon >= 0 && len < 3) ? h_all : h_since);
|
|
409
|
+
*colon_out = (colon >= 0 && len >= 3) ? colon : -1;
|
|
410
|
+
*len_out = len;
|
|
411
|
+
return s;
|
|
412
|
+
}
|
|
413
|
+
|
|
351
414
|
static LEPTRIS_ALWAYS_INLINE void dp_scan_name(DParser* p) {
|
|
352
415
|
dp_scan_name_p(&p->pos);
|
|
353
416
|
}
|
|
@@ -1993,8 +2056,11 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
1993
2056
|
* AFTER dp_parse_attrs returns. */
|
|
1994
2057
|
p.pos++; /* skip '<' */
|
|
1995
2058
|
char* name_start = p.pos;
|
|
1996
|
-
|
|
1997
|
-
|
|
2059
|
+
uint16_t name_hash;
|
|
2060
|
+
ptrdiff_t name_colon;
|
|
2061
|
+
size_t name_len;
|
|
2062
|
+
p.pos = dp_scan_name_fused(p.pos, &name_hash, &name_colon,
|
|
2063
|
+
&name_len);
|
|
1998
2064
|
|
|
1999
2065
|
/* Parse attributes (scans from the delimiter position). */
|
|
2000
2066
|
int self_closing = dp_parse_attrs(&p, elem);
|
|
@@ -2010,8 +2076,23 @@ static struct leptris_document* direct_parse_internal(char* buf, size_t len,
|
|
|
2010
2076
|
* has finished scanning the open tag. */
|
|
2011
2077
|
if (dp_nul(&p, name_start + name_len)) goto fail;
|
|
2012
2078
|
|
|
2013
|
-
|
|
2014
|
-
|
|
2079
|
+
/* #1842 slice 3: the hash + colon split point came out
|
|
2080
|
+
* of the fused name scan — the second walk is gone. */
|
|
2081
|
+
elem->name_hash = name_hash;
|
|
2082
|
+
if (name_colon >= 0) {
|
|
2083
|
+
char* colon = name_start + name_colon;
|
|
2084
|
+
*colon = '\0';
|
|
2085
|
+
leptris_elem_set_prefix(elem, name_start, p.pool);
|
|
2086
|
+
elem_set_name(elem, colon + 1);
|
|
2087
|
+
size_t local_len =
|
|
2088
|
+
name_len - (size_t)(colon + 1 - name_start);
|
|
2089
|
+
elem->name_len =
|
|
2090
|
+
(local_len > 254) ? 0xFF : (uint8_t)local_len;
|
|
2091
|
+
} else {
|
|
2092
|
+
elem_set_name(elem, name_start);
|
|
2093
|
+
elem->name_len =
|
|
2094
|
+
(name_len > 254) ? 0xFF : (uint8_t)name_len;
|
|
2095
|
+
}
|
|
2015
2096
|
|
|
2016
2097
|
/* Wire into parent. */
|
|
2017
2098
|
if (p.depth > 0) {
|
|
@@ -3943,8 +3943,12 @@ const XsdElementDecl* xsd_find_element_child_ns(
|
|
|
3943
3943
|
return xsd_ladder_element(s, name, uri, 0);
|
|
3944
3944
|
for (XsdElementDecl* t = s->elements; t; t = t->next)
|
|
3945
3945
|
if (!t->ns && strcmp(t->name, name) == 0) return t;
|
|
3946
|
-
|
|
3947
|
-
|
|
3946
|
+
/* leptris#1976: NO ns-blind fallback for a no-ns child. A
|
|
3947
|
+
* no-namespace element resolves only against true no-ns
|
|
3948
|
+
* declarations — matching a NAMESPACED global of the same name
|
|
3949
|
+
* typed whole subtrees with a foreign type and manufactured
|
|
3950
|
+
* false lexical rows (the schG2 roundtrip shape: a lone ns-a
|
|
3951
|
+
* unit answering the instance's no-ns <e1> with ns-a's ct-A). */
|
|
3948
3952
|
return NULL;
|
|
3949
3953
|
}
|
|
3950
3954
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<doc xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='Cyrillic.xsd' value='ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѠѡѢѣѤѥѦѧѨѩѪѫѬѭѮѯѰѱѲѳѴѵѶѷѸѹѺѻѼѽѾѿҀҁ҂҃҄҅҆҇҈҉ҊҋҌҍҎҏҐґҒғҔҕҖҗҘҙҚқҜҝҞҟҠҡҢңҤҥҦҧҨҩҪҫҬҭҮүҰұҲҳҴҵҶҷҸҹҺһҼҽҾҿӀӁӂӃӄӅӆӇӈӉӊӋӌӍӎӏӐӑӒӓӔӕӖӗӘәӚӛӜӝӞӟӠӡӢӣӤӥӦӧӨөӪӫӬӭӮӯӰӱӲӳӴӵӶӷӸӹӺӻӼӽӾӿ'/>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
|
|
2
|
+
<xs:element name='doc'><xs:complexType><xs:attribute name='value'>
|
|
3
|
+
<xs:simpleType>
|
|
4
|
+
<xs:restriction base='xs:string'>
|
|
5
|
+
<xs:pattern value='\p{IsCyrillic}+'/>
|
|
6
|
+
</xs:restriction>
|
|
7
|
+
</xs:simpleType>
|
|
8
|
+
</xs:attribute></xs:complexType></xs:element></xs:schema>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<doc xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
|
|
3
|
+
xsi:noNamespaceSchemaLocation='reG8.xsd' >
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
base='string', pattern='[0-z]*', value='1234567890:;<=>?@Azaz', type='valid', RULE='12,13,14,17'
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<elem att='1234567890:;<=>?@Azaz'/>
|
|
10
|
+
|
|
11
|
+
</doc>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
3
|
+
>
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
base='string', pattern='[0-z]*', value='1234567890:;<=>?@Azaz', type='valid', RULE='12,13,14,17'
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<xsd:element name="doc">
|
|
10
|
+
<xsd:complexType>
|
|
11
|
+
<xsd:choice>
|
|
12
|
+
<xsd:element name="elem" type="Regex" minOccurs="1" maxOccurs="unbounded"/>
|
|
13
|
+
</xsd:choice>
|
|
14
|
+
</xsd:complexType>
|
|
15
|
+
</xsd:element>
|
|
16
|
+
|
|
17
|
+
<xsd:complexType name="Regex">
|
|
18
|
+
<xsd:attribute name="att">
|
|
19
|
+
<xsd:simpleType>
|
|
20
|
+
<xsd:restriction base="xsd:string">
|
|
21
|
+
<xsd:pattern value="[0-z]*"/>
|
|
22
|
+
</xsd:restriction>
|
|
23
|
+
</xsd:simpleType>
|
|
24
|
+
</xsd:attribute>
|
|
25
|
+
</xsd:complexType>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</xsd:schema>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<xsd:schema xmlns="ns-a" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="ns-a">
|
|
2
|
+
<xsd:complexType name="ct-A">
|
|
3
|
+
<xsd:sequence minOccurs="1">
|
|
4
|
+
<xsd:element name="a1" type="xsd:int"/>
|
|
5
|
+
<xsd:element name="a2" type="xsd:boolean"/>
|
|
6
|
+
</xsd:sequence>
|
|
7
|
+
</xsd:complexType>
|
|
8
|
+
<xsd:element name="e1" type="ct-A"/>
|
|
9
|
+
<xsd:element name="root">
|
|
10
|
+
<xsd:complexType>
|
|
11
|
+
<xsd:choice maxOccurs="unbounded">
|
|
12
|
+
<xsd:any namespace="##any" processContents="strict"/>
|
|
13
|
+
</xsd:choice>
|
|
14
|
+
</xsd:complexType>
|
|
15
|
+
</xsd:element>
|
|
16
|
+
</xsd:schema>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
2
|
+
targetNamespace="ns-c"
|
|
3
|
+
xmlns="ns-c"
|
|
4
|
+
>
|
|
5
|
+
|
|
6
|
+
<xsd:complexType name="ct-A">
|
|
7
|
+
<xsd:sequence minOccurs="1">
|
|
8
|
+
<xsd:element name="a1" type="xsd:int" />
|
|
9
|
+
<xsd:element name="a2" type="xsd:int" />
|
|
10
|
+
</xsd:sequence>
|
|
11
|
+
</xsd:complexType>
|
|
12
|
+
|
|
13
|
+
<xsd:element name="e1" type="ct-A" />
|
|
14
|
+
|
|
15
|
+
</xsd:schema>
|
|
16
|
+
|
|
17
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<a:root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
2
|
+
xsi:schemaLocation="ns-a schG2_a.xsd"
|
|
3
|
+
xmlns:a="ns-a"
|
|
4
|
+
xmlns:c="ns-c"
|
|
5
|
+
>
|
|
6
|
+
<a:e1>
|
|
7
|
+
<a1>123</a1>
|
|
8
|
+
<a2>true</a2>
|
|
9
|
+
</a:e1>
|
|
10
|
+
<e1>
|
|
11
|
+
<a1>true</a1>
|
|
12
|
+
<a2>123</a2>
|
|
13
|
+
</e1>
|
|
14
|
+
<c:e1>
|
|
15
|
+
<a1>123</a1>
|
|
16
|
+
<a2>123</a2>
|
|
17
|
+
</c:e1>
|
|
18
|
+
|
|
19
|
+
</a:root>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
2
|
+
targetNamespace="ns-a"
|
|
3
|
+
xmlns="ns-a"
|
|
4
|
+
>
|
|
5
|
+
|
|
6
|
+
<xsd:import schemaLocation="schG2_b.xsd"/>
|
|
7
|
+
|
|
8
|
+
<xsd:complexType name="ct-A">
|
|
9
|
+
<xsd:sequence minOccurs="1">
|
|
10
|
+
<xsd:element name="a1" type="xsd:int" />
|
|
11
|
+
<xsd:element name="a2" type="xsd:boolean" />
|
|
12
|
+
</xsd:sequence>
|
|
13
|
+
</xsd:complexType>
|
|
14
|
+
|
|
15
|
+
<xsd:element name="e1" type="ct-A" />
|
|
16
|
+
|
|
17
|
+
<xsd:element name="root">
|
|
18
|
+
<xsd:complexType>
|
|
19
|
+
<xsd:choice maxOccurs="unbounded">
|
|
20
|
+
<xsd:any namespace="##any" processContents="strict"/>
|
|
21
|
+
</xsd:choice>
|
|
22
|
+
</xsd:complexType>
|
|
23
|
+
</xsd:element>
|
|
24
|
+
|
|
25
|
+
</xsd:schema>
|
|
26
|
+
|
|
27
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
2
|
+
>
|
|
3
|
+
|
|
4
|
+
<xsd:import namespace="ns-c" schemaLocation="schG1_c.xsd" />
|
|
5
|
+
|
|
6
|
+
<xsd:complexType name="ct-A">
|
|
7
|
+
<xsd:sequence minOccurs="1">
|
|
8
|
+
<xsd:element name="a1" type="xsd:boolean" />
|
|
9
|
+
<xsd:element name="a2" type="xsd:int" />
|
|
10
|
+
</xsd:sequence>
|
|
11
|
+
</xsd:complexType>
|
|
12
|
+
|
|
13
|
+
<xsd:element name="e1" type="ct-A" />
|
|
14
|
+
|
|
15
|
+
</xsd:schema>
|
|
@@ -177,3 +177,19 @@ TEST(XsdSubstNs, NamespacedChildTypedByMemberNotUnqualifiedParticle) {
|
|
|
177
177
|
leptris_document_free(d);
|
|
178
178
|
leptris_xsd_free(s);
|
|
179
179
|
}
|
|
180
|
+
|
|
181
|
+
// ---- leptris-rs#47: the 1.9.407 regex-wave regression claim -------
|
|
182
|
+
// reG8: char-range [0-z]* over ASCII punctuation; Cyrillic: the
|
|
183
|
+
// \p{IsCyrillic} block escape over block members. Both expected VALID.
|
|
184
|
+
|
|
185
|
+
TEST(XsdRegexRs47, ReG8CharRangeStaysValid) {
|
|
186
|
+
EXPECT_EQ(validate_case(cases_path("rs47-regex/reG8.xsd"),
|
|
187
|
+
cases_path("rs47-regex/reG8.xml")), 1);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
TEST(XsdRegexRs47, CyrillicBlockEscapeStaysValid) {
|
|
191
|
+
EXPECT_EQ(validate_case(cases_path("rs47-regex/Cyrillic.xsd"),
|
|
192
|
+
cases_path("rs47-regex/Cyrillic.xml")), 1);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
@@ -1256,6 +1256,81 @@ TEST(XsdCompile, StrictAnyAttrGrammarRidesAttributeGroupRefs) {
|
|
|
1256
1256
|
leptris_xsd_free(s);
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
1259
|
+
// leptris#1976: the 1.9.409 ns-aware particle typing must not
|
|
1260
|
+
// disturb the A(ns)/B(no-ns) import composition — W3C schG2 (valid).
|
|
1261
|
+
// The no-ns global e1 types through B's ct-A (a1:boolean, a2:int);
|
|
1262
|
+
// the ns-a e1 types through A's ct-A (a1:int, a2:boolean).
|
|
1263
|
+
TEST(XsdValidate, SchG2ImportComposeStaysValid) {
|
|
1264
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1265
|
+
LeptrisXsdSchema s = leptris_xsd_compile_file(
|
|
1266
|
+
LEPTRIS_XSD_CASES_DIR
|
|
1267
|
+
"/schG2-import-compose/schG2_a.xsd", &st);
|
|
1268
|
+
ASSERT_NE(s, (LeptrisXsdSchema)0) << "status " << (int)st;
|
|
1269
|
+
LeptrisDocument d = leptris_parse_file(
|
|
1270
|
+
LEPTRIS_XSD_CASES_DIR
|
|
1271
|
+
"/schG2-import-compose/schG2.xml", &st);
|
|
1272
|
+
ASSERT_NE(d, nullptr) << "status " << (int)st;
|
|
1273
|
+
EXPECT_EQ(leptris_xsd_validate(s, d), 1);
|
|
1274
|
+
for (size_t i = 0; i < leptris_xsd_error_count(s); i++)
|
|
1275
|
+
ADD_FAILURE() << leptris_xsd_error_at(s, i);
|
|
1276
|
+
leptris_document_free(d);
|
|
1277
|
+
leptris_xsd_free(s);
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
// #1976 variant: the same composition through leptris_xsd_compile_set
|
|
1281
|
+
// (the lutaml-xsd EngineContext path) — both unit orders must stay valid.
|
|
1282
|
+
TEST(XsdValidate, SchG2CompileSetBothOrdersValid) {
|
|
1283
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1284
|
+
const char* paths_ab[] = {
|
|
1285
|
+
LEPTRIS_XSD_CASES_DIR "/schG2-import-compose/schG2_a.xsd",
|
|
1286
|
+
LEPTRIS_XSD_CASES_DIR "/schG2-import-compose/schG2_b.xsd",
|
|
1287
|
+
};
|
|
1288
|
+
const char* paths_ba[] = {
|
|
1289
|
+
LEPTRIS_XSD_CASES_DIR "/schG2-import-compose/schG2_b.xsd",
|
|
1290
|
+
LEPTRIS_XSD_CASES_DIR "/schG2-import-compose/schG2_a.xsd",
|
|
1291
|
+
};
|
|
1292
|
+
const char* doc_paths[] = {
|
|
1293
|
+
LEPTRIS_XSD_CASES_DIR "/schG2-import-compose/schG2.xml",
|
|
1294
|
+
};
|
|
1295
|
+
for (int order = 0; order < 2; order++) {
|
|
1296
|
+
LeptrisXsdSchema s = leptris_xsd_compile_set(
|
|
1297
|
+
order == 0 ? paths_ab : paths_ba, 2, &st);
|
|
1298
|
+
ASSERT_NE(s, (LeptrisXsdSchema)0) << "status " << (int)st;
|
|
1299
|
+
LeptrisDocument d = leptris_parse_file(doc_paths[0], &st);
|
|
1300
|
+
ASSERT_NE(d, nullptr) << "status " << (int)st;
|
|
1301
|
+
EXPECT_EQ(leptris_xsd_validate(s, d), 1) << "order " << order;
|
|
1302
|
+
for (size_t i = 0; i < leptris_xsd_error_count(s); i++)
|
|
1303
|
+
ADD_FAILURE() << "order " << order << ": "
|
|
1304
|
+
<< leptris_xsd_error_at(s, i);
|
|
1305
|
+
leptris_document_free(d);
|
|
1306
|
+
leptris_xsd_free(s);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
// #1976 root cause face: the lutaml-xsd roundtrip drops the import,
|
|
1311
|
+
// so the engine compiles unit A ALONE (e1/ct-A/root, all ns-a; the
|
|
1312
|
+
// default xmlns="ns-a" preserved). The instance's no-ns <e1> then
|
|
1313
|
+
// meets ONLY ns-a declarations: the strict wildcard reports it
|
|
1314
|
+
// undeclared, and its children a1/a2 typed... by whom? This pins
|
|
1315
|
+
// whatever the engine does here so the fix has a regression gate.
|
|
1316
|
+
TEST(XsdValidate, SchG2RoundtripUnitAAlone) {
|
|
1317
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
1318
|
+
LeptrisXsdSchema s = leptris_xsd_compile_file(
|
|
1319
|
+
LEPTRIS_XSD_CASES_DIR
|
|
1320
|
+
"/schG2-import-compose/roundtrip_a.xsd", &st);
|
|
1321
|
+
ASSERT_NE(s, (LeptrisXsdSchema)0) << "status " << (int)st;
|
|
1322
|
+
LeptrisDocument d = leptris_parse_file(
|
|
1323
|
+
LEPTRIS_XSD_CASES_DIR
|
|
1324
|
+
"/schG2-import-compose/schG2.xml", &st);
|
|
1325
|
+
ASSERT_NE(d, nullptr) << "status " << (int)st;
|
|
1326
|
+
EXPECT_EQ(leptris_xsd_validate(s, d), 1)
|
|
1327
|
+
<< leptris_xsd_error_at(s, 0);
|
|
1328
|
+
for (size_t i = 0; i < leptris_xsd_error_count(s); i++)
|
|
1329
|
+
ADD_FAILURE() << leptris_xsd_error_at(s, i);
|
|
1330
|
+
leptris_document_free(d);
|
|
1331
|
+
leptris_xsd_free(s);
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1259
1334
|
TEST(XsdValidate, ValidDocumentPasses) {
|
|
1260
1335
|
EXPECT_EQ(validate_doc(k_v_schema,
|
|
1261
1336
|
"<rows version=\"2\" status=\"ok\">"
|
|
@@ -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.411",
|
|
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.411.0
|
|
5
5
|
platform: ppc64le-linux
|
|
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-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|
|
@@ -1541,10 +1541,19 @@ files:
|
|
|
1541
1541
|
- vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/stZ072.xsd
|
|
1542
1542
|
- vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/test95960_1.xml
|
|
1543
1543
|
- vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/test95960_1.xsd
|
|
1544
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/Cyrillic.xml
|
|
1545
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/Cyrillic.xsd
|
|
1546
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/reG8.xml
|
|
1547
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/rs47-regex/reG8.xsd
|
|
1544
1548
|
- vendor-src/libleptris/test/xsd/libxml2-cases/scc-no-xmlns_0.xml
|
|
1545
1549
|
- vendor-src/libleptris/test/xsd/libxml2-cases/scc-no-xmlns_0.xsd
|
|
1546
1550
|
- vendor-src/libleptris/test/xsd/libxml2-cases/scc-no-xsi_0.xml
|
|
1547
1551
|
- vendor-src/libleptris/test/xsd/libxml2-cases/scc-no-xsi_0.xsd
|
|
1552
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/roundtrip_a.xsd
|
|
1553
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG1_c.xsd
|
|
1554
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2.xml
|
|
1555
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2_a.xsd
|
|
1556
|
+
- vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2_b.xsd
|
|
1548
1557
|
- vendor-src/libleptris/test/xsd/libxml2-cases/schema_set/f.xsd
|
|
1549
1558
|
- vendor-src/libleptris/test/xsd/libxml2-cases/schema_set/g.xsd
|
|
1550
1559
|
- vendor-src/libleptris/test/xsd/libxml2-cases/seq-dubl-elem1_0.xml
|