[xsl] Using XPath in an xsl:param?

Subject: [xsl] Using XPath in an xsl:param?
From: "Kevin Daniels" <KevinDaniels@xxxxxxxxxxx>
Date: Tue, 20 Jul 2004 23:50:12 -0400
Thanks Michael,

I am currently using IE6 and MSXML, so XSLT 2.0 is an opion for the future.
I ended up reversing the order or matching the criteria I was looking for
(rather than using a recursive function) and it works well.
Instead of passing in an XPath statement and dealing with interpretation and
evaluation later on, I pass in a delimited string of values that I need and
simply check if the artist value is contained in the parameter.  For
example:

<xsl:param name="test" select="'Bob Dylan|Tina Turner'"/>

and then use a template with the following:

<xsl:template match="cd">
<xsl:if test="contains($test, artist)">
...
</xsl:if>

Thanks for the suggestions,

Kevin

Current Thread