Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML with Variables

Status
Not open for further replies.

bikeboardsurf

Programmer
Apr 7, 2006
2
GB
Hi I have stored a variable obtained from part of the XML document I then what to limit the for-each statement by only using values that match that variable. I have printed out the variable so I know it is present, so why does this not work :

<xsl:variable name="cat"><xsl:value-of select="QuizMainia/Addy/Tst" /></xsl:variable>


<xsl:for-each select="QuizMainia/NewQ[@category='$cat']">

Any help will be very much appreciated
Cheers
Bikeboardsurf
 
I've worked it out there was some whitespace when there wasnt meant to be in the variable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top