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

Olabusayo Kilo updated DAFFODIL-2193:
-------------------------------------
    Fix Version/s: 4.1.0

> dfdl:lengthKind="prefixed" with dfdl:lengthUnits="characters" gives wrong 
> parse result
> --------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2193
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2193
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, Front End
>    Affects Versions: 2.4.0
>            Reporter: Steve Lawrence
>            Priority: Minor
>             Fix For: 4.1.0
>
>
> {code}
> 3ABC
> {code}
> That data can be described with the following schema:
> {code:xsd}
> <xs:element name="D"type="xs:string"
>     dfdl:lengthUnits="characters"
>     dfdl:lengthKind="prefixed"
>     dfdl:prefixLengthType="D-type"
>     dfdl:prefixIncludesPrefixLength="no"/>
> <xs:simpleType name="D-type"
>     dfdl:lengthKind="explicit"
>     dfdl:length="1"> 
>   <xs:restrictionbase="xs:integer"/>
> </xs:simpleType>
> {code}
> DAFFODIL-114 added support for lengthKind="characters", but upon testing it 
> looks like it created an Assert.invariant if the lengthKind="characters" for 
> a prefixed length element. On 2.4.0, that invariant doesn't happen, but the 
> lenght is calculated incorrectly. In 2.4.0, it only parses a single 
> character, even though the prefix length is 3.
> Also see related DAFFODIL-2029, which is to add support for unparsing 
> lengthKind="characters" prefixed length elements.
> If we don't support this yet, we might just want to make it a 
> notYetImplemented error.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to