[DFDL-WG] DFDL Expressions and hex literal constants

Mike Beckerle mbeckerle.dfdl at gmail.com
Wed Jun 12 19:23:26 EDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130612/fbdddcbb/attachment.html>


More information about the dfdl-wg mailing list