[
https://issues.apache.org/jira/browse/DAFFODIL-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mike Beckerle resolved DAFFODIL-2656.
-------------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
fixed in 575a4c6ff9fcadb8eff733ba693b831de4156201
> 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)