When I tried this sample with Xalan-J 2.7.1:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/">
<xsl:variable name="fragment">
<x>
<y/>
</x>
</xsl:variable>
<xsl:variable name="node">
<node>
<xsl:copy-of select="$fragment" />
</node>
</xsl:variable>
<xsl:copy-of select="$node" />
</xsl:template>
</xsl:stylesheet>
I get the output:
<?xml version="1.0" encoding="UTF-8"?>
<node>
<x>
<y/>
</x>
</node>
So my finding does'nt match with your report ...
Could you please let us know, which version of Xalan you are using.
On Thu, Apr 17, 2008 at 7:18 PM, Peter Nabbefeld <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I'm trying to convert a result tree fragment into a nodeset using
> xsl:copy-of. From the w3c spec, if I understand it correct, this should be
> possible:
>
> "When a result tree fragment is copied into the result tree (see [11.3 Using
> Values of Variables and Parameters with xsl:copy-of]), then all the nodes
> that are children of the root node in the equivalent node-set are added in
> sequence to the result tree."
>
> I'm using the following piece of code: <xsl:variable
> name="node"><node><xsl:copy-of select="$fragment"/></node></xsl:variable>
>
> The following error occurs in this line: "#RTREEFRAG kann nicht in NodeList
> konvertiert werden!"
>
> Where's the problem?
>
> Kind regards
>
> Peter Nabbefeld
--
Regards,
Mukul Gandhi