[DFDL-WG] DFDL: TLOG proposal
Steve Hanson
smh at uk.ibm.com
Tue Jan 26 06:32:43 CST 2010
As per minutes from last week's call - here is proposal for TLOG after
more research.
TLOG
The individual fields are a mixture of ASCII strings, proprietary packed
decimals, and the occasional pure binary data. All fields are delimited by
a separator. Fields of all types can be fixed length or variable length
with a maximum. Pure binary data is preceded by a field giving the actual
length. All lengths in bytes.
Packed decimals. Like a packed decimal in the IBM sense. These can carry
negative numbers but use a leading xD sign nibble. No sign nibble if
positive or unsigned. Odd number of digits (including sign if present) are
padded with xF nibble. This is best illustrated using examples.
1234 => x12x34
123 => xF1x23
-1234 => xFDx12x34
-123 => xD1x23
Proposal
1) The 'variable length with a maximum' can not be handled using a
post-timing assertion, because assertions only apply on parsing. Given
that IBM MRM allows you to model this case, I think we should allow
dfdl:length & dfdl:lengthUnits to be specified when dfdl:lengthKind is
'delimited' or 'pattern'. Extraction during parse is still by scanning. If
the physical representation exceeds that length after extraction, it is a
processing error. Similarly when unparsing, if the physical representation
exceeds that length prior to output, it is a processing error.
2) dfdl:binaryNumberRep is extended with another value 'tlog'. Associated
property dfdl:binaryDecimalVirtualPoint is applicable. Associated property
dfdl:binaryPackedSignCodes is not applicable, there being only xD to
indicate negative numbers, and no distinct nibbles for unsigned or zero.
3) dfdl:lengthKind 'delimited' is permitted for numbers when
dfdl:representation is 'binary' and dfdl:binaryNumberRep is 'packed' or
'bcd' or 'tlog' because it is possible to know in advance the range of
bytes being used, and therefore to choose suitable delimiters.
Regards
Steve Hanson
Programming Model Architect, WebSphere Message Broker,
OGF DFDL WG Co-Chair,
Hursley, UK,
Internet: smh at uk.ibm.com,
Phone (+44)/(0) 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/20100126/7d6b3f44/attachment.html
More information about the dfdl-wg
mailing list