Mike
I think there might be a wider problem
in specifying any hex in XPath expressions. Tim's been looking into
this as part of an IBM DFDL defect.
Regards
Steve Hanson
Architect, IBM Data Format Description Language (DFDL)
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@uk.ibm.com
tel:+44-1962-815848
From:
Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:
dfdl-wg@ogf.org,
Date:
13/06/2013 00:24
Subject:
[DFDL-WG] DFDL
Expressions and hex literal constants
Sent by:
dfdl-wg-bounces@ogf.org
I haven't found a way in XPath to specify a hexadecimal integer number.
E.g., I want to write expressions like
{ if (../magicNum eq 0xa1b2c3d4) then 'bigEndian'
else if (.../magicNum eq 0xd4c3b2a1) then 'littleEndian'
else error()
}
But it rejects the 0x notation. Do I really have to write decimal everywhere?
When dealing with binary data this is a bit of a nightmare.
I think the above code is clear to anyone, but if I convert those numbers
to decimal it becomes completely obscure.
...mike
--
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com
--
dfdl-wg mailing list
dfdl-wg@ogf.org
https://www.ogf.org/mailman/listinfo/dfdl-wg
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU