Hello, I was a little bit confused by Joseph's answer. The problem is definitely no problem of the DOM implementation.
This was my first example: --------------8X--------------8X--------------8X-------------- 1: <xsl:variable name="node" select="." /> 2: <xsl:variable name="var1" select="id($node/@attrID)/someChild" /> 3: <xsl:variable name="clusters" select="utils:cluster(node/someChildren,5)"/> 4: <xsl:for-each select="$cluster"> 5: <xsl:variable name="var2" select="id($node/@attrID)/someChild" /> 6: ... 7: </xsl:for-each> --------------8X--------------8X--------------8X-------------- It doesn't matter what the extenstion function is doing and how and what elements are how created in it. In line 5, the result of the extensin function is _not_ used for anything. The variable defined in line 1, which is still in scope, otherwise no access would be possible, has changed! Line 2 and 5 are absolutely identical, except the variable's name. But line 2 is working, line 5 is not working. INHO this is definitly a bug of Xalan: Variable "node" was not changed - but its behaviour changed! The extension function has nothing to do with this variable. And besides the id function, some other XPath functions like sibling selection etc. are still working (I've tested that). Best regards, Jens
