An xs:all group's own minOccurs="0" makes the GROUP optional (it occurs zero or one times), not each member optional. The parser forced every member's minOccurs to 0 whenever the all-group was optional, so a non-empty but incomplete optional all-group (a required member missing) was wrongly accepted, and a complexContent restriction that relaxed such a required member also slipped past the particle-restriction check (the zeroed minOccurs made it look already optional). Members now keep their declared occurrence; the absent-group case is handled at validation time by skipping the required-member check only when the all-group contributes no children at all. Applied identically on the tree and streaming paths (both call allStructureErrors). A required all-group is unchanged. Catches mgZ001 (instance) and particlesK006 (schema). XSTS invalid- instances-accepted 21 to 20 and invalid-schemas-accepted 18 to 17, both valid- rejected buckets held at 0. |
||
|---|---|---|
| .. | ||
| Canonical | ||
| Catalog | ||
| Emitting | ||
| HTML | ||
| Model | ||
| Parsing | ||
| Pattern | ||
| Regex | ||
| Schema | ||
| Stream | ||
| Validation | ||
| XInclude | ||
| XPath | ||
| XPointer | ||
| XSLT | ||
| API.swift | ||
| Lint.swift | ||
| PureXML.swift | ||
| QuickFix.swift | ||