[DFDL-WG] Better way to model "empty"?
Garriss Jr., James P.
jgarriss at mitre.org
Fri May 31 09:11:57 EDT 2013
A return path email header can take two forms:
1. Plain email form: Return-path: <steve at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20130531/691c9e55/attachment-0001.html>
More information about the dfdl-wg
mailing list