PureXML/Sources/Schema
Mihaela Mihaljevic cbeea0e3c2 feat(schema): reject unresolvable references at compile time
Every QName a schema names must resolve to a declared component or a built-in:
type/base/itemType/memberTypes to a type, element/attribute/group/attributeGroup
ref to the matching global component, and element substitutionGroup to a global
element. An undeclared reference was previously accepted at compile time and only
surfaced lazily during instance validation, if at all.

References are matched by local name, with the value trimmed (a QName attribute
is whiteSpace=collapse). The whole check is skipped when the document declares an
import/include/redefine, since the default compile does not load externals and
the pools would be incomplete; that guard is gated on the XSD namespace so a
foreign element named "import" does not trip it.

XSTS: invalid schemas accepted 1092 to 1051 (-41); valid schemas rejected held
at 72 (an interim version regressed one valid schema on a whitespace-padded
base="  xs:string ", fixed by trimming); instance buckets unchanged.
2026-06-14 00:17:29 +02:00
..
BuiltinType.swift
ComplexType.swift
ComplexValidator.swift
ComplexValidatorDerivation.swift
ComplexValidatorHelpers.swift
ComplexValidatorIDs.swift
ComplexValidatorStreaming.swift
ComplexValidatorXSIType.swift
ContentMatcher.swift
DateTimeParser.swift
DateTimeValue.swift
DecimalValue.swift
DerivationMethod.swift
DurationValue.swift
IdentityConstraint.swift
IdentityValidator.swift
IDTracker.swift
Lexical.swift
ParticleRestriction.swift
Primitive.swift
RelaxNGCompactHelpers.swift
RelaxNGCompactLexer.swift
RelaxNGCompactParser.swift
RelaxNGContentType.swift
RelaxNGDerivative.swift
RelaxNGDiagnostics.swift
RelaxNGFacets.swift
RelaxNGGrammarCheck.swift
RelaxNGGrammarCheckSections.swift
RelaxNGNameClasses.swift
RelaxNGNode.swift
RelaxNGParser.swift
RelaxNGParserIncludes.swift
RelaxNGPattern.swift
RelaxNGRestrictionChecker.swift
RelaxNGRestrictionOverlap.swift
RelaxNGRestrictionPaths.swift
RelaxNGRestrictions.swift
RelaxNGSchema.swift
SchemaDocument.swift
SchemaIDAttribute.swift
SchemaReferences.swift feat(schema): reject unresolvable references at compile time 2026-06-14 00:17:29 +02:00
SchemaStructure.swift feat(schema): reject unresolvable references at compile time 2026-06-14 00:17:29 +02:00
SimpleType.swift
StreamingXSDValidator.swift
TypeDerivation.swift
XSDAttributeParser.swift
XSDCompletions.swift
XSDComplexContent.swift
XSDContext.swift
XSDDerivation.swift
XSDParser.swift feat(schema): reject unresolvable references at compile time 2026-06-14 00:17:29 +02:00
XSDSchemaValidations.swift
XSDSimpleParser.swift
XSDValidations.swift
XSDWildcardParser.swift