You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Michael Beckerle (JIRA)" <ji...@apache.org> on 2018/09/06 19:41:00 UTC

[jira] [Assigned] (DAFFODIL-1989) lengthKind 'explicit' with expression should not use minLength nor textOutputMinLength

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

Michael Beckerle reassigned DAFFODIL-1989:
------------------------------------------

    Assignee:     (was: Michael Beckerle)

> lengthKind 'explicit' with expression should not use minLength nor textOutputMinLength
> --------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-1989
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-1989
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End, Middle &quot;End&quot;
>    Affects Versions: 2.1.0
>            Reporter: Michael Beckerle
>            Priority: Major
>             Fix For: 2.3.0
>
>
> Per DFDL Erratum 5.18, if the dfdl:lengthKind is explicit, the facet minLength is NOT used to determine the target length. The target length is the value of the length expression (or constant) directly. The minLength facet is only used for validation (if enabled).
> Code in Daffodil e.g., UnparseTargetLengthInCharactersEv, MinLengthInBitsEv, and UnparseTargetLengthInBitsEv, all take minLength into account even for lengthKind explicit, and do not consider whether the expression is a constant or not. (That check occurs elsewhere, so need not be taken into account, but minLength needs to be disregarded as far as the target length is concerned, but still kept around for validation purposes.)
> Similarly, for types other than string/hexBinary that are text, textOutputMinLength should be ignored if dfdl:lengthKind is explicit, though it is an error if the length is a constant and is out of range for textOutputMinLength.  (Similarly for minLength/maxLength, except that is an SDW)



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