leptris 1.9.409.0-arm-linux → 1.9.410.0-arm-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: eafbbeef16fdcd23dd55e3c9005499f45ff62e46a726213b59be4f0cb9da425e
4
- data.tar.gz: b32a58e93bb9902c0507ff27f4cb99de5f21881682a1e8e0b5749e0152e510ab
3
+ metadata.gz: 17a1175249b43e3bcc235349fc6487c76cd22c93a6fe8491e60299ac8d83162b
4
+ data.tar.gz: d72a6dcc64c108ab35ef387f364bd8777244cefe7c4c2598a686c3f6f2239c86
5
5
  SHA512:
6
- metadata.gz: 276bd9cbb91e559f1484e49297c9210090f80d82a956f160c40f6dc49a71420a32098290a0d57ca316b77c8ef435437d3b8bd0ecd05e29d1b1abd32d02504f6c
7
- data.tar.gz: 68c130342e76d382359abc09da3c93d8762ef1a5233ae555b7f8827736331c33baf51ec6518d6207f1ecac41cb1606a19b4363bab310438c0c5ae46b20ba25a2
6
+ metadata.gz: 530a654dbe7f5f3896d377247615d236e387f387c61e868305e835702070494ef98e7f350e002e91f334f3c248ce80f23ebdab21e5827e36aed52d9e8cd91d77
7
+ data.tar.gz: b7f4ed86c9583c91a81017f2dedce71be553c48b879b170313951fb0692de896c09e15278fd5283998cd860fb17a76840bc39d53f813d48f3ca11f84225589e3
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.409"
11
+ LIBLEPTRIS_VERSION = "1.9.410"
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.409.0"
4
+ VERSION = "1.9.410.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.409
4
+ - libleptris v1.9.410
5
5
  - utf8proc v2.11.0
6
6
 
7
7
  Rebuild by hand:
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.9.410] - 2026-11-05
4
+
5
+ ### Fixed
6
+
7
+ - **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.
8
+
9
+
3
10
  ## [1.9.409] - 2026-11-05
4
11
 
5
12
  ### Fixed
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(leptris
6
- VERSION 1.9.409
6
+ VERSION 1.9.410
7
7
  DESCRIPTION "Fast XML parser and XPath evaluator in pure C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -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
- for (XsdElementDecl* t = s->elements; t; t = t->next)
3947
- if (strcmp(t->name, name) == 0) return t;
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,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>
@@ -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.409",
4
+ "version": "1.9.410",
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leptris
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.409.0
4
+ version: 1.9.410.0
5
5
  platform: arm-linux
6
6
  authors:
7
7
  - Ribose Inc.
@@ -1545,6 +1545,11 @@ files:
1545
1545
  - vendor-src/libleptris/test/xsd/libxml2-cases/scc-no-xmlns_0.xsd
1546
1546
  - vendor-src/libleptris/test/xsd/libxml2-cases/scc-no-xsi_0.xml
1547
1547
  - vendor-src/libleptris/test/xsd/libxml2-cases/scc-no-xsi_0.xsd
1548
+ - vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/roundtrip_a.xsd
1549
+ - vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG1_c.xsd
1550
+ - vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2.xml
1551
+ - vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2_a.xsd
1552
+ - vendor-src/libleptris/test/xsd/libxml2-cases/schG2-import-compose/schG2_b.xsd
1548
1553
  - vendor-src/libleptris/test/xsd/libxml2-cases/schema_set/f.xsd
1549
1554
  - vendor-src/libleptris/test/xsd/libxml2-cases/schema_set/g.xsd
1550
1555
  - vendor-src/libleptris/test/xsd/libxml2-cases/seq-dubl-elem1_0.xml