Re: [xsl] multiple node values not being returned

Subject: Re: [xsl] multiple node values not being returned
From: Rahil <qamar_rahil@xxxxxxxxxxx>
Date: Fri, 20 May 2005 12:57:08 +0100
David Carlisle wrote:

Is there a one line code available to do the same thing?



No, why should there be? You can copy all the nodes using copy-of but if
you want to generate a new element and new text then you need to iterate
over the old nodes and generate some new ones.



Ive finally solved my problem and am now getting the results I expected. Heres what I did


<xsl:for-each select="$interim/A/Value">
<xsl:variable name="aVal" select="."/>
<xsl:value-of select="distinct-values($aVal[for $a in . return $oVal[contains(.,$a)]])"/>
<xsl:if test="position() != last()"><xsl:value-of select="' '"/></xsl:if>
</xsl:for-each>


Thank you so much for helping out. On hindsight it was a fairly straight-forward solution. Probably my head was playing games!

Thanks a lot once again
Rahil

Current Thread