[DFDL-WG] DFDL: Support for 'floating' elements - proposal

Steve Hanson smh at uk.ibm.com
Tue May 26 09:48:08 CDT 2009


For approval on this week's call. This property permits instances of 
specific elements to 'float' in the representation, as is found in some 
real-world formats such as X12, with its NTE segment.

Property
Description
floating
Boolean
Whether the occurrences of an element in a sequence can appear 
out-of-order in the representation. A value for dfdl:floating is only 
acted upon if the immediate parent is a sequence and 
dfdl:sequenceKind="ordered"; it is ignored otherwise.
When parsing, and dfdl:floating is true, instances of the element may be 
encountered in the representation in any position within its containing 
sequence, but, if present, are placed into the infoset in schema 
declaration order. If the element repeats, instances do not need to be 
contiguous in the representation. 
When parsing, and dfdl:floating is false, instances of the element are 
expected in schema declaration order, and, if present, they are placed 
into the infoset in schema declaration order. It is a processing error if 
instances of the element are not encountered in schema declaration order.
When unparsing, instances of the element are expected in the infoset in 
schema declaration order, and are output in the representation in schema 
declaration order. It is a processing error if instances of the element 
are not encountered in schema declaration order,
It is a schema definition error if a sequence contains elements with 
dfdl:floating="true" and non-element content.
Annotation: dfdl:element on a simple or complex local element or element 
reference

Notes:
a) It should be clarified in the spec that the instances of a repeating 
element in an unordered sequence do not need to be contiguous either. This 
is in keeping with the behaviour of xs:all groups in XML Schema 1.1. 

b) The consequence of the above statements of behaviour is that an ordered 
sequence of n element children and at least n-1 children with 
dfdl:floating="true" is equivalent to an unordered sequence with the same 
n element children.  (This is deliberate design decision to aid 
consumability.)

c) A complex element with dfdl:floating="true" can have as its content 
model a sequence with elements that also have dfdl:floating="true".

d) This makes every element in a sequence containing one or more floating 
elements a point of uncertainty, in the same way as every element in an 
unordered sequence is a point of uncertainty. 

e) dfdl:floating is not allowed on a global element to be consistent with 
what we decided about occurs related properties, which only come into play 
when an element is used.

Regards

Steve Hanson
Programming Model Architect
WebSphere Message Brokers
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/20090526/eadacc82/attachment.html 


More information about the dfdl-wg mailing list