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!

can you match a template with a variable name?

Status
Not open for further replies.

dendenners

Programmer
Jul 17, 2001
110
IE
Hi there,
I'm pretty new to XSL. My xsl consists of several '<template: match=&quot;foo&quot;> tags. I know how to pass in a variable to the xsl (I have a line
<xsl:param name=&quot;bar&quot; select=&quot;'default value'&quot;/> which seems to be working ok). What I want to do is
<template:match=&quot;$bar&quot;>, i.e. I want to pass in the template name as a variable. Is this possible, and if so, how?
Thanks a lot.
Denis
 
Try it out, but I got an error when I tried this with a filter comparison like:


<template:match=&quot;ONE/TWO[@id=$bar]&quot;>


Parse told me that variables were not allowed in there. Might have to just check inside the template with an if statement, which is what I ended up doing.

<bb/>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top