[
https://issues.apache.org/jira/browse/DAFFODIL-2296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063495#comment-17063495
]
Mike Beckerle commented on DAFFODIL-2296:
-----------------------------------------
This change was motivated by failures in the VMF schema which has choices that
function like this:
{code:java}
<choice>
<sequence>
<sequence dfdl:hiddenGroupRef="PI_true"/>
<sequence>
<element name="foo" minOccurs="0" ...../>
<element name="bar" minOccurs="0" ..../>
</sequence>
<sequence dfdl:hiddenGroupRef="PI_false"/>
</choice>
{code}
PI_true and PI_false are presence indicator flags.
When unparsing, if you have element "foo" or "bar" in the infoset, then the
first branch is selected, and the PI_true flag is unparsed.
The problem is when neither "foo" nor "bar" is in the infoset. Note that both
are optional above.
In that case, we want the PI_false branch to be chosen.
So the change I made was to prefer a completely empty branch to a branch with
optional content, as the default branch.
I suppose one could require that these branches all be re-ordered to have the
PI_false branch first. That is a major backward-compatibility problem for us
however, so would need a flag, etc.
> 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)