This is bug https://issues.apache.org/jira/browse/DAFFODIL-2345 open since
Daffodil 2.6.0.

I bumped up the priority, and assigned it (wishfully) to the next release
(3.7.0).

On Tue, Nov 7, 2023 at 9:08 AM Roger L Costello <coste...@mitre.org> wrote:

> I have input containing a series of lines separated by newlines. Each line
> contains fields separated by slashes. Here is a sample input:
>
>
>
> .../24L-36R/...
> .../24L    /...
> .../   -   /...
>
>
>
> Actually, I got the input from a Word document, i.e., I copied from Word
> and pasted into a .txt file. Here’s what I pasted:
>
>
>
> …/24L-36R/…
> …/24L    /…
> …/   -   /…
>
>
>
> Eek! See the problem? (I didn’t see the problem for a long time) Instead
> of the first and third fields containing three dots, they contain the
> Microsoft ellipses symbol. Okay, my bad. Nonetheless, I expect Daffodil to
> tell me that I have bogus symbols in the input. But Daffodil doesn’t do
> that. Daffodil sent me on a wild goose chase. Daffodil gave this error
> message:
>
>
>
> *[error] Parse Error: Failed to populate Line[1]. Cause: Parse Error:
> Failed to parse infix separator. Cause: Parse Error: Found out of scope
> delimiter: '%NL;' '?'*
>
>
>
> *That is a horrible error message!* It is completely misleading.
> Completely wrong. I spent a huge amount of time trying to understand, “*How
> in the world is the newline separator out of scope*?”
>
>
>
> Can this be fixed please? I.e., can Daffodil provide a more useful error
> message please?
>
>
>
> Here is an excerpt from my DFDL schema:
>
>
>
>     <xs:element name="Test">
>         <xs:complexType>
>             <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition=
> "infix">
>                 <xs:element name="Line" maxOccurs="unbounded">
>                     <xs:complexType>
>                         <xs:sequence dfdl:separator="/"
> dfdl:separatorPosition="infix">
>                             <xs:element name="A" type="xs:string" />
>                             <xs:element ref="RunwayDesignator"
>                                         dfdl:lengthKind="explicit"
>                                         dfdl:length="7"/>
>                             <xs:element name="B" type="xs:string" />
>                         </xs:sequence>
>                     </xs:complexType>
>                 </xs:element>
>             </xs:sequence>
>         </xs:complexType>
>     </xs:element>
>
>
>

Reply via email to