leptris 1.9.408.0-ppc64le-linux → 1.9.409.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 280891dd4523b9c1748eea8c1350cabd5d4baed7062f7ed7944fa5aebb10eb45
4
- data.tar.gz: 9a3b47636369e25612ed3d8da3eb372555151ffba42e616c67ddded41223147d
3
+ metadata.gz: 15cb273cafed789b267a6ad4cb2a6b5a9b92ace57e9f14363195e1a15e5382a5
4
+ data.tar.gz: 66e471cbe79201eb1c806618b4d6baf325d6286ab338ecd884b285113492b65e
5
5
  SHA512:
6
- metadata.gz: fc4b86f6bb4acb0ae8dd8944ae52d69651d78f2bfd4a181e646e3989f8ddf2cdb6acc2917be826c837c7577fe30ce637bdc453b947f03b8dd56fbcca02c81093
7
- data.tar.gz: 3da8bb8d4ef6ac30860f2f778d3455fccab8d481bfd7ea2db990c5e8a85ae7aae808dde1276e60ce65750f67835441e79eb1188f22e36f6cab137692714366ca
6
+ metadata.gz: 48ca24ca9197a6dfd8c6f8ec2b2a0540d2fd5764f6de99219bbcb5179ac2464cf8bb9e3248d6c5ebd2cf6fb0a5aaa05dea0e4063f7941febebb81c877ee75e57
7
+ data.tar.gz: a1b13774fdba05c3919043b5de17c836544972e142804a7bdba6a8d2930cbe703f6b1cb814bfd6212f25aab1f7d8d8b5e365a7559f990c793a932b26527bcf19
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.408"
11
+ LIBLEPTRIS_VERSION = "1.9.409"
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.408.0"
4
+ VERSION = "1.9.409.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.408
4
+ - libleptris v1.9.409
5
5
  - utf8proc v2.11.0
6
6
 
