xsl wildcard asterisk paramter

admin

Administrator
Staff member
I'm passing a variable from an asp page to an xsl page. Let's call the variable strProject. Depending on the situtation, that will be some word or phrase like "Lab Project" or it will be nothing at all. When it is nothing, I set it equal to an asterisk like this:

strProject = "*"


I pass it to the xsl page as a parameter:
<xsl: param name="strProject "></xsl: param>

I set it to an asterisk b/c I want to use that as a wildcard when searching through xml nodes on the xsl page.
The xsl code looks like this:
<xsl:for-each select="PROJECT[Project = $strProject ]">

So, when strProject = *, I want the xsl page to see it like this:
<xsl:for-each select="PROJECT[Project = *]">

However, I believe it's being seen as this:
<xsl:for-each select="PROJECT[Project = '*' ]">
...as text with the apostrophes and not just as a plain asterisk.

If I hard code the asterisk into the xsl page, it works.


Anyone know to make the xsl page see it as just an asterisk??

Thanks.
 
Back
Top