[DFDL-WG] Catch 22.for EVDP & NVDP ?

Mike Beckerle mbeckerle.dfdl at gmail.com
Tue Sep 9 10:37:50 EDT 2014


Interesting.

To me if lengthKind is explicit, and non-variable (i.e., is fixed length),
then EVDP doesn't apply, because by definition, such a representation is
not ever empty.

I would assume that EVDP would be ignored in such a case, and an
implementation might even generate warnings if
dfdl:emptyValueDelimiterPolicy appeared directly on such an element or
simpleType where a fixed length is also expressed.

This is one of the challenges that having lengthKind 'explicit' which
handles both the fixed length, and variable-length using an expression,
creates. Even though we don't have a lengthKind 'fixed', we still have
fixed-length as a concept, and some other features interact with fixed
length, like empty values.


Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
www.tresys.com
Please note: Contributions to the DFDL Workgroup's email discussions are
subject to the OGF Intellectual Property Policy
<http://www.ogf.org/About/abt_policies.php>


On Tue, Sep 2, 2014 at 10:31 AM, Steve Hanson <smh at uk.ibm.com> wrote:

>         <xs:element name="choiceGroup" dfdl:lengthKind="implicit">
>                 <xs:complexType>
>                         <xs:choice dfdl:choiceLengthKind="implicit"
> dfdl:initiatedContent="yes">
>                                 <xs:element name="myNum1" type="xs:int"
>  dfdl:lengthKind="explicit"
>
> dfdl:length="2"
>
> dfdl:textNumberPattern="#0"
>
> dfdl:initiator="num:"
>
> dfdl:terminator="~" />
>                                                                  >
>                                 <xs:element name="myText1"
> type="xs:string" dfdl:lengthKind="explicit"
>
> dfdl:length="2"
>
> dfdl:initiator="text:"
>
> dfdl:terminator="~" />
>                         </xs:choice>
>                 </xs:complexType>
>         </xs:element>
>
> The above model is a choice of two elements, each of which is fixed length
> and has an initiator and terminator. Because the elements are fixed length,
> I must set dfdl:emptyValueDelimiterPolicy (EVDP) to be 'none' ****.  I
> also want to discriminate using the initiator, so I set
> dfdl:initiatedContent 'yes' on the choice, so I must set EVDP to
> 'initiator' or 'both' *++*.  (Same for NVDP if nillable). Catch 22.
>
> **** 'none' because the only valid empty representation is that there is
> nothing there at all. The element is fixed length X, so if the delimiters
> are present then the content must be length X and can't be zero length.
>
> *++* 'initiator' or 'both' because an initiator must always be present
> when dfdl:initiatedContent 'yes'.
>
> The implication is that I can't use dfdl:initiatedContent for this choice.
> While I can switch off nillable to avoid the error with NVDP, there is no
> other way of avoiding the EVDP error.
>
> Regards
>
> Steve Hanson
> Architect, *IBM DFDL*
> <http://www.ibm.com/developerworks/library/se-dfdl/index.html>
> Co-Chair, *OGF DFDL Working Group* <http://www.ogf.org/dfdl/>
> IBM SWG, Hursley, UK
> *smh at uk.ibm.com* <smh at uk.ibm.com>
> tel:+44-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
>
> --
>   dfdl-wg mailing list
>   dfdl-wg at ogf.org
>   https://www.ogf.org/mailman/listinfo/dfdl-wg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20140909/094ad049/attachment-0001.html>


More information about the dfdl-wg mailing list