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 2019/01/14 18:31:00 UTC

[jira] [Updated] (DAFFODIL-1324) Unparse: Sequences need way to skip over optional branches

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

Steve Lawrence updated DAFFODIL-1324:
-------------------------------------
    Fix Version/s: 2.3.0

> Unparse: Sequences need way to skip over optional branches
> ----------------------------------------------------------
>
>                 Key: DAFFODIL-1324
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1324
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Unparsing
>            Reporter: Steve Lawrence
>            Assignee: Dave Thompson
>            Priority: Major
>             Fix For: 2.3.0
>
>
> For example, if we have something like this:
> {code:xml}
> <sequence>
>   <element name="optional1" minOccurs="0" maxOccurs="1" />
>   <element name="optional2" minOccurs="0" maxOccurs="1" />
> </sequence>
> {code}
> The unparser generates looks something like this (not that optional elements are treated as arrays):
> {code:xml}
> <Sequence>
>    <Array>...</Array>
>    <Array>...</Array>
> </Sequence>
> {code}
> When the SequenceCombinatorUnparser gets an event it could the Start(DIArray) of either of the elements, since the first one is optional. I think we need something similar to the ChoiceMap where based on the next element received, it can skip over some of the parsers. This avoids having to do any backtracking kindof work.



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