?
--
Image I've got a schema similar to this:
<Root>
<Xs>
<X>X Item 1</X>
<X>X Item 2</X>
<X>X Item 3</X>
<X>X Item 4</X>
</Xs>
<Ys>
<Y>Y Item 1</Y>
<Y>Y Item 2</Y>
<Y>Y Item 3</Y>
<Y>Y Item 4</Y>
</Ys>
</Root>
I would like an (Infopath 03 compatible) XPath expression, such that
when it's executed in the context of a Y node, returns the
corresponding X node. So if executed in <Y>Y Item 3</Y>, it returns
<X>X Item 3</X>.
Anyone have any idea how to accomplish this? Is it even possible.
I'm thinking the solution is something like:
/Root/Xs/X[position() = ???]
I just have no idea what to put in the ???, how to I get the position
of the initial context node?
<Root>
<Xs>
<X>X Item 1</X>
<X>X Item 2</X>
<X>X Item 3</X>
<X>X Item 4</X>
</Xs>
<Ys>
<Y>Y Item 1</Y>
<Y>Y Item 2</Y>
<Y>Y Item 3</Y>
<Y>Y Item 4</Y>
</Ys>
</Root>
I would like an (Infopath 03 compatible) XPath expression, such that
when it's executed in the context of a Y node, returns the
corresponding X node. So if executed in <Y>Y Item 3</Y>, it returns
<X>X Item 3</X>.
Anyone have any idea how to accomplish this? Is it even possible.
I'm thinking the solution is something like:
/Root/Xs/X[position() = ???]
I just have no idea what to put in the ???, how to I get the position
of the initial context node?