You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by "Josh Adams (JIRA)" <ji...@apache.org> on 2018/10/29 14:37:00 UTC

[jira] [Resolved] (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 ]

Josh Adams resolved DAFFODIL-1989.
----------------------------------
    Resolution: Fixed
      Assignee: Dave Thompson  (was: Josh Adams)

This has been addressed in commit 9a5b8cb9b8687fe7ee495677322ea461a28842ae

> 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
>            Assignee: Dave Thompson
>            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)