Subject:Path problem Author:(Deleted User) Date:21 Feb 2006 10:52 AM
Hi, Chris. When you create a predicate inside brackets ( b[c=$x], for example), you are setting a new input context set to the current node being examined by the predicate. The variable you set in your first XSLT sample is what allows you to compare a node with the input context of the template.
The reason your second XSLT doesn't work is that when the evaluation reaches the predicate ( b[c=.] ), the context node points to a "b" node. In order to reach the "x" node, you either need to use the current() function (like [c=current()], for example), or store the value of "." as a variable and use it later (as you did in your first XSLT).