You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2022/02/28 19:00:00 UTC

[jira] [Closed] (DAFFODIL-2656) prefixed length element has no dfdl:contentLength nor dfdl:valueLength

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

Dave Thompson closed DAFFODIL-2656.
-----------------------------------

Verified the specified commit (commit 575a4c6ff9fcadb8eff733ba693b831de4156201) is included in the latest pull from the daffodil repository.

Verified changes identified in commit comments were implemented.

Verified affected daffodil sub-project sbt test suites executes successfully, including the added test.

> prefixed length element has no dfdl:contentLength nor dfdl:valueLength
> ----------------------------------------------------------------------
>
>                 Key: DAFFODIL-2656
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2656
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 3.2.1
>            Reporter: Mike Beckerle
>            Assignee: Mike Beckerle
>            Priority: Major
>             Fix For: 3.3.0
>
>
> When an element has a prefixed lengthKind, then it should be possible to refer, at parse time, to the dfdl:contentLength or dfdl:valueLength of that element. 
> For complex types, both should be the same, and should be the value of the prefix, adjusted for prefixIncludesPrefixLength (I.e., with that length subtracted if prefixIncludesPrefixLength is 'yes')
> This bug report was created as I am unable to get the valueLength or contentLength of a prefixedLength complexType element.
> In this specific case, I am trying to do a dfdl:inputValueCalc of an element where the expression refers to dfdl:contentLength(../..), i.e., the enclosing (2 levels up) element, which is of prefixed lengthKind. The purpose of this is because I want an element containing the message length, even though the message length is determined using lengthKind 'prefixed', because I want to check that the message length is greater than or equal to the minimum message length, and not greater than the maximum message length. 
> These functions can also apply to simpleType elements with lengthKind 'prefixed'. I don't know if they work there or not. 
> For simple types, the dfdl:contentLength is the value of the prefix, adjusted as just stated. When parsing, the dfdl:valueLength of a simpleType element with representation 'text' is possibly smaller due to dfdl:textTrimKind='padChar' and removal of padding characters. That is, dfdl:valueLength excludes padding and filling for simple types when parsing. 
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)