Re: Can't access a variable's children in extension element

Michael Ludwig <[email protected]>
Newsgroups gmane.text.xml.xalan.java.user
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.