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 2018/10/09 18:18:00 UTC

[jira] [Assigned] (DAFFODIL-1975) Incorrect separator behavior - missing separator for empty sequence (non-backward compatible)

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

Michael Beckerle reassigned DAFFODIL-1975:
------------------------------------------

    Assignee:     (was: Michael Beckerle)

> Incorrect separator behavior - missing separator for empty sequence (non-backward compatible)
> ---------------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-1975
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1975
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, Compatibility
>    Affects Versions: 2.1.0
>            Reporter: Michael Beckerle
>            Priority: Major
>
> Consider the following
> {{    <xs:element name="NS_13a">
>       <xs:complexType>
>         <xs:sequence dfdl:separator=","  dfdl:separatorPosition="infix"><!-- OUTER -->
>             <xs:sequence> <!-- INNER -->
>               <xs:annotation>
>               <xs:appinfo source="http://www.ogf.org/dfdl/">
>                 <dfdl:assert>{fn:true()}</dfdl:assert>
>               </xs:appinfo>
>               </xs:annotation>
>           </xs:sequence>
>           <xs:element name="e2" type="xs:int" minOccurs="1" maxOccurs="unbounded" dfdl:textNumberPattern="#####"
>                dfdl:occursCountKind="implicit" />
>         </xs:sequence>
>       </xs:complexType>
>     </xs:element>}}
> The sequence labeled INNER has no syntax, only an assertion. However, the OUTER sequence specifies infix separator.
> Per clarifying discussion on the DFDL workgroup mailing list, and tests with IBM DFDL, daffodil behavior is wrong if it suppresses the separator after the INNER sequence. Separator suppression applies only to "optional" children, not required children. All model group instances are considered required, even if empty. 
> Hence, valid data to match the above schema looks like
> ,1,2,3
> The leading comma there is required. 
> Daffodil must be doing something clever to detect that this initial sequence is empty and so is suppressing the separator for it. But this is incorrect.
> Test test_NumSeq_13a illustrates the bug. (Test added as part of sequence and separators refactoring 2018-08-01)
> Fixing this may cause many tests to break. This is a major non-backward-compatible change, and so should be fixed carefully. Schemas outside of daffodil for delimited formats may be impacted also. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)