[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] dynamic node access


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

Hi

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>
</xsl:if>


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.

Thanks
Rahil


Current Thread