Description

There is a problem when you have an XPath that contains a variable reference followed by self::node() if you use XSLTC (the problem does not occure if you just use Xalan without XSLTC).
If you have for example $var1/self::node(). The following XSLTC Step is generated :

FilterParentPath(variable-ref(var1/node-set), step("self", -1))

This step is translated to the following piece of code (I decompiled to byte code):

As you can see the 'self::node()' step is translated to 'new SingletonIterator'. This is not correct because new SingletonIterator will refer to the node of the _parent of the FilterParentPath step.
After applying the patch I made, the following code is generated if the _parent of the Step (self::node()) isn't a 'ParentLocationPath' :

new StepIterator(dtmaxisiterator1.cloneIterator(), dom.getAxisIterator(13));

The problem appears to be valid, and this issue may be related to another issue (Henry Zongaro might know which one, where you have a / path expression that doesn't resolve to the right right root node if the document() function is involved).

Setting Henry Z. to be the patch reviewer, fix priority fp2, per the Xalan-J issue meeting on May 3, 2005.

Brian Minchau
added a comment - 04/May/05 06:39 The problem appears to be valid, and this issue may be related to another issue (Henry Zongaro might know which one, where you have a / path expression that doesn't resolve to the right right root node if the document() function is involved).
Setting Henry Z. to be the patch reviewer, fix priority fp2, per the Xalan-J issue meeting on May 3, 2005.