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

text number padding (outside of textNumberPattern) does not work with xs:decimal or xs:nonNegativeInteger

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s12
    • None
    • None
    • None

      When I was working on test BE I was having trouble figuring out why the test was not parsing correctly. It was trying to parse the padding instead of stripping it. I created some basic tests to figure out what was going on and it appears that padding is not correctly stripped when the type is xs:decimal.

      decimalPadding01 - xs:decimal using a padChar and a textNumberPattern
      decimalPadding02 - same setup as decimalPadding01 but padding is turned off. This demonstrates that the textNumberPattern is acceptable for xs:decimal
      decimalPadding03 - same setup as decimalPadding01 but the type is xs:int. Demonstrates that this textNumberPattern & pad character combo works with other types
      decimalPadding04 - xs:decimal using a padChar and no textNumberPattern. Demonstrates that the pattern isn't hindering the parse.
      decimalPadding05 - uses padding only within textNumberPattern, no external pad Char.

      The only tests that are failing are the ones that use a padChar with xs:decimal.

      Tests are in the following files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section13/text_number_props/TextNumberProps.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section13/text_number_props/TestTextNumberPropsDebug.scala
      daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section13/text_number_props/TestTextNumberProps.scala

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

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 3 minutes
                  3m