You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Steve Lawrence (JIRA)" <ji...@apache.org> on 2018/03/06 15:09:00 UTC

[jira] [Updated] (DAFFODIL-1910) Cannot unparse when array with minOccurs="0" is last in a sequence

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

Steve Lawrence updated DAFFODIL-1910:
-------------------------------------
    Fix Version/s:     (was: 2.2.0)
                   2.1.0

> 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.1.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)