PureXML/Sources
Mihaela Mihaljevic d2f18a2685 feat(schema): substitution member type must derive from head (e-props-correct.4)
An element declaring substitutionGroup="head" whose own type is unrelated to
the head's type was accepted; XSD 1.0 e-props-correct.4 requires the member's
type be validly derived from the head's. The check runs after named types
resolve and reuses the restriction/extension + built-in-lattice derivation
oracle (an ur-type head admits any member).

It is conservative so it never rejects a valid member: it runs only for a
self-contained schema (no import/include/redefine, where the derivation table
is complete and single-namespace names are unambiguous), reads the member's
type from its own type attribute and the head's from the top-level element
declarations only (so a local element of the same name supplies neither), and
stands down when either type is a list or union (cos-st-derived-ok clauses
2.3/2.4 union-member derivation is not modelled).

The post-namedTypes consistency calls move into a postNamedTypeErrors
aggregator alongside consistencyErrors. XSTS: invalid schemas accepted
480 to 479, no other bucket raised.
2026-06-15 13:08:38 +02:00
..
Canonical
Catalog
Emitting
HTML
Model
Parsing
Pattern
Regex fix(regex): use the XSD definition of \w and \W 2026-06-13 18:31:07 +02:00
Schema feat(schema): substitution member type must derive from head (e-props-correct.4) 2026-06-15 13:08:38 +02:00
Stream
Validation
XInclude
XPath
XPointer
XSLT
API.swift
Lint.swift
PureXML.swift
QuickFix.swift