simonchristieis
Programmer
Well, I've been on this for a bit, and I can't see a way round it, so my last resort is tsuji (or others) in tek-tips.
I am trying to create a node set dynamically within a variable, but then I want to run xpath against that node set, perhaps it's easier to just show you some code to explain:
The error I am recieving is:
org.apache.xpath.objects.XRTreeFrag cannot be cast to org.apache.xpath.objects.XNodeSet
I am using the xalan parser, and cant use extensions.
Anyone know any clever workarounds ?
Thanks in advance
Simon
I am trying to create a node set dynamically within a variable, but then I want to run xpath against that node set, perhaps it's easier to just show you some code to explain:
Code:
<xsl:template match="/">
<xsl:variable name="node">
<xsl:apply-templates select="." mode="create"/>
</xsl:variable>
Result: <xsl:value-of select="$node/result/second"/>
</xsl:template>
<xsl:template match="*" mode="create">
<result>
<first>1</first>
<second>2</second>
</result>
</xsl:template>
The error I am recieving is:
org.apache.xpath.objects.XRTreeFrag cannot be cast to org.apache.xpath.objects.XNodeSet
I am using the xalan parser, and cant use extensions.
Anyone know any clever workarounds ?
Thanks in advance
Simon