First get rid of the inner quotes.
A variable holds a value (in this case, a set of nodes), it doesn't hold a path expression. When you write <xsl:variable name="x" select="foo/bar"/>, it evaluates foo/bar in the current context to return a set of nodes. You seem to be under the incorrect impression that the value of the variable will be a path expression that is evaluated in the context where it is used.
In XSLT 2.0, you can write f/b[foo/bar = ('C1', 'C2')]. In XSLT 1.0, you can write f/b[foo/bar[. = 'C1' or . = 'C2']].
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|