PureXML/Tests
Mihaela Mihaljevic 720263ee58
perf(xpath): fuse the node test into the attribute traversal (#287)
The attribute axis built an XPath node for every attribute of the element
and then filtered by the step's node test. A predicate like [@name='value']
runs that per matched element, so for a wide document it wrapped many
attributes only to discard all but one, and each wrap retains the owner
element and copies the attribute's qualified name and value.

Apply the same fusion the descendant axes use: test the raw attribute during
the walk and wrap only the ones that pass. matches delegates, for an
attribute node, to a new matchesAttribute (the attribute axis always carries
the attribute principal kind, so the reduction is exact), and the attribute
walk applies it as a keep filter. The node-set, declaration order, and
uniqueness are identical to build-then-filter.

Measured xpath ~20% faster on the 20k-item generated corpus via a same-state
A/B (count unchanged at 10000); xpath is now ~2x libxml2, down from ~13x at
the start of this work. XPathFusedAttributeTests covers every node-test kind
through the fused path, and an adversarial equivalence review found no query
whose result changes. Full suite, Apache Xalan XSLT gold output, and the WASM
build stay green.
2026-06-25 07:51:29 +02:00
..
Fixtures fix(xslt): xsl:namespace-alias keeps the literal prefix, remapping only the URI (closes namespace19/23/24/35/113) (#273) 2026-06-24 15:43:02 +02:00
AdversarialCriticTests.swift
ByteFastPathTests.swift perf(parsing): byte-level scanning fast paths halve parse time vs libxml2 (#275) 2026-06-24 18:46:58 +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 XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
ConformanceHTMLDepthTests.swift
ConformanceRegexTests.swift
ConformanceSchematronTests.swift
ConformanceXIncludeTests.swift
ConformanceXPathAxisTests.swift
ContentMatcherDifferentialTests.swift
ContentMatcherWorstCaseTests.swift
ContentModelDeterminismTests.swift fix(schema): reject a redefine whose self-reference duplicates a particle (UPA) (#253) 2026-06-24 00:06:23 +02:00
ContentNFAStateBudgetTests.swift
CoverageGateValueTypeTests.swift test(ci): add an opt-in coverage gate; close the 0% value types it surfaces 2026-06-22 16:38:30 +02:00
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
EscapingFastPathTests.swift perf(emitting): skip escaping rebuild for values that need no escaping (#279) 2026-06-25 00:56:52 +02:00
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
ParserPathDifferentialTests.swift perf(parsing): skip reference decoding for ampersand-free attribute values (#278) 2026-06-25 00:17:31 +02:00
ParsingTests.swift
PatternTests.swift
PullPushDifferentialTests.swift
PushParserTests.swift
QuickFixTests.swift
RecoveringReaderTests.swift
RegexCategoryTests.swift fix(schema): negated character-class subtraction excludes the subtrahend (#249) 2026-06-23 03:10:45 +02:00
RegexTests.swift fix(schema): reject an unknown \p{...} category or block name (#248) 2026-06-23 02:15:26 +02:00
RelaxNGCombineTests.swift
RelaxNGCompactAnnotationTests.swift
RelaxNGCompactConcatTests.swift
RelaxNGCompactFollowAnnotationTests.swift
RelaxNGCompactParamTests.swift
RelaxNGCompactTests.swift
RelaxNGDataParamTests.swift
RelaxNGDatatypeLibraryTests.swift
RelaxNGIncludeTests.swift test(relaxng): cover include and externalRef resolution 2026-06-22 17:01:15 +02:00
RelaxNGLocatedErrorTests.swift
RelaxNGNameClassTests.swift
RelaxNGQNameTests.swift
RelaxNGSchemaCorrectnessTests.swift
RelaxNGSpecSuiteTests.swift
RelaxNGStreamingTests.swift
RelaxNGTests.swift
RelaxNGValueSpaceTests.swift
SaveOptionsTests.swift
SAXTests.swift
ScalarLexingTests.swift
SchemaAbstractXsiTypeTests.swift
SchemaAllGroupMinOccursTests.swift fix(schema): optional xs:all group requires its members when present 2026-06-22 18:29:09 +02:00
SchemaAllGroupPlacementTests.swift
SchemaAllGroupReferenceTests.swift
SchemaAnySimpleTypeFacetTests.swift
SchemaAnyTypeLaxTests.swift
SchemaAttributeDefaultUseTests.swift
SchemaAttributeLocatedDiagnosticsTests.swift
SchemaAttributeRefTests.swift
SchemaAttributeRestrictionTests.swift
SchemaAttributeUniquenessTests.swift
SchemaAttributeWildcardIntersectionTests.swift
SchemaBlockDefaultTests.swift
SchemaCircularDerivationTests.swift
SchemaComposingTests.swift test(schema,xslt,parsing): standing coverage for the gaps a coverage run found 2026-06-22 16:16:32 +02:00
SchemaCompositionLocatedDiagnosticsTests.swift feat(schema): locate composition/redefine-pass schema diagnostics 2026-06-21 19:41:31 +02:00
SchemaConformanceTests.swift
SchemaContainerTopLevelFormTests.swift fix(schema): reject global form in included/imported documents 2026-06-22 17:50:53 +02:00
SchemaContentDerivationLocatedTests.swift
SchemaContentOrderTests.swift
SchemaDerivationControlTests.swift
SchemaDerivationLocatedDiagnosticsTests.swift
SchemaDeterminismGroupBlowupTests.swift perf(schema): memoize group expansion in the compiled content model 2026-06-22 23:24:19 +02:00
SchemaDifferentialHarness.swift
SchemaDifferentialTests.swift
SchemaDurationFacetTests.swift
SchemaElementBlockTests.swift
SchemaElementRefApplicabilityTests.swift
SchemaExtensionAllGroupTests.swift
SchemaExtensionSubstitutionLocatedTests.swift
SchemaFacetApplicabilityTests.swift
SchemaFacetDefinitionTests.swift
SchemaFixedElementChildrenTests.swift
SchemaForeignNamespaceReferenceTests.swift
SchemaFuzzTests.swift test(schema): harden the streaming/tree differential over deep group chains (#246) 2026-06-23 00:09:36 +02:00
SchemaGroupRedefineRestrictionTests.swift
SchemaIDAttributeTests.swift
SchemaIdentityDefaultValueTests.swift
SchemaIdentityFieldTypeTests.swift fix(schema): reject identity field whose declared target is a non-simple complex type 2026-06-22 13:10:30 +02:00
SchemaIdentityValueEqualityTests.swift
SchemaIdentityXPathTests.swift
SchemaIDIDREFTests.swift
SchemaIDREFDefaultTests.swift fix(schema): resolve defaulted/fixed IDREF attributes against IDs 2026-06-22 18:56:36 +02:00
SchemaIDValueConstraintTests.swift
SchemaIncludeTests.swift
SchemaListFacetTests.swift
SchemaListUnionXsiTypeTests.swift
SchemaLocalElementBlockKeyTests.swift
SchemaLocatedDiagnosticsTests.swift
SchemaMixedEmptyTests.swift
SchemaMultiDocumentTests.swift
SchemaNamespacedDerivationTests.swift
SchemaNamesUPANotationLocatedTests.swift
SchemaNameUniquenessTests.swift
SchemaNestedDefinitionTests.swift
SchemaNilFixedTests.swift fix(schema): reject a nilled element with a fixed value constraint 2026-06-22 18:05:23 +02:00
SchemaNotationValidityTests.swift
SchemaParticleTypeRestrictionTests.swift
SchemaPatternFacetTests.swift fix(schema): reject an unknown \p{...} category or block name (#248) 2026-06-23 02:15:26 +02:00
SchemaProhibitedAttributeTests.swift
SchemaQNameLengthTests.swift
SchemaRedefineAttributeGroupTests.swift fix(schema): flatten redefine self-reference and exclude prohibited uses in attribute uniqueness 2026-06-22 03:52:13 +02:00
SchemaReferenceLocatedDiagnosticsTests.swift
SchemaReferenceTests.swift fix(schema): an unprefixed type ref to a target-namespace type is undeclared 2026-06-21 23:17:14 +02:00
SchemaRestrictionMixedTests.swift
SchemaSimpleContentChainTests.swift
SchemaSimpleContentFixedTests.swift
SchemaSimpleContentListTests.swift
SchemaSimpleContentRestrictionInlineTypeTests.swift
SchemaSimpleTypeFinalTests.swift
SchemaSimpleTypeLocatedDiagnosticsTests.swift
SchemaSimpleTypeRestrictionTests.swift
SchemaSimpleTypeVarietyTests.swift
SchemaStreamingValueConstraintTests.swift
SchemaStreamingXsiTypeGateTests.swift
SchemaStringWhitespaceTests.swift
SchemaStructureDerivationTests.swift
SchemaStructureLocatedDiagnosticsTests.swift
SchemaStructureTests.swift
SchemaSubstitutionBlockTests.swift
SchemaSubstitutionListUnionTests.swift
SchemaSubstitutionTypeBlockTests.swift
SchemaSubstitutionTypeTests.swift fix(schema): apply substitution-group block to a member with an inline type 2026-06-22 06:21:23 +02:00
SchemaTopLevelAttributeGroupTests.swift
SchemaTopLevelAttributeTests.swift
SchemaTopLevelElementTests.swift
SchemaTopLevelGroupTests.swift
SchematronAbstractPatternTests.swift
SchematronAbstractTests.swift
SchematronDiagnosticTests.swift
SchematronDynamicTests.swift
SchematronFunctionTests.swift
SchematronLetTests.swift
SchematronScopedLetTests.swift
SchematronTests.swift
SchemaTwoIDAttributesTests.swift
SchemaTypeExclusivityTests.swift
SchemaUnionFacetTests.swift
SchemaUserTypeValueConstraintTests.swift
SchemaValueConstraintExclusionTests.swift
SchemaValueConstraintTests.swift
SchemaValueConstraintValidityTests.swift
SchemaWhiteSpaceRestrictionTests.swift
SchemaWildcardNamespaceTests.swift
SchemaWildcardUnionExpressibilityTests.swift fix(schema): attribute-wildcard union/intersection per Errata E1-10 (#251) 2026-06-23 04:56:17 +02:00
SchemaXSIAttributeTests.swift fix(schema): an unprefixed type ref to a target-namespace type is undeclared 2026-06-21 23:17:14 +02:00
SchemaXSITypeUnionMemberBlockTests.swift fix(schema): block an xsi:type that reaches a union declared type through a member (#277) 2026-06-24 21:12:35 +02:00
SchemaXSTSDiagnosticTests.swift
SchemaXSTSRegressionTests.swift
SerializationEscapeTests.swift
SerializationOptionsTests.swift
SerializerTests.swift fix(emit): split ?> in processing-instruction data with a space (#262) 2026-06-24 03:14:01 +02:00
SourceSpanTests.swift
StreamingDecoderJPTWTests.swift test(parsing): cover streaming ISO-2022-JP and EUC-TW decode 2026-06-22 17:11:58 +02:00
StreamingDecoderTests.swift test(schema,xslt,parsing): standing coverage for the gaps a coverage run found 2026-06-22 16:16:32 +02:00
StreamingDTDValidationTests.swift
StreamingXSDTests.swift
StrictRecoveringDifferentialTests.swift
StrictSubsetProfileTests.swift
TextReaderBreadthTests.swift
TextReaderTests.swift
TreeNodeEditingTests.swift
TreeNodeIdentityTests.swift
TreeNodeTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
ValidationConfigurationTests.swift fix(schema): attribute-wildcard union/intersection per Errata E1-10 (#251) 2026-06-23 04:56:17 +02:00
ValidationFieldCoverageTests.swift
ValidationFrameworkTests.swift
ValidationRuleDTDTests.swift
ValidationRuleMiscTests.swift
ValidationRuleRegistryTests.swift
ValidationRuleStructuralTests.swift
ValidationRuleTestSupport.swift
ValidationRuleXSDTests.swift
ValidationTests.swift
ValidationWarningsTests.swift
W3CEduniSuiteTests.swift
W3CIBMSuiteTests.swift
W3CJapaneseSuiteTests.swift
W3COasisSuiteTests.swift
W3CSunSuiteTests.swift
W3CXMLSuiteTests.swift
WriterTests.swift
XalanConfSuiteTests.swift test(xslt): decode non-UTF-8 conformance sources via the library's encoding detection (#261) 2026-06-24 03:04:45 +02:00
XIncludeNegotiationTests.swift
XIncludeTests.swift
XMLCharacterTests.swift
XMLDeclarationTests.swift
XPathAxisTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XPathContextTests.swift
XPathDescendantFusionTests.swift perf(xpath): fuse // into a descendant step for non-positional predicates (#281) 2026-06-25 03:21:03 +02:00
XPathExpressionTests.swift fix(xpath): format a large integer-valued number with no decimal point (#268) 2026-06-24 04:31:19 +02:00
XPathFunctionTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XPathFusedAttributeTests.swift perf(xpath): fuse the node test into the attribute traversal (#287) 2026-06-25 07:51:29 +02:00
XPathFusedDescendantTests.swift perf(xpath): fuse the node test into the descendant traversal (#286) 2026-06-25 07:05:03 +02:00
XPathNamespaceTests.swift
XPathNodeSetDedupTests.swift perf(xpath): skip node-set de-duplication where no duplicate can arise (#280) 2026-06-25 01:33:50 +02:00
XPathSingleStepOrderTests.swift perf(xpath): skip the document-order sort for an already-ordered single step (#283) 2026-06-25 05:04:00 +02:00
XPathTests.swift
XPointerRangeTests.swift
XPointerTests.swift
XSDCategoryTests.swift
XSDCompletionTests2.swift
XSDComplexTypeTests.swift
XSDCompositionTests.swift
XSDDatatypeTests.swift
XSDDerivationControlTests.swift
XSDIdentityTests.swift fix(schema): reject identity field whose declared target is a non-simple complex type 2026-06-22 13:10:30 +02:00
XSDImportTests.swift
XSDLocatedContentTests.swift
XSDNamespaceTests.swift
XSDParticleReferenceRestrictionTests.swift
XSDParticleRestrictionTests.swift fix(schema): a content-bearing derived group cannot restrict a base element 2026-06-22 19:40:57 +02:00
XSDRestrictionContentFreeOrderTests.swift
XSDSchemaTests.swift
XSDSchemaValidationTests.swift
XSDTypeResolutionTests.swift
XSDValueConstraintTests.swift
XSDWildcardTests.swift
XSLTApplyImportsTests.swift
XSLTAttributeSetTests.swift
XSLTCallTemplatePrecedenceTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTCDATASectionTests.swift
XSLTCollationTests.swift test(schema,xslt,parsing): standing coverage for the gaps a coverage run found 2026-06-22 16:16:32 +02:00
XSLTCompositionTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTCreatedNamesTests.swift
XSLTDecimalFormatTests.swift
XSLTDoctypeOutputTests.swift fix(xslt): name the html output method doctype HTML, not the element name (closes output40/48/60) (#259) 2026-06-24 02:29:26 +02:00
XSLTDocumentBaseURITests.swift fix(xslt): resolve string-form document() against the stylesheet element's base URI (closes mdocs12/13) (#257) 2026-06-24 02:03:32 +02:00
XSLTDocumentFunctionTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTExpandedQNameTests.swift fix(xslt): match template, key, attribute-set, decimal-format names by expanded QName (#255) 2026-06-24 00:44:27 +02:00
XSLTFallbackTests.swift
XSLTFunctionTests.swift
XSLTGlobalVariableTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTHTMLOutputTests.swift fix(html): percent-escape non-ASCII characters in URI-valued attributes (closes output32) (#263) 2026-06-24 03:27:49 +02:00
XSLTKeyNodeSetTests.swift fix(xslt): distribute // over union branches in an xsl:key match pattern (#272) 2026-06-24 15:27:36 +02:00
XSLTMatchCacheTests.swift
XSLTMessageTests.swift
XSLTNamespaceAliasTests.swift fix(xslt): xsl:namespace-alias keeps the literal prefix, remapping only the URI (closes namespace19/23/24/35/113) (#273) 2026-06-24 15:43:02 +02:00
XSLTNumberingTests.swift fix(xslt): count the from boundary node in xsl:number level=single when it matches count (#270) 2026-06-24 10:47:49 +02:00
XSLTOutputMethodTests.swift fix(xslt): ignore disable-output-escaping for attribute, comment, and PI values (#264) 2026-06-24 03:41:56 +02:00
XSLTParityTests.swift
XSLTParserTests.swift
XSLTPatternPriorityTests.swift fix(xslt): give an axis-prefixed match pattern its node-test default priority (#266) 2026-06-24 04:08:00 +02:00
XSLTResultFragmentTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTSortCaseOrderTests.swift
XSLTTests.swift XSLT/XPath conformance: close 68 Apache Xalan cases (#254) 2026-06-24 00:13:14 +02:00
XSLTWhitespaceTests.swift fix(xslt): honor xml:space=preserve when stripping stylesheet whitespace (#271) 2026-06-24 10:57:47 +02:00
XSTSDifferentialTests.swift
XSTSSuiteTests.swift fix(schema): block an xsi:type that reaches a union declared type through a member (#277) 2026-06-24 21:12:35 +02:00