[DFDL-WG] dfdl:lengthKind='prefixed' question

Steve Hanson smh at uk.ibm.com
Tue Mar 13 06:01:25 EDT 2012


Hi Alex

So the issue is that the spec does not state the rules that must apply for 
prefixIncludesPrefixLength to be validly "true". I will raise on DFDL-WG 
call today.

Regards

Steve Hanson
Architect, 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:   Alex Wood1/UK/IBM
To:     Steve Hanson/UK/IBM at IBMGB
Cc:     Tim Kimber/UK/IBM at IBMGB
Date:   12/03/2012 17:00
Subject:        dfdl:lengthKind='prefixed' question


Hi Steve,

I'm working on the dfdl:lengthKind='prefixed' support for the serializer.
Come up against an issue which I think needs clarification in the spec.

Imagine this scenario...

<xs:element name="myString" type="xs:string"
                        dfdl:lengthKind="prefixed"
                        dfdl:lengthUnits="characters"
                        dfdl:prefixIncludesPrefixLength="true"
                        dfdl:prefixLengthType="lengthType"/>
<xs:simpleType name="lengthType"
                        dfdl:representation="binary"
                        dfdl:binaryNumberRep ="packed"
                        dfdl:lengthKind="explicit"
                        dfdl:length="2" >
        <xs:restriction base="integer" />
</xs:simpleType>

or  this one... 

<xs:element name="myString" type="xs:string"
                        dfdl:lengthKind="prefixed"
                        dfdl:lengthUnits="characters"
                        dfdl:prefixIncludesPrefixLength="true"
                        dfdl:prefixLengthType="lengthType"/>
<xs:simpleType name="lengthType"
                        dfdl:representation="text"
                        dfdl:lengthUnits="bytes"
                        dfdl:lengthKind="explicit"
                        dfdl:length="2" >
        <xs:restriction base="integer" />
</xs:simpleType>

So the issue is how do we calculated an inclusive length (prefix+element) 
in characters when the length of prefixLengthType cannot be defined in 
characters.




Kind Regards,

- Alex

Alex Wood - 
Software Engineer - 
WebSphere Message Broker Development
Lab Advocate - PMI Mortage 

MP 211, IBM UK Labs, Hursley Park, Winchester, Hants. SO21 2JN.
Tel: Internal 246272, External 01962 816272
Notes: Alex Wood1/UK/IBM at IBMGB
e-mail: wooda at uk.ibm.com







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/20120313/6697e7b5/attachment.html>


More information about the dfdl-wg mailing list