[xsl] dynamic node access

Subject: [xsl] dynamic node access
From: RQamar <qamar_rahil@xxxxxxxxxxx>
Date: Mon, 21 Feb 2005 14:37:56 +0000

I am trying to retrieve an attribute value from a particular node, which has been reached dynamically. However the control tends to remain on the previous node. So my code

<xsl:if test="following-sibling::TopNode[@name = $constraint]"> <!--e.g. should display 'Toyota'> <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>

still returns 'Car' instead of 'Toyota'. This <xsl:if> is inside another <xsl:if> clause which returns 'Car'. How can I get the control to move to the node which contains the @name=Toyota ?

Could someone please help as I cant find any relevant information.


Current Thread