It goes beyond the applicability of that
one property. That's what my point 2) below is exploring. If we say that
an element can never have an empty rep then (for example) it can never
be assigned a default value on parsing. I am asking the WG to check whether
there are any gotchas here.
Regards
Steve Hanson
Architect, IBM
DFDL
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@uk.ibm.com
tel:+44-1962-815848
From:
Tim Kimber/UK/IBM
To:
Steve Hanson/UK/IBM@IBMGB
Cc:
Mike Beckerle <mbeckerle.dfdl@gmail.com>,
DFDL-WG <dfdl-wg@ogf.org>
Date:
18/11/2014 21:49
Subject:
Re: [DFDL-WG]
Action 272: Catch 22.for EVDP & NVDP ?
Intuitively, if an element cannot have
an empty value then a property with name 'Empty value delimiter policy'
cannot apply to it. I must be missing something, but I don't know what
it is. Can you supply some examples to illustrate the edge cases?
regards,
Tim Kimber,
From:
Steve Hanson/UK/IBM@IBMGB
To:
Mike Beckerle <mbeckerle.dfdl@gmail.com>
Cc:
DFDL-WG <dfdl-wg@ogf.org>
Date:
18/11/2014 17:49
Subject:
Re: [DFDL-WG]
Action 272: Catch 22.for EVDP & NVDP ?
Sent by:
dfdl-wg-bounces@ogf.org
Review for next call please.
Regards
Steve Hanson
Architect, IBM
DFDL
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@uk.ibm.com
tel:+44-1962-815848
From: Steve
Hanson/UK/IBM
To: Mike
Beckerle <mbeckerle.dfdl@gmail.com>, DFDL-WG <dfdl-wg@ogf.org>
Date: 28/10/2014
14:48
Subject: Re:
[DFDL-WG] Catch 22.for EVDP & NVDP ?
Thinking through the implications of having EVDP not apply if content length
can not be zero:
1) Cases are dfdl:lengthKind 'explicit', dfdl:length not an expression
and not zero, and (simple only) dfdl:lengthKind 'implicit' and maxLength
facet not zero.
2) Does it mean a) that there is no concept of an empty representation,
or b) that there is but it is not subject to EVDP and 'effective' EVDP
is 'none' ?
- If b) that does not fix the issue around
initiatedContent,
- if a) it means not finding the element must
be taken as missing which implies no default value can be applied.
Hmm
3) What about NVDP ? Should we be disallowing the use of %ES; as a nil
value for these cases as well ?
Regards
Steve Hanson
Architect, IBM
DFDL
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@uk.ibm.com
tel:+44-1962-815848
From: Steve
Hanson/UK/IBM
To: Mike
Beckerle <mbeckerle.dfdl@gmail.com>
Cc: "dfdl-wg@ogf.org"
<dfdl-wg@ogf.org>
Date: 17/09/2014
15:44
Subject: Re:
[DFDL-WG] Catch 22.for EVDP & NVDP ?
Having thought this through I think that you are correct. If the content
length can never be 0 then EVDP does not apply. I think IBM DFDL
is issuing an error when it should not be.
Regards
Steve Hanson
Architect, IBM
DFDL
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@uk.ibm.com
tel:+44-1962-815848
From: Mike
Beckerle <mbeckerle.dfdl@gmail.com>
To: Steve
Hanson/UK/IBM@IBMGB,
Cc: "dfdl-wg@ogf.org"
<dfdl-wg@ogf.org>
Date: 09/09/2014
15:37
Subject: Re:
[DFDL-WG] Catch 22.for EVDP & NVDP ?
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
On Tue, Sep 2, 2014 at 10:31 AM, Steve Hanson <smh@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
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@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@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
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
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@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