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

Incorrect QName namespace prefix suggested for bad steps in DPath paths

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Diagnostics
    • None

    Description

      Consider the following (incorrect) DFDL snippet:

       

      <xs:element name="root" dfdl:lengthKind="implicit">
      <xs:complexType>
      <xs:sequence>
      <xs:element ref="a:a_element" />
      <xs:element name="b" type="tns:b_type" dfdl:inputValueCalc="{ ../a_element }" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>

      Note that the dfdl:inputValueCalc should specify the namespace of the element it is referring to "a:a_element".

      In attempting to compile the above, Daffodil reports the error as:

      [error] Schema Definition Error: No element corresponding to step {}a_element found. Possibilities for this step include: tns:a_element, {}b.

      Following Daffodils advice, results in a more reasonable suggestion:

       

      [error] Schema Definition Error: No element corresponding to step tns:a_element found,but elements with the same local name were found (a:a_element).Perhaps a prefix is incorrect or missing on the step name?

       

      Schema needed to reproduce is attached. Reproduce with:

      daffodil save-parser -s b.dfdl.xsd parser.bin

      Attachments

        1. a.dfdl.xsd
          0.7 kB
          Brandon Sloane
        2. b.dfdl.xsd
          1.0 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: