Brandon Sloane created DAFFODIL-2115:
----------------------------------------
Summary: Incorrect prefix suggested for bad steps in DPath paths
Key: DAFFODIL-2115
URL: https://issues.apache.org/jira/browse/DAFFODIL-2115
Project: Daffodil
Issue Type: Bug
Components: Diagnostics
Reporter: Brandon Sloane
Attachments: a.dfdl.xsd, b.dfdl.xsd
Consider the following (incorrect) DFDL snippet:
{quote}<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>
{quote}
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:
{quote}[error] Schema Definition Error: No element corresponding to step
{}a_element found. Possibilities for this step include: tns:a_element, {}b.
{quote}
Following Daffodils advice, results in a more reasonable suggestion:
{quote}
[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?
{quote}
Schema needed to reproduce is attached. Reproduce with:
{quote}daffodil save-parser -s b.dfdl.xsd parser.bin
{quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)