The answer is that it depends on the delimiter. The rules are:

a)  a terminator is always required, unless it would have been last token in the data stream[1] AND documentFinalTerminatorCanBeMissing is 'yes'.
b) a prefix or infix separator is always required unless it has been suppressed, except that the final member of the group ( in the data stream ) will terminated by one of (EOF, separator or terminator from a parent component, end of fixed-length enclosing parent)  [2].
c) a postfix separator is always required unless it has been suppressed.

[1] where 'data stream' currently means 'the entire data stream' and never 'the scoped length of some parent element'
[2] this may sound like an arbitrary rule, but I don't think there is any other rational way to specify it. Consider a single-line document with an infix separator: how will the final element be terminated?

Hope that helps,

regards,

Tim Kimber, DFDL Team,
Hursley, UK




From:        Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:        dfdl-wg@ogf.org,
Date:        01/05/2013 15:05
Subject:        [DFDL-WG] when does lengthKind='delimited' accept EOF instead of a        terminator.
Sent by:        dfdl-wg-bounces@ogf.org





The exact semantics of lengthKind='delimited' are a little bit unclear to me.

Are there situations where we accept end-of-data as a substitute for finding a delimiter?

Consider this:

<element name="foo" type="xs:string" dfdl:lengthKind="delimited" dfdl:initiator="[START]" dfdl:terminator="[END]"/>

I think this string should always cause a processing error: "[START] some data ". That is, the [END] terminator is not present, instead one runs out of data.

So what exactly are the situations where delimited length kind will not find a delimiter, hit end-of-data, and be ok with it?

I understand that hitting end-of-data might cause a backtrack for resolving points of uncertainty, but is there ever a case where running out of data is accepted as a substitute for finding a delimiter? (I am hoping the answer here is no, but I am asking because I am not certain.)

--
Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
www.tresys.com
--
 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