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

Error when using empty string as default value in defineVariable

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • s15
    • s15
    • Front End
    • None

      Empty string should be a valid value for default value of defineVariable but when trying to use it I get the following error:

      edu.illinois.ncsa.daffodil.processors.ParseError: Parse Error: Expression evaluation failed. Details: javax.xml.xpath.XPathExpressionException: Expression result is not a node

      From the spec - To set the default value to "" (empty string), the defaultValue attribute syntax must be used, or the expression

      { "" }

      must be used as the element value.

      See tests:
      ngf-dfdl-2783:Variables_r1-test_emptyDefault
      ngf-dfdl-2784:Variables_r2-test_emptyDefault2

      In files:
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section07/variables/variables.tdml
      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section07/variables/TestVariablesDebug.scala

              efinnegan Elizabeth Finnegan
              efinnegan Elizabeth Finnegan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: