PureXML 0.4.3
XSLT/XPath quadratic fixes. Backward compatible, output identical.
Fixed (quadratic -> linear over wide fan-outs)
string(@x)/value-of(single-node string extraction) no longer computes a document-order key that scanned the node's siblings (#299): a representative 20k-element transform drops ~2.3s -> ~0.65s (~3.5x).key(),id(), and EXSLTset:leading/set:trailingsort through the cachedsortedByDocumentOrder()instead ofsorted(by: precedes), andkey()deduplicates through a set (#300): a key()-driven transform drops ~1.15s -> ~0.43s (~2.7x).
Both fixes are in shared XPath document-order helpers, so XSLT, Schematron, and XPointer all benefit.
Verification
Full suite (1731 tests), W3C XML conformance, RELAX NG, Apache Xalan XSLT gold-output (byte-for-byte), and C14N corpora, plus the WASM build, all green across macOS, Linux, and Windows. swiftformat and swiftlint --strict clean.
Full changelog: https://github.com/mihaelamj/PureXML/blob/main/CHANGELOG.md