clarification needed: choice children have separator from surrounding sequence or not?
Consider this textual delimited DFDL schema fragment: <sequence dfdl:separator="/" dfdl:separatorPosition="prefix"> <element name="a" type="xs:string"/> <choice dfdl:initiator="(" dfdl:terminator=")"> <element name="foo" maxOcccurs="10" type="xs:int" dfdl:occursCountKind="parsed" dfdl:terminator=";"/> <element name="bar" type="xs:string" /> </choice> </sequence> Is the separator of the enclosing sequence expected to appear before 'foo' and 'bar' elements inside the choice? If you consider this data '/abc/(/1;/2;/3;/4;)' versus this data '/abc/(1;2;3;4;)' We have to have the / after the abc to find the end of element 'a'. The choice's initiator won't be used as terminating markup. However, then when we have instances of the children of the choice like 'foo' elements, do those have the prefix separator / inherited from the surrounding sequence outside the choice, or do they behave as if surrounded by an inner implied sequence which has no separator? I'm convincing myself that the latter must be the interpretation, but I wanted to see what others think. ...mikeb -- Mike Beckerle | OGF DFDL WG Co-Chair | Tresys Technologies Tel: 781-330-0412
Mike, it's the latter interpretation that is correct. A separator
separates the occurrences of the direct child components of the sequence.
So your schema models '/abc/(1;2;3;4;)' and my schema models
'/abc/(/1;/2;/3;/4;)':
<sequence dfdl:separator="/" dfdl:separatorPosition="prefix">
<element name="a" type="xs:string"/>
<choice dfdl:initiator="(" dfdl:terminator=")">
<sequence dfdl:separator="/" dfdl:separatorPosition="prefix">
<element name="foo" maxOcccurs="10" type="xs:int"
dfdl:occursCountKind="parsed" dfdl:terminator=";"/>
</sequence>
<element name="bar" type="xs:string" />
</choice>
</sequence>
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: Mike Beckerle
participants (2)
-
Mike Beckerle
-
Steve Hanson