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

Mike Beckerle commented on DAFFODIL-1217:
-----------------------------------------

I believe we should not fix this. 

The DFDL work-group decided this issue is not an error. Sequential parser 
behavior - it must try one possiblity then another, and if there is ambiguity 
between the representation of an optional element and the alignment-fill region 
that would preceded the next term, then so be it. Users must author their 
schema so that these possibilities are decided in a specific order. 

Reliably issuing a warning for this situation is challenging. One must consider 
all contexts after an optional element which in the context of an element in a 
shared group can be many. 

I believe we should remove the offending test (Search for DFDL-1217) that is 
currently commented out, but which insists on this warning in a hard case. 

We should document in the code that this does NOT check for the situation where 
an optional element is followed not by a subsequent sibling, but by the end of 
an enclosing term, or multiple such ends. 

 

> Alignment test not appropriately issuing warning for optional occurrence.
> -------------------------------------------------------------------------
>
>                 Key: DAFFODIL-1217
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1217
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Diagnostics, Usability
>            Reporter: Taylor Wise
>            Priority: Major
>              Labels: verified
>             Fix For: 3.5.0
>
>
> The expected warning according to the test is the following:
> element.e is an optional element or a variable-occurrence array and its 
> alignment (2) is not the same as element.one's alignment (1)
> No error or warning is received.
> edu.illinois.ncsa.daffodil.section12.aligned_data  
> under the 'new' folder: test_alignmentOptionalElem03()



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

Reply via email to