You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2019/06/20 19:48:00 UTC
[jira] [Commented] (DAFFODIL-2162) direct dispatch choice that has
an array branch causes abort during compilation
[ https://issues.apache.org/jira/browse/DAFFODIL-2162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16868880#comment-16868880 ]
Michael Beckerle commented on DAFFODIL-2162:
--------------------------------------------
Yup. Has to be changes I recently added to get EDIFACT initiatedContent discriminators to work.
I'll look into this.
> direct dispatch choice that has an array branch causes abort during compilation
> -------------------------------------------------------------------------------
>
> Key: DAFFODIL-2162
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2162
> Project: Daffodil
> Issue Type: Bug
> Components: Front End
> Reporter: Steve Lawrence
> Assignee: Michael Beckerle
> Priority: Blocker
> Fix For: 2.4.0
>
>
> This schema has a direct dispatch where a choice branch is an array:
> {code:xml}
> <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd" />
> <xs:annotation>
> <xs:appinfo source="http://www.ogf.org/dfdl/">
> <dfdl:format ref="ex:GeneralFormat"
> lengthKind="implicit"
> representation="binary" />
> </xs:appinfo>
> </xs:annotation>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="index" type="xs:int" />
> <xs:choice dfdl:choiceDispatchKey="{ xs:string(./index) } ">
> <xs:element name="values1" type="xs:int" minOccurs="1" maxOccurs="2" dfdl:choiceBranchKey="1" />
> <xs:element name="values2" type="xs:int" dfdl:choiceBranchKey="2" />
> </xs:choice>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> {code}
> {quote}
> org.apache.daffodil.exceptions.Abort: Not to be called on choice branches.
> org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
> org.apache.daffodil.exceptions.Assert$.usageError(Assert.scala:117)
> org.apache.daffodil.dsom.ChoiceBranchImpliedSequence.emptyFormatFactory(SequenceGroup.scala:413)
> org.apache.daffodil.dsom.AnnotatedMixin.$anonfun$formatAnnotation$1(AnnotatedSchemaComponent.scala:352)
> at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:129)
> at org.apache.daffodil.exceptions.Assert$.usageError(Assert.scala:117)
> at org.apache.daffodil.dsom.ChoiceBranchImpliedSequence.emptyFormatFactory(SequenceGroup.scala:413)
> at org.apache.daffodil.dsom.AnnotatedMixin.$anonfun$formatAnnotation$1(AnnotatedSchemaComponent.scala:352
> ...
> {quote}
> If i remove the choice dispatch or change maxOccurs="1" the exception goes away.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)