'bits' may only be used for xs:boolean, xs:byte, xs:short, xs:int, xs:long, xs:unsignedByte, xs:unsignedShort, xs:unsignedInt, and xs:unsignedLong simple types with representation 'binary'.
This is permitting binary numbers with
dfdl:binaryNumberRep 'packed', 'bcd' and 'ibm4690Packed' to have dfdl:lengthUnits
'bits'. That could make sense, as one could have an odd number of nibbles
packed into the minimum space possible - eg a BCD range 000-999 could occupy
12 bits.
However, the words that have been added
for errata 2.90 (allowing signed number types to have lengthUnits 'bits')
to both the description of dfdl:lengthUnits and section 12.3.7.2 have assumed
that only binaryNumberRep 'binary' is allowed.
I tested IBM DFDL with 12-bit 'packed'
and 'bcd' reps packed back-to-back with bit alignment and it parsed them
ok, but gave an error when serializing, saying that binaryNumberRep must
be 'binary'. Clearly incorrect because of the inconsistency, but
what is the intent of the spec here?
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
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