Skip to content

PureXML 0.4.3

Choose a tag to compare

@mihaelamj mihaelamj released this 25 Jun 17:15
· 59 commits to main since this release
8abaf57

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 EXSLT set:leading/set:trailing sort through the cached sortedByDocumentOrder() instead of sorted(by: precedes), and key() 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