The DFDL Spec says:
12.3.2 dfdl:lengthKind
'delimited'
On parsing, the length of an
element with dfdl:lengthKind 'delimited' is determined by scanning the
datastream for the delimiter.
The data stream is scanned for any of
·
the element's terminator (if specified)
·
an enclosing construct's separator or terminator
·
the end of an enclosing element designated by its known length
·
the end of the data stream
So if an element has a terminator, are the enclosing constructs' separator or terminator also relevant? Or is ONLY the element's own terminator relevant for scanning, and hence, only the element's own terminator must be escaped if it appears in the content.
For example, in a space-separated group, an enclosed element has a terminator ";". When parsing that element, do spaces have to be escaped if they appear in the content, or does only the terminator ";" have to be escaped?
Strictly speaking it seems enclosing delimiters shouldn't have to be escaped, because the data must have the ";", and spaces are only significant as separators after finding the ";" terminator.