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.