XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Including unparsed xml (xhtml code) code in xslt output.

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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS