PureXML/docs
Mihaela Mihaljevic 6a7bf78903 fix(schema): literal RecurseAsIfGroup for a non-repeating base choice
An element restricting a base choice was always checked by the
effective-total-range approximation, which exists for one reason: the
literal section 3.9.6 pairing has no allowance for occurrence counts
accumulated across the choice's own repetitions and over-rejects
W3C-read-valid schemas (particlesZ001, whose manifest calls the rule
ambiguous). That ambiguity is impossible when the choice cannot repeat:
at {max occurs} = 1 every accepted child comes from one traversal of one
branch, so the literal rule governs. elementRestrictsChoice now applies
the literal pairing (the derived element, with its own occurrence range,
must validly restrict some non-pointless branch) when base maxOccurs is
1, and keeps the effective-range reading only for repeating choices.

Closes XSTS particlesHa161 (a derived a{0,1} is not a pointwise
NameAndTypeOK restriction of a required branch a{1,1}) and particlesM034
(a derived d1+ cannot map into the branch (d1*, d2+): the required d2 is
unmapped and not emptiable). The settled-valid neighbors that pin the
boundary from the other side all still pass: Ha160, M002, M003, M035,
and the Z001 shape, each now a regression test in
XSDParticleChoiceRestrictionTests. invalid-schemas-accepted 6 -> 4.

particlesIg004 is reclassified as spec-divergent (4 -> 3): section 3.3.2
maps block="#all" and the explicit substitution/extension/restriction
list to the SAME {disallowed substitutions} set, so NameAndTypeOK clause
5's superset requirement holds and the invalid expectation has no spec
path; it is jointly unsatisfiable with the settled Ig001/002/003 (equal
sets, valid) and Ig005 (#all covers the triple, valid).

The remaining three schema deviations are documented divergences, not
open bugs: Ik025/Ik027 (cos-st-derived-ok 2.2.4 reading) and schN12,
newly adjudicated in docs/xsts-deviations.md: its chameleon redefine
fails src-redefine 6.2.2 on NameAndTypeOK clause 1 (no-namespace locals
vs qualified locals), but 6.2.2 cannot be enforced uniformly because
mgO013's settled-VALID schema also violates it; any uniform enforcement
trades a false negative for a valid-schema-rejected false positive.

Also corrects the stale deviations-doc row that listed the already-closed
particlesIk011 and omitted schN12; the failures file is the authority.

Gates: full XSTS release suite green at 0/3/0/4 (valid buckets unchanged
at zero), libxml2 differential green at 244 pinned entries (Ha161 and
M034 newly pinned, both compile under libxml2), full local gate green.
2026-07-05 08:58:35 +02:00
..
design perf(schema): graph-structured-stack content matcher, killing the last 2^K content-model hang (#364) 2026-06-28 05:07:37 +02:00
plans fix(schema): a non-nillable element must carry no xsi:nil at all (cvc-elt.3.1) 2026-06-20 03:22:05 +02:00
benchmarks.md perf(schema): make xsd identity-constraint validation linear (#312) 2026-06-26 02:45:17 +02:00
engineering.md chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
mermaid.md chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
onboarding-antigravity.md chore(test): add scripts/fetch-xsts.sh to obtain the XSTS corpus (#321) 2026-06-26 08:59:07 +02:00
production-readiness.md docs: production-readiness standard, read every conformance iteration 2026-06-14 16:28:03 +02:00
release-hurdles.md fix(schema): attribute-wildcard union/intersection per Errata E1-10 (#251) 2026-06-23 04:56:17 +02:00
research-first.md chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
roadmap.md fix(schema): literal RecurseAsIfGroup for a non-repeating base choice 2026-07-05 08:58:35 +02:00
rules-swift-audit.md chore(release): stamp 0.4.8 from main and repoint to codeberg.org/Mihaela 2026-07-05 05:31:16 +02:00
rules-swift-corpus.sha256 chore(rules): pin rules-swift corpus, add gates and CI; drop redundant docs/rules mirror 2026-06-30 14:02:40 +02:00
schema-validity-burndown.md fix(schema): carry global ref metadata into restrictions 2026-06-19 09:03:49 +02:00
validation-coverage-registry.txt perf(model): make the value Node tree type depth-safe (#344) 2026-06-26 17:05:42 +02:00
validation-field-registry.txt feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
xsts-deviations.md fix(schema): literal RecurseAsIfGroup for a non-repeating base choice 2026-07-05 08:58:35 +02:00