[DFDL-WG] Clarification for nil processing and zero length
Steve Hanson
smh at uk.ibm.com
Fri Mar 4 08:14:01 EST 2016
No, because for a complex element to be nil the only allowable value is
empty string, so WSP* is too permissive.
Regards
Steve Hanson
IBM Integration Bus, Hursley, UK
Architect, IBM DFDL
Co-Chair, OGF DFDL Working Group
smh at uk.ibm.com
tel:+44-1962-815848
mob:+44-7717-378890
From: Andrew Edwards/UK/IBM
To: Steve Hanson/UK/IBM at IBMGB
Cc: Alex Wood1/UK/IBM at IBMGB, Mark Frost/UK/IBM at IBMGB, dfdl-wg at ogf.org
Date: 04/03/2016 13:06
Subject: Re: Clarification for nil processing and zero length
I agree with the proposed change. Would it also apply to 9.3.2.2 for
complex elements? That has very similar words.
Cheers,
Andy Edwards
Software Engineer
E-mail: andy.edwards at uk.ibm.com
Snail-mail: MP211, Hursley park, Hursley, WINCHESTER, Hants, SO21 2JN
Phone (internal): 247222
Phone (external): 44-1962-817222
Desk: DE3 F16
The Feynman problem solving Algorithm:
1) Write down the problem
2) Think real hard
3) Write down the answer
-- Murray Gell-mann in the NY Times
----- Original message -----
From: Steve Hanson/UK/IBM
To: DFDL-WG <dfdl-wg at ogf.org>
Cc: Alex Wood1/UK/IBM at IBMGB, Andrew Edwards/UK/IBM at IBMGB, Mark
Frost/UK/IBM
Subject: Clarification for nil processing and zero length
Date: Fri, Mar 4, 2016 11:35 AM
The DFDL 1.0 spec current says:
9.3.2.1 Simple element
If the result is length zero as described above, the representation is
then established by checking, in order for:
1. nil representation (if %ES; is a literal nil value).
2. empty representation.
3. normal representation (xs:string or xs:hexBinary only)
4. absent representation (if none of the prior representations apply).
But should bullet 1 be:
1. nil representation (if either %ES; or %WSP*; on its own is a literal
nil value).
I added a test to IBM DFDL and found that setting
dfdl:nilKind="literalValue" & dfdl:nilValue="%WSP*;" did not match an
element value of empty string. That surprised me, and I think the IBM DFDL
code is strictly implementing bullet 1. Using "%WSP*;" is useful for
allowing zero or more white space to mean <nil>. I could use "%WSP+; %ES"
to achieve the same goal but I'm not sure that was the intent here.
Quick response appreciated.
Regards
Steve Hanson
IBM Integration Bus, Hursley, UK
Architect, IBM DFDL
Co-Chair, OGF DFDL Working Group
smh at uk.ibm.com
tel:+44-1962-815848
mob:+44-7717-378890
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/20160304/67dcd496/attachment-0001.html>
More information about the dfdl-wg
mailing list