[DFDL-WG] Clarification for nil processing and zero length
Steve Hanson
smh at uk.ibm.com
Wed May 11 03:45:13 EDT 2016
Issue raised: https://redmine.ogf.org/issues/309
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: Mike Beckerle <mbeckerle.dfdl at gmail.com>
To: Steve Hanson/UK/IBM at IBMGB
Cc: DFDL-WG <dfdl-wg at ogf.org>
Date: 04/03/2016 14:59
Subject: Re: [DFDL-WG] Clarification for nil processing and zero
length
My read of 13.16 says that for nilKind 'literalValue' and textual
representation, WSP* is already allowed for simple types. So I think
nilValue="%WSP*;" should work and match empty string.
Delimiters have qualifiers on ES alone and WSP* alone e.g., for separator:
"However, the WSP* entity cannot appear on its own as one of the string
literals in the list when determining the length of a component by
scanning for delimiters, , and it is a schema definition error otherwise.
delimiters"
(Note the fragment at the end of that sentence. That's a spec. bug)
But I see no such stipulation for nilValue.
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 Fri, Mar 4, 2016 at 6:35 AM, Steve Hanson <smh at uk.ibm.com> wrote:
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
--
dfdl-wg mailing list
dfdl-wg at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20160511/24a25dcd/attachment.html>
More information about the dfdl-wg
mailing list