PureXML/Sources
Mihaela Mihaljevic 7efc64479b fix(schema): a ref resolving to the XSD namespace is undeclared
isUndeclaredReferenceRef fell through to a lenient accept when a ref or
substitutionGroup resolved to the XSD namespace but the schema did not target
it. The XSD namespace declares no referenceable user component (element,
group, attribute, attribute group), so such a reference is undeclared, the
asymmetry isUndeclaredReferenceType already handled for type/base.

This is reached when an unprefixed reference picks up a default xmlns of the
XSD namespace, so it is not in the target namespace where the schema's own
components live: xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="foo"
with <element ref="root"/> resolves to {XSD}root, not {foo}root (XSTS
xsd013/xsd014). A schema that itself targets the XSD namespace is the
inTargetNamespace case, and a genuinely loaded XSD-namespace document is the
foreignPools case before this branch, so both are unaffected.

Verified against the full W3C XSTS 2006-11-06 suite: invalid-schemas-accepted
29 -> 27, valid-schemas-rejected held at 0, no other bucket moved. Adds
reference tests for both reject cases and a qualified-ref guard.
2026-06-21 22:57:20 +02:00
..
Canonical feat(canonical): C14N 1.0 spec-example vectors, three conformance fixes 2026-06-10 08:51:47 +02:00
Catalog feat(catalog): honor group-level prefer override 2026-06-08 18:05:03 +02:00
Emitting feat(emitting): output encoding for UTF and single-byte families 2026-06-09 09:32:39 +02:00
HTML feat(html): HTML 4 void elements and the ampersand-brace convention 2026-06-10 16:41:54 +02:00
Model feat(schema): locate compile diagnostics with validation coding paths (#169) 2026-06-16 10:26:11 +02:00
Parsing docs: align stale figures with code and the enforced XSTS gate 2026-06-19 23:32:04 +02:00
Pattern feat(pattern): streaming xmlPattern matching 2026-06-08 05:49:13 +02:00
Regex fix(regex): reject a malformed \p{...} property name in a pattern facet (#145) 2026-06-17 14:53:32 +02:00
Schema fix(schema): a ref resolving to the XSD namespace is undeclared 2026-06-21 22:57:20 +02:00
Stream chore: scaffold PureXML pure-Swift XML package 2026-06-07 23:20:20 +02:00
Validation feat(schema): locate compile diagnostics with validation coding paths (#169) 2026-06-16 10:26:11 +02:00
XInclude feat(xinclude): range inclusion via XPointer range model (#87) 2026-06-09 04:19:38 +02:00
XPath fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XPointer feat(xpointer): range(), range-to(), and string-range() schemes (#88) 2026-06-09 04:16:23 +02:00
XSLT fix(schema,regex): bound NFA state explosion and class-subtraction crash; land XSTS baseline 2026-06-13 18:04:25 +02:00
API.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
Lint.swift feat(editor): unified lint surface merging parse and validation diagnostics 2026-06-08 13:18:29 +02:00
PureXML.swift feat(html): lenient HTML parser and serializer 2026-06-08 07:12:42 +02:00
QuickFix.swift feat(editor): structured quick-fixes from completions 2026-06-08 13:35:33 +02:00