PureXML/Sources/Schema
Mihaela Mihaljevic 0f90b3a4d3 fix(schema): generalize redefine self-reference to attributeGroups + bound the walk; invalid-schemas-accepted 75 to 74 (#161)
Extends the redefine self-reference rule (redefineSelfReferenceErrors, moved to
SchemaRedefineSelfReference.swift) to attribute groups: a group or attributeGroup
inside xs:redefine may reference itself at most once (src-redefine.6.1.1 /
7.2.1), and a group self-reference must occur exactly once. Catches a redefined
attributeGroup with two self-references (attgC044).

Fixes a latent false positive an adversarial review found in the group case: the
search now uses a BOUNDED walk (boundedSelfReferenceNodes) that stops at nested
element/complexType scopes, matching the established cycle-rule boundary. The
prior unbounded walk would miscount a recursive group reference inside a nested
element's content (a data-structure recursion, legal) as a redefinition
self-reference. attributeGroup content has no such nesting, so it is unaffected.

XSTS: invalid-schemas-accepted 75 to 74 (attgC044), valid-schemas-rejected held
at 0, no other bucket moved. The validation description broadened accordingly
(configuration pin updated).
2026-06-18 01:15:16 +02:00
..
BuiltinType.swift fix(schema): validate notation declarations and enumeration restrictions 2026-06-15 22:27:04 +02:00
ComplexType.swift fix(schema): enforce NameAndTypeOK nillable clause in particle restriction (#145) 2026-06-17 17:25:10 +02:00
ComplexValidator.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
ComplexValidatorAttributes.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
ComplexValidatorContentModel.swift fix(schema): enforce NameAndTypeOK nillable clause in particle restriction (#145) 2026-06-17 17:25:10 +02:00
ComplexValidatorDerivation.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
ComplexValidatorHelpers.swift fix(schema): enforce NameAndTypeOK nillable clause in particle restriction (#145) 2026-06-17 17:25:10 +02:00
ComplexValidatorIDs.swift
ComplexValidatorStreaming.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
ComplexValidatorXSIType.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
ContentMatcher.swift fix(schema): enforce NameAndTypeOK nillable clause in particle restriction (#145) 2026-06-17 17:25:10 +02:00
ContentModelDeterminism.swift
DateTimeParser.swift
DateTimeValue.swift
DecimalValue.swift
DerivationMethod.swift
DurationValue.swift
IdentityConstraint.swift fix(schema): resolve identity-constraint XPath prefixes against the schema (#147) 2026-06-17 00:03:13 +02:00
IdentityValidator.swift fix(schema): resolve identity-constraint XPath prefixes against the schema (#147) 2026-06-17 00:03:13 +02:00
IDTracker.swift
Lexical.swift
ParticleNormalization.swift
ParticleRestriction.swift fix(schema): eliminate the last false positive (particlesZ001); false-positives = 0 (#148) 2026-06-17 19:56:57 +02:00
ParticleRestrictionElement.swift
ParticleRestrictionHelpers.swift fix(schema): eliminate the last false positive (particlesZ001); false-positives = 0 (#148) 2026-06-17 19:56:57 +02:00
Primitive.swift fix(schema): validate notation declarations and enumeration restrictions 2026-06-15 22:27:04 +02:00
RelaxNGCompactHelpers.swift
RelaxNGCompactLexer.swift
RelaxNGCompactParser.swift
RelaxNGContentType.swift
RelaxNGDerivative.swift
RelaxNGDiagnostics.swift
RelaxNGFacets.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
RelaxNGGrammarCheck.swift
RelaxNGGrammarCheckSections.swift
RelaxNGNameClasses.swift
RelaxNGNode.swift
RelaxNGParser.swift
RelaxNGParserIncludes.swift
RelaxNGPattern.swift
RelaxNGRestrictionChecker.swift
RelaxNGRestrictionOverlap.swift
RelaxNGRestrictionPaths.swift
RelaxNGRestrictions.swift
RelaxNGSchema.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
SchemaAllGroupPlacement.swift
SchemaAttributeApplicability.swift fix(schema): a local element must have a name or a ref; invalid-schemas-accepted 80 to 79 (#145) 2026-06-18 00:34:50 +02:00
SchemaAttributeRestriction.swift fix(schema): a restriction's attribute wildcard must subset the base's (#145) 2026-06-17 18:46:04 +02:00
SchemaAttributeUniqueness.swift fix(schema): an attribute's type must be a simple type (au-props-correct); invalid-schemas-accepted 96 to 95 (#145) 2026-06-17 22:12:01 +02:00
SchemaCompileValidation.swift fix(schema): generalize redefine self-reference to attributeGroups + bound the walk; invalid-schemas-accepted 75 to 74 (#161) 2026-06-18 01:15:16 +02:00
SchemaCompositionValidations.swift fix(schema): generalize redefine self-reference to attributeGroups + bound the walk; invalid-schemas-accepted 75 to 74 (#161) 2026-06-18 01:15:16 +02:00
SchemaContentOrder.swift fix(schema): require a content derivation in simpleContent/complexContent (#145) 2026-06-17 14:58:58 +02:00
SchemaDerivationControl.swift fix(schema): inherit finalDefault as a complex type's final (#145) 2026-06-17 15:31:48 +02:00
SchemaDocument.swift refactor(schema): express the src-resolve check as a Validation, not a pipeline throw (#161) 2026-06-17 23:34:33 +02:00
SchemaExtensionAllGroup.swift fix(schema): enforce element value-constraint content type (cos-valid-default); invalid-schemas-accepted 99 to 96 (#145) 2026-06-17 22:00:23 +02:00
SchemaFacetApplicability.swift fix(schema): validate value constraints against inline types (#145) 2026-06-17 15:45:06 +02:00
SchemaIDAttribute.swift feat(schema): locate compile diagnostics with validation coding paths (#169) 2026-06-16 10:26:11 +02:00
SchemaIdentityXPath.swift fix(schema): an identity-constraint xpath may not use an undeclared prefix; invalid-schemas-accepted 77 to 75 (#145) 2026-06-18 01:01:12 +02:00
SchemaIDValueConstraint.swift
SchemaImportNamespace.swift fix(schema): a redefined type must derive from itself, not a same-named foreign type (src-redefine.5); invalid-schemas-accepted 84 to 81 (#161) 2026-06-17 23:00:07 +02:00
SchemaNameUniqueness.swift fix(schema): include notation names in component-name uniqueness (#145) 2026-06-17 14:21:57 +02:00
SchemaNestedDefinition.swift
SchemaNotationValidity.swift fix(schema): hold xsd:notation to its (annotation?) content model (#145) 2026-06-17 14:17:27 +02:00
SchemaRedefineSelfReference.swift fix(schema): generalize redefine self-reference to attributeGroups + bound the walk; invalid-schemas-accepted 75 to 74 (#161) 2026-06-18 01:15:16 +02:00
SchemaReferenceForeignPools.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
SchemaReferenceResolution.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
SchemaReferences.swift fix(schema): an import namespace must match the imported targetNamespace (src-import.3); invalid-schemas-accepted 87 to 84 (#161) 2026-06-17 22:47:24 +02:00
SchemaSimpleTypeFinal.swift fix(schema): inherit finalDefault as a simple type's final (#145) 2026-06-17 13:59:19 +02:00
SchemaSimpleTypeValidity.swift fix(schema): require a list or union to declare its member types (#145) 2026-06-17 14:11:26 +02:00
SchemaStructure.swift fix(schema): a local complexType must be anonymous; invalid-schemas-accepted 81 to 80 (#145) 2026-06-18 00:17:35 +02:00
SchemaStructureHelpers.swift fix(schema): a local complexType must be anonymous; invalid-schemas-accepted 81 to 80 (#145) 2026-06-18 00:17:35 +02:00
SchemaSubstitutionType.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
SchemaWildcardNamespace.swift
SimpleType.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
StreamingXSDValidator.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
TypeDerivation.swift
XSDAttributeParser.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XSDCompletions.swift fix(schema): enforce NameAndTypeOK nillable clause in particle restriction (#145) 2026-06-17 17:25:10 +02:00
XSDComplexContent.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XSDContext.swift refactor(schema): surface facet/pattern validity as a Validation, not a parse-time report (#161) 2026-06-18 00:02:20 +02:00
XSDDerivation.swift fix(schema): generalize redefine self-reference to attributeGroups + bound the walk; invalid-schemas-accepted 75 to 74 (#161) 2026-06-18 01:15:16 +02:00
XSDParser.swift refactor(schema): redefine self-derivation as a Validation; drop the redundant all-group throw (#161) 2026-06-17 23:49:30 +02:00
XSDParserHelpers.swift fix(schema): resolve identity attribute-field types for value-space keys (#147) 2026-06-17 10:34:19 +02:00
XSDParserParticles.swift fix(schema): enforce NameAndTypeOK nillable clause in particle restriction (#145) 2026-06-17 17:25:10 +02:00
XSDParserTypeReferences.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XSDParserUnion.swift refactor(schema): redefine self-derivation as a Validation; drop the redundant all-group throw (#161) 2026-06-17 23:49:30 +02:00
XSDSchemaValidations.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
XSDSimpleParser.swift refactor(schema): surface facet/pattern validity as a Validation, not a parse-time report (#161) 2026-06-18 00:02:20 +02:00
XSDSimpleParser+Facets.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XSDValidations.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XSDWildcardParser.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00