W3C home > Mailing lists > Public > public-expath@w3.org > August 2013

EXPath binary module - comments - bin:hex()

From: John Lumley <john@saxonica.com>
Date: Mon, 05 Aug 2013 09:05:12 +0100
Message-ID: <51FF5CB8.7060905@saxonica.com>
To: EXPath ML <public-expath@w3.org>
CC: Michael Kay <mike@saxonica.com>, christian.gruen@gmail.com
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:20 UTC