I eventually want to pass a variable to my XSLT file, but, for now, I'm just
trying to be able to declare it globally in the XSLT file itself.
So, I added this to the top of the page:
<xsl:param name="currentPage">5</xsl:param>
BTW, this is a menu I'm creating and, as such, need to know what node it the
'current page' the site/menu is on.
So, elsewhere in my XSLT file, where I want to see if the link I'm
generating matches the current page so I can give it a different class, I
use this:
<xsl:when test="contentID=$currentPage">
This works.
However, I'm trying to establish the current node from the get go using the
match attribut of the xml:template:
<xsl:template match="*[contentID=5]">
This finds the item with the contentID=5
If I try to bring in the parameter like this:
<xsl:template match="*[contentID=$currentPage]">
I get a "Variables may not be used within this expression.
*[contentID=-->$currentPage<--]" error.
Is this just a syntax error on my part, or can I not do what I'm trying to
do?
-Darrel