Re: [xsl] looking for an attribute

Subject: Re: [xsl] looking for an attribute
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Thu, 14 Sep 2006 12:29:38 +0100
On 9/14/06, Aaron Johnson <artpunx@xxxxxxxxx> wrote:
Appologies if this is a repeated request...

I have some xml...

                <focusedTab unremovable="true" immutable="true" ID="50" name="Login"/>
                <inactiveTab unremovable="true" immutable="true" ID="38" name="Home"/>

I would like to test if the focused tab has an attribute of "login" so
as to impliment a choose statement...

<xsl:template name="scripts">
                <xsl:when test="?????'"> etc etc....

I thought it would be <xsl:when test="focusedTab[@name='Login']"> but
it won't work.

It's likely that the context node when you call the named template "scripts" is not <navigation> - either make the XPath absolute or ensure the context node is the right one when you call the template.


Current Thread