
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@uk.ibm.com tel:+44-1962-815848 From: Alex Wood1/UK/IBM To: Steve Hanson/UK/IBM@IBMGB Cc: Tim Kimber/UK/IBM@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@IBMGB e-mail: wooda@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