Subject:relative path 2 Author:(Deleted User) Date:07 Sep 2006 05:04 AM
We would need to see a sample of the input data, but it seem like the Group element probably has more than one OutwardList/Outward element, and more than one ReturnList/Return element.
Subject:relative path 2 Author:(Deleted User) Date:07 Sep 2006 10:32 AM
Within 1 Group element, you have 4 OutwardList/Outward elements and
5 ReturnList/Return elements. You seem to be trying to match an Outward
element with a Return element by walking upward with ../.. to the Group
element, then back down to the Return element, but your code contains
nothing to tell the xslt which of the several Return elements you want.
First, you need to clarify to yourself, exactly what is the nature of
the data, and what is the goal of the xslt, then you should be able
to write the correct .xslt
Subject:relative path 2 Author:(Deleted User) Date:07 Sep 2006 11:53 AM
You will need to use the position() of the Outward element within the OutwardList element, to select the correct Return element from the ReturnList.
To do this you need one for-each to iterate over all the Group elements, and within that, something like this:
<xsl:for-each OutwardList/Outward>
<xsl:variable name="pos" select="position()"/>
<xsl:value-of select="../../ReturnList/Return[$pos]"/>
</xsl:for-each>
The outer for-each will create a big node list which you can assign to a variable and then sort to get your desired sort order.