PureXML/docs
Mihaela Mihaljevic 828ed195f0 fix(schema): resolve element-ref namespaces by prefix binding, not target namespace
An `<xs:element ref="p:foo">` had its prefix stripped and the element assumed to
be in the schema's target namespace. That mis-qualified every reference to an
imported element: a restriction of an `##other` wildcard by such a reference was
rejected (the element looked like the target namespace, which `##other` forbids),
and the same mis-qualification rejected valid instances whose elements were
correctly in the imported namespace.

The reference's QName is now resolved by standard XML namespace rules against the
schema root's xmlns bindings: a bound prefix gives its namespace (an imported
element lands in the imported namespace), an unprefixed name the default
namespace, or no namespace when none is declared. Substitution-group members
stay in the target namespace (this schema's own globals).

The content model is shared between schema-restriction checks and instance
validation, so both improve. XSTS: valid schemas rejected 32 to 4, invalid
schemas accepted 526 to 520, valid instances rejected 214 to 180, invalid
instances accepted held at 160.

Disclosed limitations: a prefix re-bound on an inner element is not honored,
cross-namespace substitution-group members are not modeled, and a dangling
reference is not yet flagged.
2026-06-14 17:50:26 +02:00
..
rules ci: split workflows for truthful badges and attribution gates 2026-06-08 04:37:32 +02:00
benchmarks.md feat(xpath,parsing): public streaming surface, linear document-order at scale 2026-06-11 06:06:31 +02:00
production-readiness.md docs: production-readiness standard, read every conformance iteration 2026-06-14 16:28:03 +02:00
schema-validity-burndown.md fix(schema): resolve element-ref namespaces by prefix binding, not target namespace 2026-06-14 17:50:26 +02:00
xsts-deviations.md feat(schema): resolve keyref refer to a declared key or unique 2026-06-14 08:04:34 +02:00