7
7
  Rebuild by hand:
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.9.409] - 2026-11-05
4
+
5
+ ### Fixed
6
+
7
+ - **xsd**: particle typing is NAMESPACE-AWARE — content-model capture records particle namespaces (ref-form resolves the QName; name-form reads @form/elementFormDefault), substitution members ride their own namespace (not the head particle's), and the gates are asymmetric per the pinned corpus posture: qualified particles admit no-ns children leniently, unqualified particles are strict with a fallback when no global declaration could type the child (leptris-rs#46; W3C elemZ020 vendored). Rounds out the v1.9.408 XSD wave (rs#45, #1969, #1964).
8
+
9
+
10
+
3
11
  ## [1.9.408] - 2026-11-05
4
12
 
5
13
  ### Fixed
@@ -3,7 +3,7 @@
3
3
  cmake_minimum_required(VERSION 3.20)
4
4
 
5
5
  project(leptris
6
- VERSION 1.9.408
6
+ VERSION 1.9.409
7
7
  DESCRIPTION "Fast XML parser and XPath evaluator in pure C"
8
8
  LANGUAGES C CXX
9
9
  )
@@ -125,6 +125,9 @@ static XsdAssert* xsd_capture_assert(struct leptris_xsd_schema* s,
125
125
  LeptrisElement e);
126
126
  static XsdCm* xsd_capture_any(LeptrisElement any_child);
127
127
  static char* xsd_capture_unit_tns(LeptrisElement e);
128
+ static void xsd_resolve_qname(LeptrisElement e, const char* qname,
129
+ char* uri, size_t urisz, char* local,
130
+ size_t localsz);
128
131
  static char* xsd_capture_any_attr_ns(LeptrisElement container);
129
132
  static char* xsd_capture_any_attr_ns_deep(
130
133
  struct leptris_xsd_schema* s, LeptrisElement container, int depth);
@@ -272,11 +275,57 @@ static XsdCm* xsd_cm_parse(struct leptris_xsd_schema* s,
272
275
  } else if (strcmp(local, "element") == 0) {
273
276
  cm = xsd_cm_new(XSD_CM_ELEMENT);
274
277
  if (cm) {
275
- const char* nm =
276
- leptris_element_attribute(e, "name");
277
- if (!nm)
278
- nm = xsd_local_name(
279
- leptris_element_attribute(e, "ref"));
278
+ const char* ref_raw =
279
+ leptris_element_attribute(e, "ref");
280
+ const char* nm = NULL;
281
+ if (ref_raw) {
282
+ /* elemZ020: record the particle's namespace — a
283
+ * ref binds in the REFERENCED DECLARATION's ns
284
+ * (same-tns ref → tns, cross-ns → the foreign
285
+ * ns). The old capture kept the local name only,
286
+ * so the NFA and the typing DFS matched by name
287
+ * alone. */
288
+ nm = xsd_local_name(ref_raw);
289
+ char ruri[512], rlocal[256];
290
+ xsd_resolve_qname(e, ref_raw, ruri, sizeof(ruri),
291
+ rlocal, sizeof(rlocal));
292
+ if (ruri[0])
293
+ cm->ns = xsd_strdup(ruri);
294
+ else
295
+ cm->ns = xsd_capture_unit_tns(e);
296
+ } else {
297
+ nm = leptris_element_attribute(e, "name");
298
+ /* name-form: @form wins; otherwise the unit's
299
+ * elementFormDefault decides */
300
+ const char* form =
301
+ leptris_element_attribute(e, "form");
302
+ const char* efd = NULL;
303
+ if (!form) {
304
+ for (LeptrisElement up =
305
+ leptris_element_parent(e);
306
+ up; up = leptris_element_parent(up)) {
307
+ const char* ul = NULL;
308
+ leptris_element_expanded_name(
309
+ up, &ul, NULL, NULL);
310
+ if (ul && strcmp(ul, "schema") == 0) {
311
+ efd = leptris_element_attribute(
312
+ up, "elementFormDefault");
313
+ break;
314
+ }
315
+ }
316
+ }
317
+ int qualified =
318
+ form ? strcmp(form, "qualified") == 0
319
+ : (efd &&
320
+ strcmp(efd, "qualified") == 0);
321
+ if (qualified) {
322
+ char* tns = xsd_capture_unit_tns(e);
323
+ if (tns && tns[0])
324
+ cm->ns = tns;
325
+ else
326
+ free(tns);
327
+ }
328
+ }
280
329
  cm->name = xsd_strdup(nm);
281
330
  const char* pty =
282
331
  leptris_element_attribute(e, "type");
@@ -3379,14 +3428,19 @@ static const XsdElementDecl* xsd_find_element_decl(
3379
3428
  return NULL;
3380
3429
  }
3381
3430
 
3382
- int xsd_is_substitute(struct leptris_xsd_schema* s,
3383
- const char* name, const char* head) {
3431
+ const XsdElementDecl* xsd_substitute_member(
3432
+ struct leptris_xsd_schema* s, const char* name, const char* head) {
3384
3433
  const XsdElementDecl* d = xsd_find_element_decl(s, name);
3385
3434
  for (int hops = 0; d && d->sub_head && hops < 16; hops++) {
3386
- if (strcmp(d->sub_head, head) == 0) return 1;
3435
+ if (strcmp(d->sub_head, head) == 0) return d;
3387
3436
  d = xsd_find_element_decl(s, d->sub_head);
3388
3437
  }
3389
- return 0;
3438
+ return NULL;
3439
+ }
3440
+
3441
+ int xsd_is_substitute(struct leptris_xsd_schema* s,
3442
+ const char* name, const char* head) {
3443
+ return xsd_substitute_member(s, name, head) != NULL;
3390
3444
  }
3391
3445
 
3392
3446
  int xsd_schema_version_11(struct leptris_xsd_schema* s) {
@@ -15,6 +15,13 @@
15
15
 
16
16
  #include "xsd_internal.h"
17
17
 
18
+ /* validate.c-facing global lookup (compile.c): an unqualified
19
+ * particle may leniently admit a namespaced child only when no
20
+ * global declaration in the child's namespace could type it
21
+ * (elemZ020 vs the OOXML-style wp.xsd corpus). */
22
+ extern const struct xsd_element_decl* xsd_find_element_child_ns(
23
+ struct leptris_xsd_schema* s, const char* name, const char* uri);
24
+
18
25
  typedef struct {
19
26
  int from;
20
27
  int symbol; /* -1 = epsilon; else a particle transition */
@@ -345,8 +352,11 @@ static int all_root_valid(XsdCm* all, const char* target_ns,
345
352
  size_t hits = 0;
346
353
  for (size_t i = 0; i < count; i++) {
347
354
  const char* uri = ns_uris ? ns_uris[i] : NULL;
348
- if (p->name && strcmp(p->name, names[i]) == 0 &&
349
- (!p->ns || (uri && strcmp(uri, p->ns) == 0)))
355
+ int child_qualified = uri && uri[0];
356
+ int ns_ok = p->ns ? (!child_qualified ||
357
+ strcmp(uri, p->ns) == 0)
358
+ : !child_qualified;
359
+ if (p->name && strcmp(p->name, names[i]) == 0 && ns_ok)
350
360
  hits++;
351
361
  }
352
362
  if ((long)hits < p->min) return 0;
@@ -357,8 +367,11 @@ static int all_root_valid(XsdCm* all, const char* target_ns,
357
367
  int matched = 0;
358
368
  const char* uri = ns_uris ? ns_uris[i] : NULL;
359
369
  for (XsdCm* p = all->first_child; p && !matched; p = p->next) {
360
- if (p->name && strcmp(p->name, names[i]) == 0 &&
361
- (!p->ns || (uri && strcmp(uri, p->ns) == 0)))
370
+ int child_qualified2 = uri && uri[0];
371
+ int ns_ok2 = p->ns ? (!child_qualified2 ||
372
+ strcmp(uri, p->ns) == 0)
373
+ : !child_qualified2;
374
+ if (p->name && strcmp(p->name, names[i]) == 0 && ns_ok2)
362
375
  matched = 1;
363
376
  }
364
377
  if (!matched) return 0;
@@ -408,12 +421,32 @@ int xsd_content_valid(struct leptris_xsd_schema* s, XsdCm* model,
408
421
  continue;
409
422
  XsdCm* p = tr->particle;
410
423
  if (p->kind == XSD_CM_ELEMENT) {
411
- int named = (strcmp(p->name, names[c]) == 0) ||
412
- (n.s && xsd_is_substitute(
413
- n.s, names[c], p->name));
414
- if (named &&
415
- (!p->ns || (uri && strcmp(uri, p->ns) == 0)))
416
- ss_add(&next, tr->to);
424
+ /* elemZ020: the ns gate is asymmetric — a
425
+ * qualified particle matches its own ns but
426
+ * leniently admits a no-ns child (the pinned
427
+ * #1871 corpus posture); an unqualified
428
+ * particle (ns NULL) is strict: no-ns children
429
+ * only. A substitute hit rides the MEMBER's
430
+ * own ns (cross-ns groups, #1881 sets). */
431
+ const char* pns = p->ns;
432
+ int named = (strcmp(p->name, names[c]) == 0);
433
+ if (!named && n.s) {
434
+ const XsdElementDecl* m =
435
+ xsd_substitute_member(n.s, names[c],
436
+ p->name);
437
+ if (m) {
438
+ named = 1;
439
+ if (m->ns) pns = m->ns;
440
+ }
441
+ }
442
+ int child_ns = uri && uri[0];
443
+ int pns_ok =
444
+ pns ? (!child_ns ||
445
+ (uri && strcmp(uri, pns) == 0))
446
+ : (!child_ns ||
447
+ (n.s && !xsd_find_element_child_ns(
448
+ n.s, names[c], uri)));
449
+ if (named && pns_ok) ss_add(&next, tr->to);
417
450
  } else if (p->kind == XSD_CM_ANY) {
418
451
  /* #1735: ##targetNamespace/##other are relative
419
452
  * to the DECLARING unit's tns */
@@ -599,6 +599,14 @@ static void validate_children(struct xsd_validator* v,
599
599
  if (wpc == 2) continue;
600
600
  const char* ptype = NULL;
601
601
  const char* pfill = NULL;
602
+ /* elemZ020 lenient fallback: an unqualified particle may
603
+ * still type a namespaced child when NO global declaration
604
+ * in the child's namespace could (the OOXML-style wp.xsd
605
+ * corpus: no elementFormDefault, no globals). The strict
606
+ * pass remembers the candidate; the global lookup below
607
+ * decides whether it is needed. */
608
+ const char* ltype = NULL;
609
+ const char* lfill = NULL;
602
610
  if (model) {
603
611
  XsdCm* stack[64];
604
612
  int sp = 0;
@@ -606,15 +614,34 @@ static void validate_children(struct xsd_validator* v,
606
614
  while (sp > 0 && ptype == NULL) {
607
615
  XsdCm* p = stack[--sp];
608
616
  for (; p; p = p->next) {
617
+ int child_ns = cu && cu[0];
618
+ /* asymmetric ns gate (elemZ020 + the pinned
619
+ * #1871 lenient posture): qualified particles
620
+ * match their own ns and leniently admit no-ns
621
+ * children; unqualified particles are strict —
622
+ * no-ns children only, with the lenient
623
+ * fallback when nothing else can type it. */
624
+ int pns_ok =
625
+ p->ns ? (!child_ns ||
626
+ strcmp(p->ns, cu) == 0)
627
+ : !child_ns;
609
628
  if (p->kind == XSD_CM_ELEMENT && p->name &&
610
629
  strcmp(p->name, cl) == 0 && p->type) {
611
- ptype = p->type;
612
- /* leptris-rs#35 (isDefault005): the
613
- * particle's fixed/default value satisfies
614
- * EMPTY content (§3.12.2). */
615
- pfill = p->fixed_value ? p->fixed_value
616
- : p->default_value;
617
- break;
630
+ if (pns_ok) {
631
+ ptype = p->type;
632
+ /* leptris-rs#35 (isDefault005): the
633
+ * particle's fixed/default value
634
+ * satisfies EMPTY content (§3.12.2). */
635
+ pfill = p->fixed_value ? p->fixed_value
636
+ : p->default_value;
637
+ break;
638
+ }
639
+ if (!ltype) {
640
+ ltype = p->type;
641
+ lfill = p->fixed_value
642
+ ? p->fixed_value
643
+ : p->default_value;
644
+ }
618
645
  }
619
646
  if (p->kind == XSD_CM_GROUP_REF) {
620
647
  XsdGroupDef* g = xsd_find_group(s, p->name);
@@ -650,7 +677,15 @@ static void validate_children(struct xsd_validator* v,
650
677
  } else {
651
678
  const XsdElementDecl* cd =
652
679
  xsd_find_element_child_ns(s, cl, cu);
653
- if (cd) validate_element_decl(v, s, ce, 0, cd);
680
+ if (cd)
681
+ validate_element_decl(v, s, ce, 0, cd);
682
+ else if (ltype) {
683
+ /* nothing global claims the namespaced child —
684
+ * the unqualified particle's type governs
685
+ * (wp.xsd corpus posture) */
686
+ validate_local(v, s, ce, cl, ltype, lfill,
687
+ ct ? ct->ns : NULL);
688
+ }
654
689
  }
655
690
  /* wildcard-admitted children without a declaration pass:
656
691
  * strict and lax alike admit undeclared names (the pinned
@@ -211,6 +211,14 @@ typedef struct xsd_element_decl {
211
211
  int xsd_is_substitute(struct leptris_xsd_schema* s,
212
212
  const char* name, const char* head);
213
213
 
214
+ /* elemZ020: the MEMBER declaration behind a substitute hit — the
215
+ * member carries its OWN namespace (a member in ns g rides a head
216
+ * particle written for ns f, XSD 1.1 cross-ns groups + schema-set
217
+ * compilation), so ns gates must compare against the member's ns,
218
+ * never the head particle's. */
219
+ const XsdElementDecl* xsd_substitute_member(
220
+ struct leptris_xsd_schema* s, const char* name, const char* head);
221
+
214
222
  typedef struct xsd_attr_decl {
215
223
  char* name; /* attribute local name */
216
224
  char* type; /* builtin ref or local simpleType name (NULL=anySimple) */
@@ -0,0 +1,8 @@
1
+ <foo:root
2
+ xmlns:foo="foo"
3
+ >
4
+ <foo:foo>true</foo:foo>
5
+ <foo>123</foo >
6
+ <foo:foo>true</foo:foo>
7
+ <foo>123</foo >
8
+ </foo:root>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0"?>
2
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3
+ elementFormDefault="qualified"
4
+ targetNamespace="foo"
5
+ xmlns="foo"
6
+ >
7
+ <xsd:element name="e1" type="xsd:boolean" />
8
+ <xsd:element name="foo" substitutionGroup="e1" type="xsd:boolean" />
9
+
10
+ <xsd:element name="root" type="B" />
11
+
12
+ <xsd:complexType name="B">
13
+ <xsd:choice maxOccurs="1000">
14
+ <xsd:element ref="e1" />
15
+ <xsd:element name="foo" type="xsd:int" form="unqualified"/>
16
+ </xsd:choice>
17
+ </xsd:complexType>
18
+
19
+ </xsd:schema>
@@ -123,3 +123,57 @@ TEST(XsdUnionFixed, NonMemberValueStillRejects) {
123
123
  leptris_document_free(d);
124
124
  leptris_xsd_free(s);
125
125
  }
126
+
127
+ // ---- leptris-rs#46 (elemZ020): particle typing is ns-aware ------
128
+ // Real W3C fixture msData/element/elemZ020: a form="unqualified"
129
+ // local particle (xs:int) and a same-name substitution member
130
+ // (xs:boolean) discriminate by namespace. The namespaced child
131
+ // types through its member declaration; the no-ns child types
132
+ // through the unqualified particle.
133
+
134
+ TEST(XsdSubstNs, ElemZ020RealFixtureValidates) {
135
+ EXPECT_EQ(validate_case(cases_path("elemZ020-subst-ns/elemZ020.xsd"),
136
+ cases_path("elemZ020-subst-ns/elemZ020.xml")),
137
+ 1);
138
+ }
139
+
140
+ TEST(XsdSubstNs, NamespacedChildTypedByMemberNotUnqualifiedParticle) {
141
+ LeptrisStatus st = LEPTRIS_OK;
142
+ LeptrisXsdSchema s = leptris_xsd_compile_file(
143
+ cases_path("elemZ020-subst-ns/elemZ020.xsd").c_str(), &st);
144
+ ASSERT_NE(s, (LeptrisXsdSchema)0);
145
+ /* "true" is boolean (the member), not int (the unqualified
146
+ * particle) — the ns-strict member binding types it. */
147
+ const char q[] = "<?xml version=\"1.0\"?>\n"
148
+ "<foo:root xmlns:foo=\"foo\">"
149
+ "<foo:foo>true</foo:foo></foo:root>";
150
+ LeptrisDocument d = leptris_parse_string(q, strlen(q), &st);
151
+ ASSERT_NE(d, nullptr);
152
+ EXPECT_EQ(leptris_xsd_validate(s, d), 1);
153
+ leptris_document_free(d);
154
+ /* int lexical in the member's slot still rejects */
155
+ const char bad[] = "<?xml version=\"1.0\"?>\n"
156
+ "<foo:root xmlns:foo=\"foo\">"
157
+ "<foo:foo>123</foo:foo></foo:root>";
158
+ d = leptris_parse_string(bad, strlen(bad), &st);
159
+ ASSERT_NE(d, nullptr);
160
+ EXPECT_EQ(leptris_xsd_validate(s, d), 0);
161
+ leptris_document_free(d);
162
+ /* the no-ns child rides the form="unqualified" particle */
163
+ const char u[] = "<?xml version=\"1.0\"?>\n"
164
+ "<foo:root xmlns:foo=\"foo\">"
165
+ "<foo>123</foo></foo:root>";
166
+ d = leptris_parse_string(u, strlen(u), &st);
167
+ ASSERT_NE(d, nullptr);
168
+ EXPECT_EQ(leptris_xsd_validate(s, d), 1);
169
+ leptris_document_free(d);
170
+ /* boolean lexical in the unqualified particle's slot rejects */
171
+ const char bad2[] = "<?xml version=\"1.0\"?>\n"
172
+ "<foo:root xmlns:foo=\"foo\">"
173
+ "<foo>true</foo></foo:root>";
174
+ d = leptris_parse_string(bad2, strlen(bad2), &st);
175
+ ASSERT_NE(d, nullptr);
176
+ EXPECT_EQ(leptris_xsd_validate(s, d), 0);
177
+ leptris_document_free(d);
178
+ leptris_xsd_free(s);
179
+ }
@@ -1461,6 +1461,53 @@ TEST(XsdDatatypes, TemporalEnumerationComparesByValue) {
1461
1461
  leptris_xsd_free(s);
1462
1462
  }
1463
1463
 
1464
+ // W3C XSD suite msData/element/elemZ020: particle typing is
1465
+ // NAMESPACE-aware. A form="unqualified" local particle types only
1466
+ // no-namespace children; a namespaced child of the same local name
1467
+ // types through its own (substitution-member) declaration. The
1468
+ // first-name-match DFS bound BOTH to whichever same-name particle
1469
+ // it saw first (elemZ020: 'true' failed xsd:int, '123' failed
1470
+ // xsd:boolean).
1471
+ TEST(XsdValidate, ParticleTypingIsNamespaceAware) {
1472
+ const char* sch =
1473
+ "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\""
1474
+ " elementFormDefault=\"qualified\" targetNamespace=\"foo\""
1475
+ " xmlns=\"foo\">"
1476
+ "<xsd:element name=\"e1\" type=\"xsd:boolean\"/>"
1477
+ "<xsd:element name=\"foo\" substitutionGroup=\"e1\""
1478
+ " type=\"xsd:boolean\"/>"
1479
+ "<xsd:element name=\"root\" type=\"B\"/>"
1480
+ "<xsd:complexType name=\"B\">"
1481
+ "<xsd:choice maxOccurs=\"1000\">"
1482
+ "<xsd:element ref=\"e1\"/>"
1483
+ "<xsd:element name=\"foo\" type=\"xsd:int\""
1484
+ " form=\"unqualified\"/>"
1485
+ "</xsd:choice></xsd:complexType></xsd:schema>";
1486
+ /* namespaced member: typed by its own boolean declaration */
1487
+ EXPECT_EQ(validate_doc(sch,
1488
+ "<?xml version=\"1.0\"?>\n"
1489
+ "<foo:root xmlns:foo=\"foo\"><foo:foo>true</foo:foo>"
1490
+ "</foo:root>"), 1);
1491
+ /* no-namespace child: typed by the unqualified local particle */
1492
+ EXPECT_EQ(validate_doc(sch,
1493
+ "<?xml version=\"1.0\"?>\n"
1494
+ "<foo:root xmlns:foo=\"foo\"><foo>123</foo></foo:root>"), 1);
1495
+ /* the full suite doc: both shapes interleaved [valid] */
1496
+ EXPECT_EQ(validate_doc(sch,
1497
+ "<?xml version=\"1.0\"?>\n"
1498
+ "<foo:root xmlns:foo=\"foo\"><foo:foo>true</foo:foo>"
1499
+ "<foo>123</foo><foo:foo>true</foo:foo><foo>123</foo>"
1500
+ "</foo:root>"), 1);
1501
+ /* wrong content for each binding still rejects */
1502
+ EXPECT_EQ(validate_doc(sch,
1503
+ "<?xml version=\"1.0\"?>\n"
1504
+ "<foo:root xmlns:foo=\"foo\"><foo:foo>123</foo:foo>"
1505
+ "</foo:root>"), 0);
1506
+ EXPECT_EQ(validate_doc(sch,
1507
+ "<?xml version=\"1.0\"?>\n"
1508
+ "<foo:root xmlns:foo=\"foo\"><foo>true</foo></foo:root>"), 0);
1509
+ }
1510
+
1464
1511
  TEST(XsdValidate, ContentModelViolationReports) {
1465
1512
  EXPECT_EQ(validate_doc(k_v_schema,
1466
1513
  "<rows version=\"1\">"
@@ -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.408",
4
+ "version": "1.9.409",
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.408.0
4
+ version: 1.9.409.0
5
5
  platform: ppc64le-linux
6
6
  authors:
7
7
  - Ribose Inc.
@@ -1360,6 +1360,8 @@ files:
1360
1360
  - vendor-src/libleptris/test/xsd/libxml2-cases/dur_0.xsd
1361
1361
  - vendor-src/libleptris/test/xsd/libxml2-cases/elem0_0.xml
1362
1362
  - vendor-src/libleptris/test/xsd/libxml2-cases/elem0_0.xsd
1363
+ - vendor-src/libleptris/test/xsd/libxml2-cases/elemZ020-subst-ns/elemZ020.xml
1364
+ - vendor-src/libleptris/test/xsd/libxml2-cases/elemZ020-subst-ns/elemZ020.xsd
1363
1365
  - vendor-src/libleptris/test/xsd/libxml2-cases/element-err_0.xml
1364
1366
  - vendor-src/libleptris/test/xsd/libxml2-cases/element-err_0.xsd
1365
1367
  - vendor-src/libleptris/test/xsd/libxml2-cases/element-minmax-err_0.xml