It boils down to what you want to appear in the infoset.  If you want an element with a different name to appear for ease of identifying 'empty' then use #1.  Otherwise use #2.  I can't tell from just the snippet you sent, but depending on what level you have defined your initiator & terminator, <> for #2 will either result in nothing being added to the infoset, or PlainEmail being added.

Regards

Steve Hanson
Architect, IBM Data Format Description Language (DFDL)
Co-Chair,
OGF DFDL Working Group
IBM SWG, Hursley, UK

smh@uk.ibm.com
tel:+44-1962-815848




From:        "Garriss Jr., James P." <jgarriss@mitre.org>
To:        "dfdl-wg@ogf.org" <dfdl-wg@ogf.org>,
Date:        31/05/2013 14:15
Subject:        [DFDL-WG] Better way to model "empty"?
Sent by:        dfdl-wg-bounces@ogf.org




A return path email header can take two forms:
 
1.     Plain email form:        Return-path: <steve@tresys.com>
2.     Empty form:               Return-path: <>
 
I’ve found 2 different ways to model this:
 
#1 – with a choice
 
                        <xsd:choice>
                                    <xsd:element name="Empty" type="xsd:string" dfdl:lengthKind="explicit" dfdl:length="0"/>
                                    <xsd:element name="PlainEmail" type="PlainEmail"/>
                        </xsd:choice>
 
#2 – with min/maxOccurs
 
                        <xsd:element name="PlainEmail" type="PlainEmail" minOccurs="0" maxOccurs="1" dfdl:occursCountKind="implicit"/>
 
When I’m faced with selecting one of these implementations over another, how do I think?  What criteria should I be using?
 
Is there another, better way that I haven’t even thought of?
 
TIA--
 dfdl-wg mailing list
 dfdl-wg@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