[DFDL-WG] spec clarification needed: is dfdl:terminator='{ ...returns empty string ... }' allowed?

Steve Hanson smh at uk.ibm.com
Tue Jan 10 11:52:19 EST 2012


Hi Mike

As will be minuted, we agreed on the WG call today that we disallow 
expressions that return empty string for properties where empty string 
turns off the property. Please can you take a look through the spec and 
see if any properties other than initiator, terminator, separator are 
impacted, then I can complete the errata.

(I would expect that inputValueCalc and outputValueCalc are not affected 
by this errata, as empty string is a legal value for the element in 
question if it is of type xs:string).

Regards

Steve Hanson
Architect, Data Format Description Language (DFDL)
Co-Chair, OGF DFDL Working Group
IBM SWG, Hursley, UK
smh at uk.ibm.com
tel:+44-1962-815848



From:   Mike Beckerle <mbeckerle.dfdl at gmail.com>
To:     dfdl-wg at ogf.org
Date:   10/01/2012 08:06
Subject:        [DFDL-WG] spec clarification needed: is dfdl:terminator='{ 
...returns empty string ... }' allowed?
Sent by:        dfdl-wg-bounces at ogf.org




Let's use the example of terminator as a delimiter.

If I provide an expression so that I can compute terminator at runtime, is 
it allowed to return empty string? I.e., equivalent to writing 
dfdl:terminator="" which is effectively "turning off" use of terminator?

It seems very problematic to me if we allow this.  Nor do I think this 
generality is needed. 

We should clarify that for initiator/terminator/separator, if a runtime 
expression is used, then it must return at least one non-zero-length 
value. So using a runtime expression for a delimiter is effectively saying 
"yes there will be a delimiter", you are just not binding its specific 
value. 

I believe this runtime expression capability for delimiters was intended 
to allow the choice of the specific delimiter to be made based on data 
containing the value. This is common practice in data formats.

However, turning on/off whether delimiters are present or not, is not 
something I anticipated, and it has far bigger implications for the 
format. I mean you really can't decide much about the data format 
statically if even the existence of delimiters as part of the format or 
not can be postponed to runtime. 

Comments?

-- 
Mike Beckerle | OGF DFDL WG Co-Chair 
Tel:  781-330-0412
--
  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/20120110/8f239b8f/attachment.html>


More information about the dfdl-wg mailing list