PureXML/Sources/Schema
Mihaela Mihaljevic 90ae16cba1 feat(schema): enforce Unique Particle Attribution (cos-nonambig)
Reject ambiguous content models at compile time via a Glushkov position
automaton over a literal, QName-resolved view of the raw schema tree, built
just for this rule and independent of the instance-validation content model.

The literal view resolves a ref's QName through the schema's prefix bindings
(not the blanket target namespace) and does not expand substitution groups,
removing the two false-overlap sources a check over the compiled model
produced. Determinism is per particle: a particle competing with a repetition
of itself is never a violation, so a fixed count {n,n} unrolls into copies in
sequence while a true range or unbounded repeat uses a self-loop, and only two
distinct source particles with overlapping labels conflict. The overlap test
is QName-only, an under-rejection that can never over-reject.

A position cap bounds pathological nesting (skipping the check, never
over-rejecting). The element-declarations-consistent test loses its
incidentally-ambiguous (a?, a) case in favor of a deterministic (a, b, a).

XSTS: invalid schemas accepted 884 to 864, valid schemas rejected held at 72,
instance buckets unchanged.
2026-06-14 09:35:33 +02:00
..
BuiltinType.swift feat(schema): built-in xsi:type resolution gated by substitution validity 2026-06-13 21:21:35 +02:00
ComplexType.swift fix(schema): honor empty-element default/fixed values and replace enumeration on restriction 2026-06-13 18:04:25 +02:00
ComplexValidator.swift feat(schema): built-in xsi:type resolution gated by substitution validity 2026-06-13 21:21:35 +02:00
ComplexValidatorDerivation.swift fix(schema): enforce element-level block against xsi:type substitution 2026-06-13 18:04:25 +02:00
ComplexValidatorHelpers.swift feat(schema): built-in xsi:type resolution gated by substitution validity 2026-06-13 21:21:35 +02:00
ComplexValidatorIDs.swift fix(schema): enforce document-scoped xs:ID uniqueness and xs:IDREF resolution 2026-06-13 19:17:34 +02:00
ComplexValidatorStreaming.swift
ComplexValidatorXSIType.swift feat(schema): built-in xsi:type resolution gated by substitution validity 2026-06-13 21:21:35 +02:00
ContentMatcher.swift fix(schema,regex): bound NFA state explosion and class-subtraction crash; land XSTS baseline 2026-06-13 18:04:25 +02:00
ContentModelDeterminism.swift feat(schema): enforce Unique Particle Attribution (cos-nonambig) 2026-06-14 09:35:33 +02:00
DateTimeParser.swift feat(schema): validate value-bound facet definitions; accept gMonth --MM-- 2026-06-13 22:10:57 +02:00
DateTimeValue.swift
DecimalValue.swift
DerivationMethod.swift
DurationValue.swift style(schema): drop vestigial day clamp in DurationValue.instant 2026-06-13 18:04:25 +02:00
IdentityConstraint.swift
IdentityValidator.swift feat(schema): built-in xsi:type resolution gated by substitution validity 2026-06-13 21:21:35 +02:00
IDTracker.swift fix(schema): enforce document-scoped xs:ID uniqueness and xs:IDREF resolution 2026-06-13 19:17:34 +02:00
Lexical.swift
ParticleRestriction.swift
Primitive.swift
RelaxNGCompactHelpers.swift
RelaxNGCompactLexer.swift
RelaxNGCompactParser.swift
RelaxNGContentType.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGDerivative.swift
RelaxNGDiagnostics.swift
RelaxNGFacets.swift
RelaxNGGrammarCheck.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGGrammarCheckSections.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGNameClasses.swift
RelaxNGNode.swift
RelaxNGParser.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGParserIncludes.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGPattern.swift
RelaxNGRestrictionChecker.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGRestrictionOverlap.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGRestrictionPaths.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGRestrictions.swift feat(relaxng): schema-correctness validation, spec suite complete 2026-06-10 11:38:45 +02:00
RelaxNGSchema.swift
SchemaDocument.swift feat(schema): validate constraining-facet definitions at compile time 2026-06-13 21:50:51 +02:00
SchemaIDAttribute.swift feat(schema): validate the id attribute (xs:ID) at compile time 2026-06-13 22:29:29 +02:00
SchemaNameUniqueness.swift feat(schema): resolve keyref refer to a declared key or unique 2026-06-14 08:04:34 +02:00
SchemaReferences.swift feat(schema): resolve keyref refer to a declared key or unique 2026-06-14 08:04:34 +02:00
SchemaStructure.swift feat(schema): enforce Element Declarations Consistent (cos-element-consistent) 2026-06-14 01:47:43 +02:00
SimpleType.swift feat(schema): built-in xsi:type resolution gated by substitution validity 2026-06-13 21:21:35 +02:00
StreamingXSDValidator.swift
TypeDerivation.swift
XSDAttributeParser.swift fix(schema): resolve <xs:attribute ref> to global attribute declarations 2026-06-13 19:30:11 +02:00
XSDCompletions.swift
XSDComplexContent.swift
XSDContext.swift feat(schema): validate constraining-facet definitions at compile time 2026-06-13 21:50:51 +02:00
XSDDerivation.swift fix(schema): enforce block="substitution" on substitution-group heads 2026-06-13 18:31:07 +02:00
XSDParser.swift feat(schema): enforce Unique Particle Attribution (cos-nonambig) 2026-06-14 09:35:33 +02:00
XSDSchemaValidations.swift
XSDSimpleParser.swift feat(schema): validate pattern facet regular expressions at compile time 2026-06-13 23:52:11 +02:00
XSDValidations.swift fix(schema): enforce document-scoped xs:ID uniqueness and xs:IDREF resolution 2026-06-13 19:17:34 +02:00
XSDWildcardParser.swift