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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xsl when statement question

Status
Not open for further replies.

asiamex

Programmer
Joined
Aug 6, 2004
Messages
1
Location
US
I am trying to use the below to test the contents of a url and determine values that are contained in it. I believe the below should work but have not had any luck. Shouldn't it return true if "that" is "contained" in the variable "$this" ?

<xsl:when test="contains('$this', 'that')">that is contained in this</xsl:when>

Thanks
 
You shouldn't have to put the variable $this in quotes. By putting it in quotes, it is not testing the value of the variable "this", but the string "$this".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top