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

textNumberProps: Quoted '+' in pattern seems to affect parse

XMLWordPrintableJSON

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

      This is a strange one. I have two patterns, and each one contains '' in the positive pattern, which should match the literal ''. It does seem to match, and get stripped from the data, but after that the data does not parse correctly, even if it's valid for the pattern and the type:

      [info] Test edu.illinois.ncsa.daffodil.section13.text_number_props.TestTextNumberProps.test_textNumberPattern_specialChar06 started
      2013-08-22 04:00:32:287  edu.illinois.ncsa.daffodil.tdml.ParserTestCase Error[Parse Error: Convert to Integer (for xs:int): Unable to parse '5' (using up all characters).
      Schema context: element.tnp70 Location line 48 column 20683 in file:/tmp/daffodil_tmp_3788595172509738451.dfdl.xsd
      Data location was preceding byte 2
      UTF-8 text starting at byte 0 is: (+5)
      Data (hex) starting at byte 0 is: (0x2B35)]
      Bytes processed: 2
      Characters processed: 2

      I duplicated the test but used lengthKind="explicit" and a length of 1. I get the error "Parse Error: Convert to Integer (for xs:int): Cannot parse number from empty string"

      Something strange seems to be happening when the '+' is stripped, but I'm not seeing it for the other characters I tested.

      Please see the following tests:
      textNumberPattern_specialChar05
      textNumberPattern_specialChar06
      textNumberPattern_specialChar08

      in:
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section13/text_number_props/TestTextNumberPropsDebug.scala
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section13/text_number_props/TextNumberProps.tdml

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

                Created:
                Updated:
                Resolved: