/// Identifies which decomposed XSD instance-validation rule a finding belongs /// to. XSD content validation and identity-constraint validation are each one /// interdependent recursive walk (the #101 decision: a child's effective type /// is resolved from its parent's content model and position, then rewritten by /// `xsi:type` and derivation controls mid-walk, so the constraint categories /// cannot be split into independently-invoked walks without either duplicating /// the recursion or changing semantics). Tagging every finding at its origin, /// instead, lets the walk run once while still exposing each constraint /// category as its own named, independently removable, independently testable /// ``PureXML/Validation/Validation`` value: see ``XSDFindingsCache``. enum XSDRuleToken: String, CaseIterable, Sendable { // MARK: Content validity case nilAttributeRequiresNillable case nilElementMustBeEmpty case nilElementNoFixedConstraint case fixedElementNoChildren case fixedElementValueMatches case emptyContentForbidsChildren case simpleContentForbidsChildren case simpleContentTypeValid case textForbidden case wildcardElementUndeclared case simpleTypeDisallowedAttribute case simpleTypeForbidsChildren case simpleTypeValueValid case typeReferenceResolves case contentModelStructure case attributeTypeValid case attributeFixedMatches case attributeRequiredPresent case attributeSingleID case attributeDeclaredOrPermitted case wildcardAttributeUndeclared case wildcardAttributeTypeValid case wildcardAttributeFixedMatches case xsiTypeSubstitutionValid case xsiTypeOverrideResolves case idIdrefConsistent // MARK: Identity constraints case identityConstraintXPathsValid case identityKeyFieldPresent case identityValueUnique case identityKeyrefResolves case identityFieldCardinality case identityFieldMustBeSimple }