[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Including unparsed xml (xhtml code) code in xslt output.
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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|