PureXML/Tests
Mihaela Mihaljevic 31a4ebacfb fix(schema): extend the xsi:type not-derived check to atomic substitutes; invalid-instances-accepted 66 to 60 (#181, #147)
cvc-elt.4.3.2.1 requires an xsi:type to name a type derived from the element's
declared type. The not-derived check covered only complex substitutes, so an
xsi:type naming an atomic type unrelated to the declared atomic type, such as a
sibling restriction or the declared type's own ancestor, was accepted.

notDerivedSubstitutionError now admits atomic simple substitutes too (via
isAtomicOrComplex, which excludes list/union, handled separately). It still fires
only when both the substitute and the declared type are recorded in the
namespaced derivation backbone and derivationMethods finds no path between them.
Built-in types and the ur-types are absent from the backbone, so a built-in
substitute or declared type leaves the check silent: a valid built-in derivation
such as xsi:type="xs:int" on an xs:decimal element is never flagged, which was
the source of an earlier false-positive regression. A genuine user restriction
chain stays inside the backbone the whole way down, so a validly derived
substitute is accepted.

invalid-instances-accepted 66 to 60, no false positive (valid-instances-rejected
and valid-schemas-rejected held at 0), no other bucket moved. An adversarial
review probed built-in derivation in both directions, deep and cross-namespace
restriction chains, and sibling/ancestor substitutes, and found no over-rejection.
2026-06-18 13:37:49 +02:00
..
Fixtures feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
AdversarialCriticTests.swift fix(schema): enforce element order and import constraints 2026-06-15 23:29:47 +02:00
C14NSpecExampleTests.swift
CanonicalC14N11Tests.swift
CanonicalPrefixRewriteTests.swift
CanonicalSelectionTests.swift
CanonicalSubsetTests.swift
CanonicalTests.swift
CatalogBaseURITests.swift
CatalogGroupPreferTests.swift
CatalogSGMLTests.swift
CatalogSuffixPreferTests.swift
CatalogTests.swift
ConformanceCanonicalModesTests.swift
ConformanceCatalogTests.swift
ConformanceCorpusTests.swift
ConformanceDTDTests.swift
ConformanceEmittingTests.swift
ConformanceHTMLDepthTests.swift
ConformanceRegexTests.swift
ConformanceSchematronTests.swift
ConformanceXIncludeTests.swift
ConformanceXPathAxisTests.swift
ContentMatcherDifferentialTests.swift
ContentModelDeterminismTests.swift
ContentNFAStateBudgetTests.swift
DTDAttributeTests.swift
DTDConditionalNotationTests.swift
DTDDefaultingTests.swift
DTDEntityDeclaredTests.swift
DTDIdentifierTests.swift
DTDLocatedContentTests.swift
DTDParameterEntityDepthTests.swift
DTDStandaloneTests.swift
DTDSubsetStrictnessTests.swift
DTDTests.swift
DTDValidationTests.swift
DTDValidityConstraintTests.swift
EncodingMismatchTests.swift
EncodingTests.swift
EntityBaseURITests.swift
EntityResolverTests.swift
EntitySplicingTests.swift
ErrataValidityTests.swift
EXSLTTests.swift
HTMLAdoptionTests.swift
HTMLDocumentTests.swift
HTMLForeignContentTests.swift
HTMLFramesetTests.swift
HTMLSelectTests.swift
HTMLTests.swift
HTMLTokenizerTests.swift
HTMLValidationTests.swift
LineEndingTests.swift
LintTests.swift
ModelTests.swift
NamespaceConstraintTests.swift
NamespaceTests.swift
OutputEncodingTests.swift
ParityEdgeTests.swift
ParsingTests.swift
PatternTests.swift
PullPushDifferentialTests.swift
PushParserTests.swift
QuickFixTests.swift
RecoveringReaderTests.swift
RegexCategoryTests.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
RegexTests.swift fix(regex): reject a pattern facet whose regex ends mid-token (#145) 2026-06-17 13:53:41 +02:00
RelaxNGCombineTests.swift
RelaxNGCompactAnnotationTests.swift
RelaxNGCompactConcatTests.swift
RelaxNGCompactFollowAnnotationTests.swift
RelaxNGCompactParamTests.swift
RelaxNGCompactTests.swift
RelaxNGDataParamTests.swift
RelaxNGDatatypeLibraryTests.swift
RelaxNGLocatedErrorTests.swift
RelaxNGNameClassTests.swift
RelaxNGQNameTests.swift
RelaxNGSchemaCorrectnessTests.swift
RelaxNGSpecSuiteTests.swift
RelaxNGStreamingTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
RelaxNGTests.swift
RelaxNGValueSpaceTests.swift
SaveOptionsTests.swift
SAXTests.swift
ScalarLexingTests.swift
SchemaAllGroupPlacementTests.swift fix(schema): enforce model-group occurrence ranges; invalid-schemas-accepted 130 to 110 (#145) 2026-06-17 20:55:22 +02:00
SchemaAnyTypeLaxTests.swift fix(schema): process xsd:anyType wildcards as lax; invalid-instances-accepted 101 to 95 (#146, #147) 2026-06-18 10:44:33 +02:00
SchemaAttributeDefaultUseTests.swift feat(schema): attribute default requires use=optional (src-attribute.2) 2026-06-15 13:44:21 +02:00
SchemaAttributeRefTests.swift
SchemaAttributeRestrictionTests.swift fix(schema): inherit and prohibit attributes under complexContent restriction 2026-06-15 18:52:23 +02:00
SchemaAttributeUniquenessTests.swift
SchemaAttributeWildcardIntersectionTests.swift fix(schema): intersect a complex type's attribute wildcard sources; invalid-instances-accepted 94 to 89 (#147) 2026-06-18 11:21:32 +02:00
SchemaBlockDefaultTests.swift feat(schema): key the instance derivation/substitution backbone by namespaced identity; re-land blockDefault; invalid-instances-accepted 89 to 81 (#186, #147) 2026-06-18 12:41:18 +02:00
SchemaCircularDerivationTests.swift
SchemaConformanceTests.swift
SchemaContentOrderTests.swift fix(schema): a simpleContent restriction's base must be a complex type (#145) 2026-06-17 17:37:55 +02:00
SchemaDerivationControlTests.swift
SchemaDifferentialHarness.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
SchemaDifferentialTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
SchemaDurationFacetTests.swift
SchemaElementBlockTests.swift
SchemaElementRefApplicabilityTests.swift feat(schema): element ref excludes declaration-only attributes and inline type (src-element.2.2) 2026-06-15 14:29:13 +02:00
SchemaExtensionAllGroupTests.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
SchemaFacetApplicabilityTests.swift
SchemaFacetDefinitionTests.swift fix(schema): implement facet applicability and validation constraints 2026-06-16 00:02:04 +02:00
SchemaFuzzTests.swift
SchemaIDAttributeTests.swift
SchemaIdentityValueEqualityTests.swift fix(schema): compare identity-constraint fields across the decimal value space; invalid-instances-accepted 95 to 94 (#147) 2026-06-18 11:01:05 +02:00
SchemaIdentityXPathTests.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
SchemaIDIDREFTests.swift
SchemaIDValueConstraintTests.swift fix(schema): an ID-derived attribute or element may not have a value constraint 2026-06-15 11:41:26 +02:00
SchemaIncludeTests.swift fix(schema): a redefined schema's targetNamespace must match the redefiner (src-redefine); invalid-schemas-accepted 74 to 71 (#161) 2026-06-18 01:25:34 +02:00
SchemaListFacetTests.swift
SchemaListUnionXsiTypeTests.swift fix(schema): extend the xsi:type not-derived check to atomic substitutes; invalid-instances-accepted 66 to 60 (#181, #147) 2026-06-18 13:37:49 +02:00
SchemaLocatedDiagnosticsTests.swift feat(schema): locate compile diagnostics with validation coding paths (#169) 2026-06-16 10:26:11 +02:00
SchemaMixedEmptyTests.swift
SchemaMultiDocumentTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
SchemaNamespacedDerivationTests.swift feat(schema): key the instance derivation/substitution backbone by namespaced identity; re-land blockDefault; invalid-instances-accepted 89 to 81 (#186, #147) 2026-06-18 12:41:18 +02:00
SchemaNameUniquenessTests.swift fix(schema): validate duplicate names across separate files with identical content 2026-06-15 22:57:00 +02:00
SchemaNestedDefinitionTests.swift feat(schema): a nested simpleType or attributeGroup may not be named (localSimpleType) 2026-06-15 15:41:48 +02:00
SchemaNotationValidityTests.swift fix(schema): validate notation declarations and enumeration restrictions 2026-06-15 22:27:04 +02:00
SchemaPatternFacetTests.swift
SchemaQNameLengthTests.swift
SchemaReferenceTests.swift fix(schema): enforce targetNamespace matching on local references 2026-06-15 20:08:39 +02:00
SchemaSimpleTypeFinalTests.swift fix(schema): inherit finalDefault as a simple type's final (#145) 2026-06-17 13:59:19 +02:00
SchemaSimpleTypeRestrictionTests.swift fix(schema): enforce variety constraints on list itemType and union memberTypes 2026-06-15 20:01:51 +02:00
SchemaSimpleTypeVarietyTests.swift fix(schema): enforce variety constraints on list itemType and union memberTypes 2026-06-15 20:01:51 +02:00
SchemaStringWhitespaceTests.swift
SchemaStructureDerivationTests.swift fix(schema): validate xml:lang and xml:space on documentation elements 2026-06-15 22:36:51 +02:00
SchemaStructureTests.swift fix(schema): include and redefine require a schemaLocation; invalid-schemas-accepted 71 to 69 (#145) 2026-06-18 01:33:00 +02:00
SchemaSubstitutionBlockTests.swift fix(schema): block="substitution" bars members even for an untyped head; invalid-instances-accepted 107 to 101 (#147) 2026-06-18 10:13:45 +02:00
SchemaSubstitutionTypeTests.swift fix(schema): inherit finalDefault as a complex type's final (#145) 2026-06-17 15:31:48 +02:00
SchemaTopLevelAttributeGroupTests.swift fix(schema): reject local-use attributes on top-level group and attributeGroup definitions 2026-06-15 19:03:38 +02:00
SchemaTopLevelAttributeTests.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
SchemaTopLevelElementTests.swift feat(schema): top-level element may not have ref/form/minOccurs/maxOccurs (topLevelElement) 2026-06-15 14:39:54 +02:00
SchemaTopLevelGroupTests.swift fix(schema): reject local-use attributes on top-level group and attributeGroup definitions 2026-06-15 19:03:38 +02:00
SchematronAbstractPatternTests.swift
SchematronAbstractTests.swift
SchematronDiagnosticTests.swift
SchematronDynamicTests.swift
SchematronFunctionTests.swift
SchematronLetTests.swift
SchematronScopedLetTests.swift
SchematronTests.swift
SchemaTypeExclusivityTests.swift
SchemaUnionFacetTests.swift
SchemaUserTypeValueConstraintTests.swift feat(schema): validate value constraints against user types; fix inline restriction base 2026-06-15 14:06:26 +02:00
SchemaValueConstraintExclusionTests.swift feat(schema): reject both default and fixed on one declaration (src-element.1/src-attribute.1) 2026-06-15 13:25:14 +02:00
SchemaValueConstraintTests.swift
SchemaValueConstraintValidityTests.swift
SchemaWhiteSpaceRestrictionTests.swift feat(schema): whiteSpace facet may only strengthen the base (Part 2 4.3.6) 2026-06-15 14:54:47 +02:00
SchemaWildcardNamespaceTests.swift
SchemaXSTSDiagnosticTests.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
SchemaXSTSRegressionTests.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
SerializationEscapeTests.swift
SerializationOptionsTests.swift
SerializerTests.swift
SourceSpanTests.swift
StreamingDTDValidationTests.swift
StreamingXSDTests.swift
StrictRecoveringDifferentialTests.swift
StrictSubsetProfileTests.swift
TextReaderBreadthTests.swift
TextReaderTests.swift
TreeNodeEditingTests.swift
TreeNodeIdentityTests.swift
TreeNodeTests.swift
ValidationConfigurationTests.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
ValidationFieldCoverageTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationFrameworkTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationRuleDTDTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationRuleMiscTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationRuleRegistryTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationRuleStructuralTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationRuleTestSupport.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationRuleXSDTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
ValidationTests.swift
ValidationWarningsTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
W3CEduniSuiteTests.swift
W3CIBMSuiteTests.swift
W3CJapaneseSuiteTests.swift
W3COasisSuiteTests.swift
W3CSunSuiteTests.swift
W3CXMLSuiteTests.swift
WriterTests.swift
XalanConfSuiteTests.swift
XIncludeNegotiationTests.swift
XIncludeTests.swift
XMLCharacterTests.swift
XMLDeclarationTests.swift
XPathAxisTests.swift
XPathContextTests.swift
XPathExpressionTests.swift
XPathFunctionTests.swift
XPathNamespaceTests.swift
XPathTests.swift
XPointerRangeTests.swift
XPointerTests.swift
XSDCategoryTests.swift
XSDCompletionTests2.swift
XSDComplexTypeTests.swift
XSDCompositionTests.swift
XSDDatatypeTests.swift fix(schema): advance XSTS valid-instances-rejected to 4 (#146) 2026-06-16 22:22:05 +02:00
XSDDerivationControlTests.swift
XSDIdentityTests.swift feat(validation,schema): composable validation framework and cross-document composition 2026-06-16 09:57:43 +02:00
XSDImportTests.swift
XSDLocatedContentTests.swift
XSDNamespaceTests.swift
XSDParticleRestrictionTests.swift feat(schema): enforce particle element type restriction and bypass prohibited attributes 2026-06-15 18:10:21 +02:00
XSDRestrictionContentFreeOrderTests.swift
XSDSchemaTests.swift
XSDSchemaValidationTests.swift feat(schema): locate compile diagnostics with validation coding paths (#169) 2026-06-16 10:26:11 +02:00
XSDTypeResolutionTests.swift
XSDValueConstraintTests.swift
XSDWildcardTests.swift
XSLTApplyImportsTests.swift
XSLTAttributeSetTests.swift
XSLTCDATASectionTests.swift
XSLTCompositionTests.swift
XSLTCreatedNamesTests.swift
XSLTDecimalFormatTests.swift
XSLTDoctypeOutputTests.swift
XSLTDocumentFunctionTests.swift
XSLTFallbackTests.swift
XSLTFunctionTests.swift
XSLTHTMLOutputTests.swift
XSLTKeyNodeSetTests.swift
XSLTMatchCacheTests.swift
XSLTMessageTests.swift
XSLTNamespaceAliasTests.swift
XSLTNumberingTests.swift
XSLTOutputMethodTests.swift
XSLTParityTests.swift
XSLTParserTests.swift
XSLTResultFragmentTests.swift
XSLTSortCaseOrderTests.swift
XSLTTests.swift
XSLTWhitespaceTests.swift
XSTSDifferentialTests.swift test(diff): add opt-in differential schema-validity harness vs libxml2 (#145) 2026-06-17 20:15:17 +02:00
XSTSSuiteTests.swift fix(schema): extend the xsi:type not-derived check to atomic substitutes; invalid-instances-accepted 66 to 60 (#181, #147) 2026-06-18 13:37:49 +02:00