[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Mukul Gandhi" <gandhi.mukul@g...>
  • To: "http://www.pas-world.com" <dev001@p...>
  • Date: Sun, 25 Nov 2007 10:47:48 +0530

There are some basic flaws in your logic.

The XML fragment:

<nodexhtml>
<html><h1>Hello</h1></html>
</nodexhtml>

cannot appear at this place in the stylesheet. This violates the XSLT
(1.0 & 2.0) syntax.

Alternate is to wrap this fragment in a variable (as follows):

<xsl:variable name="rtf">
<nodexhtml>
   <html><h1>Hello</h1></html>
</nodexhtml>
</xsl:variable>

Then you can output this fragment from elsewhere in the stylesheet as:

1)
<xsl:copy-of select="$rtf/nodexhtml/*" /> (in XSLT 2.0)

or as:

2)
<xsl:copy-of select="xx:node-set($rtf)/nodexhtml/*" /> (in XSLT 1.0)

In both cases 1) and 2), the XML fragment is parsed.

PS: There is a list, http://www.mulberrytech.com/xsl/xsl-list
dedicated to XSLT topics.

On 11/24/07, http://www.pas-world.com <dev001@p...> wrote:
> Hello,
> How I can output from XSLT unparsed xml?
>
>
> <xsl:stylesheet>
> <xsl:template match="">
>
> <xsl:value>
> <!-- Here I need the unparsed code -->
> <xsl:value-of select="nodetexhtml">
> </xsl:template>
>
> <nodexhtml>
> <html><h1>Hello</h1></html>
> </nodexhtml>
>
> </xsl:stylesheet>
>
>
> Output of apply XSLT should be the unparsed content of nodexhtml, should
> be unparsed xhtml:
>
> <html><h1>Hello</h1></html>
>
>
> I'm trying with Xinclude but do not work. Any suggestion is welcome.
> Thanks in advance.


-- 
Regards,
Mukul Gandhi


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member