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

Steve Lawrence commented on DAFFODIL-2801:
------------------------------------------

Additional information, with a potential workaround.

Mentioned before, the difference is that with OCK "implicit" the array is 
considered Positional, whereas with "parsed" it is considered NonPositional. 
Based on the combination of potentially trailing (false), is declared last 
(false), separatorSuppressionPolicy (trailingEmpty), and maxOccurs (3), 
Positional is the correct type for this array.

https://github.com/apache/daffodil/blob/main/daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/primitives/SequenceChild.scala#L135-L160

Of those properties, the only one we can change is 
separatorSuppressionPolicy--if you change it to "anyEmpty", you will then get a 
NonPositional array and it will work as expected.

I'm still not convinced things are working correctly, but that might be a 
workaround.

> 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