Subject: Re: [xsl] looking for an attribute From: "Aaron Johnson" <artpunx@xxxxxxxxx> Date: Fri, 15 Sep 2006 15:12:48 +0100 |
Your code is correct, provided that the navigation element is the context node. I suspect it didn't work because the context was wrong, but we can't see that from your fragment.
Michael Kay http://www.saxonica.com/
> -----Original Message----- > From: Aaron Johnson [mailto:artpunx@xxxxxxxxx] > Sent: 14 September 2006 12:23 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] looking for an attribute > > Appologies if this is a repeated request... > > I have some xml... > > <navigation> > <focusedTab unremovable="true" immutable="true" > ID="50" name="Login"/> > <inactiveTab unremovable="true" > immutable="true" ID="38" name="Home"/> </navigation> > > 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:choose> > <xsl:when test="?????'"> etc etc.... > > I thought it would be <xsl:when > test="focusedTab[@name='Login']"> but it won't work. > > Any help would be appreciated. > > Aaron
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] looking for an attribute, Michael Kay | Thread | Re: [xsl] looking for an attribute, andrew welch |
Re: [xsl] outputting <?xml version=, David Carlisle | Date | [xsl] Rounding a number, Sam Carleton |
Month |