[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Including unparsed xml (xhtml code) code in xslt output.
- From: "Mukul Gandhi" <gandhi.mukul@gmail.com>
- To: "Michael Kay" <mike@saxonica.com>
- Date: Sun, 25 Nov 2007 19:29:42 +0530
Hi Mike,
I agreed to your point in hurry :) After that, I double checked by
running the following stylesheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output indent="yes" />
<xsl:template match="/">
<xsl:copy-of select="$rtf/nodexhtml/*" />
</xsl:template>
<xsl:variable name="rtf">
<nodexhtml>
<html><h1>Hello</h1></html>
</nodexhtml>
</xsl:variable>
</xsl:stylesheet>
with two XSLT 1.0 processors (Xalan-J and MSXSL 4.0), and following
are the results (the transformation fails):
Xalan-J 2.7.0
------------------
XSLT Error (javax.xml.transform.TransformerException):
org.apache.xpath.objects.XRTreeFrag cannot be ca
st to org.apache.xpath.objects.XNodeSet
Exception in thread "main" java.lang.RuntimeException: org.apache.xpath.objects.
XRTreeFrag cannot be cast to org.apache.xpath.objects.XNodeSet
MSXSL 4.0
----------------
Reference to variable or parameter 'rtf' must evaluate to a node list.
It therefore seems that my original reply was right ...
Would you agree?
On 11/25/07, Mukul Gandhi <gandhi.mukul@gmail.com> wrote:
> On 11/25/07, Michael Kay <mike@saxonica.com> wrote:
> > Actually that works in 1.0 as well. XSLT 1.0 allows two operations on a
> > result tree fragment: copying, and conversion to a string.
>
> Thanks Mike for clarifying this to me.
--
Regards,
Mukul Gandhi
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]