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

Parse error on if statements in expressions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.1.0
    • 2.3.0
    • None
    • None

    Description

      In complex dfdl expressions, if statements do not get processed correctly without extraneus parenthesis.

      The following expressions produces an error:

          { 1 + if(fn:true()) then 1 else 2 }

      [error] Schema Definition Error: Unable to parse expression. Message: `}' expected but `t' found
      Next: then 1 else 2 }.

      In contrast, the following works as expected:

          { 1 + (if(fn:true()) then 1 else 2) }

       

      Attached is a basic schema demonstrating the issue.

      Attachments

        1. test.dfdl.xsd
          1 kB
          Brandon Sloane

        Activity

          People

            Unassigned Unassigned
            brandon.sloane Brandon Sloane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: