[ 
https://issues.apache.org/jira/browse/DAFFODIL-2801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699836#comment-17699836
 ] 

Mike Beckerle commented on DAFFODIL-2801:
-----------------------------------------

Hmmm.

First, the sequence inside the definition of arre1 is unnecessary and in fact 
doesn't do anything as it contains only 1 term, which is a choice. So its 
separator is never considered. We should remove it and make sure the behavior 
does not change before we do anything else.

Next....

DFDL spec section 14.2.2 says: "When dfdl:occursCountKind is 'parsed' any 
number of occurrences and their separators are expected. The 
dfdl:separatorSuppressionPolicy of the sequence {*}_must be 'anyEmpty' and it 
is a Schema Definition Error otherwise._{*}"

We're not checking this. So that's one bug. (Note: This bug may cause backward 
compatibility issues when fixed.)

So let's imagine we were enforcing this. That means the 'parsed' flavor with 
root element e1, is illegal, so we have to figure out how to make the other one 
with root element e2 work. 

I think we need to try this: element arre1 must be surrounded in its own 
sequence with infix separator "/". Then we can try giving that sequence SSP 
'trailingEmpty' vs. "anyEmpty' and see what changes. 

 

 

 

 

 

 

> Array with Choice parses incorrectly when occursCountKind is implicit
> ---------------------------------------------------------------------
>
>                 Key: DAFFODIL-2801
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2801
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 3.4.0
>            Reporter: Olabusayo Kilo
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 3.5.0
>
>         Attachments: TestImplicitvParsed.scala, implicitvparsed.tdml
>
>
> When an inner array with an infix separator (contained in a sequence with a 
> prefix separator) has a choice within it and is occurs count kind implicit, 
> it's unable to correctly backtrack and find the separator and fails with a 
> separator not found. The exact same scenario with the OCK set to parsed, 
> works as expected. Attached are the tdml files.
> Tested with 3.4.0 and 3.5.0 snapshot.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to