[DFDL-WG] DFDL Expressions and hex literal constants
Steve Hanson
smh at uk.ibm.com
Thu Jun 13 08:02:06 EDT 2013
So I think DFDL needs to add such functions to its list of functions in
23.5.3.
Regards
Steve Hanson
Architect, IBM Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848
From: Tim Kimber/UK/IBM at IBMGB
To: dfdl-wg at ogf.org,
Date: 13/06/2013 11:27
Subject: Re: [DFDL-WG] DFDL Expressions and hex literal constants
Sent by: dfdl-wg-bounces at ogf.org
XPath uses XML schema lexical formats for all simple types. The XML Schema
lexical format for an integer does not allow a hexadecimal option.
The standard solution is to create a pair of custom XPath functions that
convert between hex and decimal lexical formats. But that's not a viable
solution for a DFDL modeller because they cannot define custom XPath
functions.
regards,
Tim Kimber, DFDL Team,
Hursley, UK
Internet: kimbert at uk.ibm.com
Tel. 01962-816742
Internal tel. 37246742
From: Steve Hanson/UK/IBM at IBMGB
To: Mike Beckerle <mbeckerle.dfdl at gmail.com>,
Cc: dfdl-wg at ogf.org, dfdl-wg-bounces at ogf.org
Date: 13/06/2013 10:39
Subject: Re: [DFDL-WG] DFDL Expressions and hex literal constants
Sent by: dfdl-wg-bounces at ogf.org
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 at uk.ibm.com
tel:+44-1962-815848
From: Mike Beckerle <mbeckerle.dfdl at gmail.com>
To: dfdl-wg at ogf.org,
Date: 13/06/2013 00:24
Subject: [DFDL-WG] DFDL Expressions and hex literal constants
Sent by: dfdl-wg-bounces at 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 at 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
--
dfdl-wg mailing list
dfdl-wg at 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
--
dfdl-wg mailing list
dfdl-wg at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130613/1f978fb4/attachment.html>
More information about the dfdl-wg
mailing list