Re: [xsl] Passing binary data to XSLT

Subject: Re: [xsl] Passing binary data to XSLT
From: "Dimitre Novatchev dnovatchev@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 3 May 2026 18:36:05 -0000
> I am interested to calculate checksum hash (e.g. BitPrint, MD4, MD5,
>   TigerHash, et cetera) with XML directives of MathML and XSLT.
>
>   To do so, I would need to pass binary data to XSLT, I suppose.
>
>   Is it possible, to pass binary data to XSLT?

There is already fn:hash in the "XPath /XQuery 4.0 Functions and Operators"
-
https://qt4cg.org/specifications/xpath-functions-40/Overview.html#func-hash

It accepts input as xs:hexBinary or xs:base64Binary, besides, of course,
xs:string.

At present 5 hashing algorithms are supported: MD5, SHA-1, SHA-256, Blake3,
CRC-32

The resulting hash value is returned also as xs:hexBinary.

That may be helpful, especially if you have access to an existing
implementation - such as BaseX or Saxon.

Thanks,
Dimitre Novatchev.


On Sat, May 2, 2026 at 10:45b/AM Schimon ssch@xxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Good evening.
>
> I am interested to calculate checksum hash (e.g. BitPrint, MD4, MD5,
> TigerHash, et cetera) with XML directives of MathML and XSLT.
>
> To do so, I would need to pass binary data to XSLT, I suppose.
>
> Is it possible, to pass binary data to XSLT?
>
> Kind regards,
> Schimon

Current Thread