[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: hashing text in XSLT?
From: "Joel Kalvesmaki director@xxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Oct 2026 22:41:00 -0000
In my XML Pantry, I have shared some XSLT 3.0 hash and check functions I wrote: Fletcher checksum and MD5. The latter is very inefficient on large strings. But the Fletcher checksums are very performant.

https://github.com/Arithmeticus/XML-Pantry/tree/master/hash-and-check

Joel

On 2026-10-12 19:18, Steve Ball steve.ball@xxxxxxxxxxxxxx wrote:
A few years ago I implemented a hash algorithm for XPath/XSLT using XPath 2.0 features (i.e. it uses the string-to-codepoints() function). It also uses some large (prime) numbers, such as 2^50, so you would need to run it on a 64-bit machine.

On 9/10/26 03:49, Graydon graydon@xxxxxxxxx wrote:
Hello!

Given an XSLT 3/XPath 3.1 processor (Saxon-J 12.9 in oXygen), is there a
practical way to hash strings?


I'd suppose there might be a Java function, but if so, I have no idea
what it is, and some searching sugguests hashing isn't a core function
thing.

Thanks!



-- Joel Kalvesmaki Director, Text Alignment Network http://textalign.net

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member