leptris 1.9.401.0-aarch64-linux → 1.9.402.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28cee108eff89db88bae48238982e8f2998b92e4ec8532f874473bc9f0e95d3b
4
- data.tar.gz: f65f2f4c96a69eed0015d7a8f396b930c102bd1e8154b9364385e5de2fc2feaf
3
+ metadata.gz: 7b1b31c0bfe703486e2a44d908e62e9ba697a56c4680a6242fca206c878c1cec
4
+ data.tar.gz: a66f83a71c92648ee45d72f815995e42f609a6b93dfdb0b9a091737529cc9c4c
5
5
  SHA512:
6
- metadata.gz: fcbb2ed215849abc8e232ee019b32bb2e3e458c113a0e711fd65e07031a74254cf53a9d28dde100cbc741436e9723f24f2dad77fd390eb804922910748d32518
7
- data.tar.gz: 2684009bd6dc0b44bf4e2b9249af0af6af37c41e36ee62fae3b9fb2b873e4b987b511a23c0d817b920308689ab8e2c5b81bea704550c48971545ccc47d9fd2d2
6
+ metadata.gz: 9855a4bcf55ce0818b580e75faade58d55423cad2aeeeab1e7aad0e37d154c1f6767bbfefcea7a4e762fbb3ea132c64be7e4cb0de15d50cf1733d38427b5527c
7
+ data.tar.gz: 83a0333523e1217e32ce381a3f4f094b658a70eb74af76d83d5a9ddd2a866508b9d8f92a159cd81f8c23999c21fc77cdd3b90e88f81f51e5a30c47ba7a9729dc
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.401"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Leptris
4
- VERSION = "1.9.401.0"
4
+ VERSION = "1.9.402.0"
5
5
  end
data/lib/libleptris.so CHANGED
Binary file
data/vendor-src/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Sources vendored in this gem (recompile rights; the ruby
2
2
  variant builds them at install via extconf.rb):
3
3
 
4
- - libleptris v1.9.401
4
+ - libleptris v1.9.402
5
5
  - utf8proc v2.11.0
6
6
 
7
7
  Rebuild by hand:
@@ -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
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(leptris
6
- VERSION 1.9.401
6
+ VERSION 1.9.402
7
7
  DESCRIPTION "Fast XML parser and XPath evaluator in pure C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -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
- for (int i = '0'; i <= '9'; i++) cls_add(n, (unsigned char)i);
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
- if (!eff_type) return; /* anyType */
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 && *text && strcmp(text, d->fixed) != 0)
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.401",
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.401.0
4
+ version: 1.9.402.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-01 00:00:00.000000000 Z
11
+ date: 2026-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi