Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1327

Unparse: Data value should be padded to minLength facet, not length expression

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • 2.0.0
    • 1.1.0
    • Unparsing
    • None

      According to the spec, "when dfdl:lengthKind is 'explicit' (and dfdl:length is an expression), ... the data value is padded to the length given by the XSD minLength facet"

      I wrote a test to verify this, and the unparser is padding the data to the length expression, not the minLength facet.

      See test
      unparseDelimitedPaddedString10
      in files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section13/text_number_props/TextNumberPropsUnparse.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section13/text_number_props/TestTextNumberPropsUnparseDebug.scala
      daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section13/text_number_props/TestTextNumberPropsUnparse.scala

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: