[
https://issues.apache.org/jira/browse/DAFFODIL-1910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Lawrence resolved DAFFODIL-1910.
--------------------------------------
Resolution: Fixed
Fixed in commit 6f088b6bb25d8b8acf380d25974c72a658a37465
> Cannot unparse when array with minOccurs="0" is last in a sequence
> ------------------------------------------------------------------
>
> Key: DAFFODIL-1910
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1910
> Project: Daffodil
> Issue Type: Bug
> Components: Front End
> Reporter: Steve Lawrence
> Assignee: Steve Lawrence
> Priority: Major
> Fix For: 2.2.0
>
>
> We have a schema like this:
> {code:java}
> <xs:sequence>
> <xs:sequence>
> <xs:sequence>
> <xs:element name="foo" ... />
> </xs:sequence>
> <xs:element ref="bar" minOccurs="0" maxOccurs="unbounded"
> dfdl:occursCountKind="implicit" />
> </xs:sequence>
> <xs:element name="baz" ... />
> </xs:sequence>
> {code}
> During schema compilation, we determine which elements could potentially
> appear in the infoset after the "foo" element. We correctly determine that
> "bar" could come after "foo", but we fail to recognize that "baz" could also
> come after "foo", since "bar" has minOccurs="0". This means that when
> unparsing, if "bar" does not exist, Daffodil outputs an error saying it
> expected only "bar" but did not find it.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)