You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@daffodil.apache.org by "Costello, Roger L." <co...@mitre.org> on 2019/09/02 20:11:06 UTC
Why isn't the innermost delimiter tried first?
Hello DFDL community,
[cid:image001.png@01D561A9.0526BDD0]
[cid:image002.png@01D561A9.0526BDD0]
Re: Why isn't the innermost delimiter tried first?
Posted by "Beckerle, Mike" <mb...@tresys.com>.
Your schema fails to parse because you have two delimiters, a terminator AND a separator, but your data only has the terminator. The separator is missing.
terminators and separators aren't alternatives to each other. If an element has a terminator then that terminator must be present (your comma), but after that terminator, the sequence separator must be found (newline)
Your data needs to be
HiCRLF
hello,CRLF
world
The situation where there is ambiguity that the DFDL spec is dealing with in that section, would be this:
<sequence dfdl:separator="|">
<element name="a" maxOccurs="unbounded"..../>
<sequence dfdl:separator="|">
<element name="b" maxOccurs="unbounded" />
</sequence>
<element name="c" maxOccurs="unbounded".../>
</sequence>
So this data: 1|2|3
is <b>1</b><b>2</b><b>3</b>
because the inner and outer delimiters are the same length, so the inner one "wins".
This is a terrible format of course, but we had to have a deterministic behavior for DFDL in these otherwise ambiguous cases, so longest match wins, and on ties, inner wins.
________________________________
From: Costello, Roger L. <co...@mitre.org>
Sent: Monday, September 2, 2019 4:11 PM
To: users@daffodil.apache.org <us...@daffodil.apache.org>
Subject: Why isn't the innermost delimiter tried first?
Hello DFDL community,
[cid:image001.png@01D561A9.0526BDD0]
[cid:image002.png@01D561A9.0526BDD0]