You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Dave Thompson (JIRA)" <ji...@apache.org> on 2018/01/24 14:56:00 UTC

[jira] [Closed] (DAFFODIL-1773) Choice ambiguous element name results in failed expression

     [ https://issues.apache.org/jira/browse/DAFFODIL-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Thompson closed DAFFODIL-1773.
-----------------------------------

Verified the latest updates from the incubator-daffodil repository included the specified commit, 02c8324294ed4395c1231c6ea3ec6ae77139ba46.

Verified the specified tests execute successfully.

 

 

> Choice ambiguous element name results in failed expression
> ----------------------------------------------------------
>
>                 Key: DAFFODIL-1773
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1773
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Middle &quot;End&quot;
>            Reporter: Michael Beckerle
>            Assignee: Dave Thompson
>            Priority: Major
>             Fix For: 2.1.0
>
>
> (Bug found in Link16 work. Reproduced in tests test_choiceSlotAmbiguous1 and test_choiceSlotAmbiguous2)
> Consider this choice:
> {code:java}
> <xs:choice>
> ������������������������������ <xs:sequence>
> ���������������������������������� <xs:element name="A" type="xs:string" dfdl:length="1" />
> ���������������������������������� <xs:element name="C" type="xs:string" dfdl:length="1">
> �������������������������������������� <xs:annotation>
> ������������������������������������������ <xs:appinfo source="http://www.ogf.org/dfdl">
> ���������������������������������������������� <dfdl:discriminator>{ ../A eq "A" }</dfdl:discriminator>
> ������������������������������������������ </xs:appinfo>
> �������������������������������������� </xs:annotation>
> ���������������������������������� </xs:element>
> ������������������������������ </xs:sequence>
> ������������������������������ <xs:sequence>
> ���������������������������������� <xs:element name="B" type="xs:string" dfdl:length="1" />
> ���������������������������������� <xs:element name="C" type="xs:string" dfdl:length="1">
> �������������������������������������� <xs:annotation>
> ������������������������������������������ <xs:appinfo source="http://www.ogf.org/dfdl">
> ���������������������������������������������� <dfdl:discriminator>{ ../B eq "B" }</dfdl:discriminator>
> ������������������������������������������ </xs:appinfo>
> �������������������������������������� </xs:annotation>
> ���������������������������������� </xs:element>
> ������������������������������ </xs:sequence>
> �������������������������� </xs:choice>{code}
> Now imagine a subsequent expression containing ../C.
> Which C is that? The first or second. Answer is it depends on which discriminator was chosen.
> If the first discriminator is true, then the path ../C succeeds. If the second discriminator was true the path ../C fails with no such element C.
> This is probably due to Daffodil's schema compiler assigning two different slot numbers to these two C elements, rather than recognizing they have the same name+namespace and so using a single slot for them.
> ��



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)