[DFDL-WG] 13.7.1.1 Converting Base-2 Binary Numbers (updated)

Steve Hanson smh at uk.ibm.com
Thu Dec 4 07:02:45 EST 2014


Converting Base-2 Binary Numbers
For both parsing and unparsing, the bit string that represents the content 
region for a base-2 binary number is converted to/from an Infoset value by 
a calculation that involves the length and the dfdl:byteOrder property.
For unparsing, the dfdl:fillByte property can also be involved. 
When parsing, DFDL specifies how an unsigned integer of unbounded 
magnitude is computed from a bit string based on its length, and the 
dfdl:byteOrder property. For signed types, this  unbounded integer is 
converted into a signed value by way of the well-known twos-complement 
scheme, and for the xs:decimal type, the dfdl:binaryDecimalVirtualPoint 
property can be used to convert this integer into a decimal value with an 
integer and a fractional component, and for both xs:decimal and the 
integer types the dfdl:binaryVirtualDecimalPoint or to scale up the 
integer by some scale factor.
1) Why is the fill byte involved here?  We are creating a two's complement 
value of a particular length. There is no filling going on.
2) Should this now also mention dfdl:bitOrder?
3) BDVP is only used for xs:decimal so the final clause of the last 
paragraph should not include integer types.


Regards
 
Steve Hanson
Architect, IBM DFDL
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848
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/20141204/d0e21a22/attachment.html>


More information about the dfdl-wg mailing list