EXPath binary module - comments - bin:hex()

On 02/08/2013 18:01, Michael Kay wrote:
> 1. bin:hex()
>
> I think it's intended that the input can consist of an odd number of 
> hex digits, but there are a couple of statements that might suggest 
> otherwise:
>
> (a) the term "pairwise" in the summary
>
> (b) the reference to the cast xs:hexBinary(string) (which requires an 
> even number of digits IIRC).

On 02/08/2013 23:53, Christian Grün wrote:
> – in 5.1, it is stated that “This function behaves similarly to the
> double cast xs:base64Binary(xs:hexBinary($string)).”. Does it mean
> that the casts are indeed equivalent to bin:hex, or are there minor
> differences?
Mike is of course right. The function left-pads with (zero or one) zeros 
to make the hex string an even number of characters. So it is only 
equivalent for cases where the input string has an even number of 
characters. I'll drop the 'pairwise' and change the description to 
reflect this.
-- 
*John Lumley* MA PhD CEng FIEE
john@saxonica.com <mailto:john@saxonica.com>
on behalf of Saxonica Ltd

Received on Monday, 5 August 2013 08:05:40 UTC