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

Ambiguity in DFDL expressions when same element appears in sequence

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: Front End, General
    • Labels:
      None

      Description

      Say we have something like this:

      <group name="hg">
        <element name="foo" />
      </group>
       
      <element name="bar" >
        <sequence>
          <sequence dfdl:hiddenGroupRef="hg" />
          <element name="baz" dfdl:inputValueCalc="{ ../foo * 2 }" />
          <sequence dfdl:hiddenGroupRef="hg" />
          <element name="baz" dfdl:inputValueCalc="{ ../foo * 3 }" />
          <sequence dfdl:hiddenGroupRef="hg" />
          <element name="baz" dfdl:inputValueCalc="{ ../foo * 4 }" />
        </sequence>
      </element>

      The ../foo expression causes an ambiguity because it does not know which foo element inside the sequence to access. Right now, it looks like it just always selects the first element. Instead, we should throw an error. In some cases we may be able to support something like ../foo[2], but if any elements are optional that wouldn't work because we couldn't statically determine which foo to access.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              dthompson David Thompson
              Reporter:
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

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

                    Tasks