Hi Michael, I'm not using any of the conversion functions, just creating a standard XPath object and calling its execute method. I know from debugging that the XObject returned is a nodeset, in the case of every call after the first however it is empty.
It seems as if whatever way I'm using XPath it's only allowing me to resolve the variable the first time. If I replace all instances of the variable in the stylesheet with the key statement that generates it (ie switching "key('myKeyResolvesToBlah', 'blah')" for "$blahVar") then the XPath queries all resolve OK. There's something that <xsl:value-of select="" /> is doing that I am not, but I don't know what it is. Peter. 2009/4/16 Michael Ludwig <m...@as-guides.com> > Peter Carberry schrieb: > >> >> I'm having an issue with evaluating an XPath expression in an >> extension element. It works fine for almost all cases I've tried so >> far, but if I have a variable in my stylesheet which has child nodes >> under it, I'm having difficulty when I try to resolve any of the >> children more than once. >> > > Hi Peter, > > a non-repeatable read, so to say, in XSLT? That sounds curious. > > So for a variable $blahVar which resolves to this element: >> >> <entry code="blah"> >> <firstamount>12345</firstamount> >> <secondamount>67890</secondamount> >> </entry> >> >> ... I can pass my element something like <tst:myElement >> value="$blahVar/firstamount" /> >> > > Just to make sure: Does your variable evaluate to a node-set, because it > is constructed using @select, or upgraded from a result tree fragment > (RTF) to a node-set using one of the available conversion functions? You > should get an error if not. On the other hand, I'm not sure in what way > an extension element may change the rules of the game. > > Michael Ludwig >