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 2025/10/08 19:21:00 UTC
[jira] [Assigned] (DAFFODIL-2193) dfdl:lengthKind="prefixed" with dfdl:lengthUnits="characters" gives wrong parse result
[ https://issues.apache.org/jira/browse/DAFFODIL-2193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Lawrence reassigned DAFFODIL-2193:
----------------------------------------
Assignee: Olabusayo Kilo (was: Olabusayo Kilo)
> 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
> Assignee: Olabusayo Kilo
> 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)