Steve Lawrence created DAFFODIL-1910:
----------------------------------------
Summary: 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
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)