[ https://issues.apache.org/jira/browse/DAFFODIL-2036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Adams resolved DAFFODIL-2036. ---------------------------------- Resolution: Fixed Assignee: Dave Thompson (was: Josh Adams) Fix Version/s: 2.3.0 This has been resolved in commit dfc40612d27eb891bb8bcad7fc2c653413187d78 > poor diagnostic - choice with sequences as branches with all optional content. > ------------------------------------------------------------------------------ > > Key: DAFFODIL-2036 > URL: https://issues.apache.org/jira/browse/DAFFODIL-2036 > Project: Daffodil > Issue Type: Bug > Components: Middle "End" > Affects Versions: 2.2.0 > Reporter: Michael Beckerle > Assignee: Dave Thompson > Priority: Major > Fix For: 2.3.0 > > > Suppose you have this choice: > <choice> > <sequence> > <element name="x" ... minOccurs="0"/> > </sequence> > <sequence> > <element name="y" ... minOccurs="0"/> > </sequence> > </choice> > <element name="foo" .../> > You get an SDE with this message: > Schema Definition Error: UPA violation. Multiple choice branches begin with > {http://example.com}foo > Note that elements with dfdl:outputValueCalc cannot be used to distinguish > choice branches. > The offending choice branches are: > sequence[1] at Location in file:/tmp/s1_5963264522094411444.dfdl.xsd > sequence[2] at Location in file:/tmp/s1_5963264522094411444.dfdl.xsd > This occurs because the two branches of the choice meet the letter of the law > by bing sequences which are considered "required", but as their content is > all optional and they have no framing, they are conceptually optional. > So there's really no way to look at the infoset and decide which arm of the > choice. > The error here should be that the content of a choice branch is entirely > optional which isn't allowed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)