You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2021/02/04 21:22:00 UTC

[jira] [Updated] (DAFFODIL-2183) Unparse nilled complex element fails.

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

Steve Lawrence updated DAFFODIL-2183:
-------------------------------------
    Priority: Critical  (was: Major)

> Unparse nilled complex element fails. 
> --------------------------------------
>
>                 Key: DAFFODIL-2183
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2183
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 2.4.0
>            Reporter: Mike Beckerle
>            Priority: Critical
>
> This schema uses a nillable complex element.
> {code:java}
> <xs:element name="input">
>      <xs:complexType>
>          <xs:sequence dfdl:separator="%NL;" dfdl:separatorPosition="infix">
>              <xs:element name="person" maxOccurs="unbounded" dfdl:occursKind="implicit" dfdl:initiator="Person:" nillable="true" dfdl:nilValue="%ES;" dfdl:nilValueDelimiterPolicy="initiator">
>                  <xs:complexType>
>                      <xs:sequence dfdl:separator="," dfdl:separatorPosition="infix">
>                          <xs:element name="name" type="xs:string" />
>                          <xs:element name="age" type="xs:string" />
>                      </xs:sequence>
>                  </xs:complexType>
>              </xs:element>
>          </xs:sequence>
>      </xs:complexType>
>  </xs:element>{code}
> Parsing this data:
>  
> {code:java}
> Person:John Doe,29
> Person:Sally Smith,34
> Person:
> Person:Bob Jones,51{code}
>  
>  That produces this infoset when parsing:
> {code:java}
> <input xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <person>
>      <name>John Doe</name>
>      <age>29</age>
>    </person>
>    <person>
>      <name>Sally Smith</name>
>      <age>34</age>
>    </person>
>    <person xsi:nil="true"></person>
>    <person>
>      <name>Bob Jones</name>
>      <age>51</age>
>    </person>
>  </input>{code}
> Unparsing dies with error:
> {code:java}
> Unparse Error: Element {}person does not have a value.{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)