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

Mike Beckerle commented on DAFFODIL-2296:
-----------------------------------------

Note that the DFDL Spec is ambiguous about this case:

The language in the current working draft is:
{quote}
h3. 15.1.3    Unparsing Choices

On unparsing there is the question of how one identifies the appropriate schema 
choice branch corresponding to the data in the infoset. This is complicated by 
the fact that the children may not be elements. They may themselves be 
sequences or choices.The selection of the choice branch is as follows: The 
element in the infoset is used to search the choice branches in the schema, in 
schema definition order, but without looking inside any complex elements. If 
the element occurs in a branch, then that branch is selected and if 
subsequently a processing error occurs, this selection is not revisited (that 
is, there is no backtracking).

To avoid any unintended behavior, all the children of a choice can be modeled 
as elements.
{quote}
This is not enough. The spec suggests that you have to have an actual, 
non-hidden element in each choice branch. We know there are many cases where we 
don't have this in real schemas. The design note: 
[https://s.apache.org/daffodil-experience-with-computed-elements] discusses 
unparsing choices (last thing in that note).

 

> NACHA failing some tests with "Abort: NadaUnparsers are all supposed to 
> optimize out"
> -------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2296
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2296
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Middle "End"
>    Affects Versions: 2.5.0
>            Reporter: Mike Beckerle
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 2.6.0
>
>
> On the 2.6.0 development branch, git hash: 
> 356291c3f5cbd82832bc68f7f573b292a46feb3d
> These two NACHA tests fail. NACHA is a DFDL schema published on github that 
> is portable to Daffodil and IBM DFDL.
> TestNACHA.test_ppd_valid_1
> TestNACHA.test_ccd_valid_1



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to