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.

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@pas-world.com> 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]


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