From e080876eac40560ba856d968082dbf221133b4c8 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Fri, 26 Jun 2026 01:41:16 +0200 Subject: [PATCH] release: PureXML 0.4.6 (#311) Stamp the XPath string-function and xsl:number quadratic fixes as 0.4.6: translate() and the substring search (contains/substring-before/after) are now linear (the substring search via Knuth-Morris-Pratt, closing a DoS vector), and xsl:number is linear for level single/multiple and quadratic (not cubic) for level any. An 8000-item default xsl:number drops ~3.5s to ~0.04s. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82f0c67..0aebc1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.6] - 2026-06-26 + ### Fixed - `xsl:number` levels `single` and `multiple` are no longer quadratic when numbering a wide list. Each numbered node was ranked among its siblings by rescanning the parent's child list, so numbering n siblings was O(n^2). The rank now comes from a per-parent, per-count-pattern cache built once (using the transformer's match cache, so a count test is O(1)), making the numbering linear. The numbers are unchanged. Numbering 8000 list items with the default `xsl:number` drops from about 3.5 s to about 0.04 s (~90x). Guarded by `XSLTNumberSingleTests`.