I am afraid I don't understand what exactly you want to achieve. If you pass in a node and what to check if it is the context node then in XSLT 2.0 you can use 'is' operator, with XSLT 1.0 you can use generate-id on each node and compare the result.
Some of your question however sounds as if you do not pass in a node itself but rather a node name. Dynamic evaluation of a string with an XPath expression is not covered by the XSLT language, you would need to look into an extension function provided by the XSLT processor you use. Whether you really need that I am not sure, if you only have a single node name and not a path with several steps then doing something like xsl:when test="local-name() = $node-name" might suffice.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
|