[DFDL-WG] Can I specify a terminator for the last element in a sequence?

Steve Hanson smh at uk.ibm.com
Mon Jun 24 13:18:55 EDT 2013


Yes, you treat the terminator as belonging to the sequence. 

<xsd:sequence dfdl:separator="some-separator-here” 
dfdl:separatorSuppressionPolicy="anyEmpty" dfdl:separatorPosition="prefix"
                        dfdl:terminator="some-terminator-here”>
                        <xsd:element name="BodyPart" 
                                    dfdl:lengthKind="delimited" minOccurs=
"1" maxOccurs="unbounded" type="xsd:string" dfdl:occursCountKind=
"implicit"/>
            </xsd:sequence>

Regards

Steve Hanson
Architect, IBM 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:   "Garriss Jr., James P." <jgarriss at mitre.org>
To:     "dfdl-wg at ogf.org" <dfdl-wg at ogf.org>, 
Date:   24/06/2013 18:08
Subject:        [DFDL-WG] Can I specify a terminator for the last element 
in a    sequence?
Sent by:        dfdl-wg-bounces at ogf.org



I have a repeating element, one that can occur 1 to unbounded times.  The 
elements are separated by a prefixed separator, like so:
 
<xsd:sequence dfdl:separator="some-separator-here” 
dfdl:separatorSuppressionPolicy="anyEmpty" dfdl:separatorPosition="prefix"
>
                        <xsd:element name="BodyPart" 
                                    dfdl:lengthKind="delimited" minOccurs=
"1" maxOccurs="unbounded" type="xsd:string" dfdl:occursCountKind=
"implicit"/>
            </xsd:sequence>
 
The last element (and only the last element) has a terminator.  Is there a 
way in DFDL to specify that final terminator?--
  dfdl-wg mailing list
  dfdl-wg at ogf.org
  https://www.ogf.org/mailman/listinfo/dfdl-wg

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/20130624/8e2519b0/attachment.html>


More information about the dfdl-wg mailing list