Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1989

lengthKind 'explicit' with expression should not use minLength nor textOutputMinLength

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.3.0
    • Back End, Middle "End"
    • None

    Description

      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)

      Attachments

        Activity

          People

            dfthompson Dave Thompson
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: