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

Mike Beckerle mbeckerle.dfdl at gmail.com
Mon Jan 9 16:25:22 EST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20120109/ff4d36d2/attachment.html>


More information about the dfdl-wg mailing list