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??
Let me just try to reconfirm what I meant...and I'll change the variable names a little b/c it may have been confusing the way I had it before.
Basically, strDept = *
...and that's how I want it to be parsed on the xsl page. But it appears to be parsed like this:
strDept = ' * '
....with the apostrophes
The xsl code is this:
<xsl:for-each select="PROJECT[DEPT = $strDept]">
...and therefore it will return all PROJECT elements with a DEPT element (reagardless of the DEPT element content) b/c the asterisk alone is a wildcard. But the asterisk surrounded by apostrophes it just text of an asterisk and does not act as a wildcard. I need it to act as a wildcard.