[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Need to wrap XML in <![CDATA[...]]> tags

Subject: Re: Need to wrap XML in <![CDATA[...]]> tags
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 4 Aug 2003 15:38:11 +0100
you need a wrap
     <xsl:text disable-output-escaping="yes">
          &lt;![CDATA[

You don't want to produce "<!CDATA" taht is a linearisation issue that
will be handled by teh system.

You want to convert an element node into the string "<foo/>"
ie you need templates like
<xsl:element match="*">
&lt;<xsl:value-of select="nam()"/>&gt;
  <xsl:apply-templates/>
&lt;/<xsl:value-of select="nam()"/>&gt;
</xsl:element>

There are more complete stylesheets doing this in the archives of this
list and the faq.

then if for some reason you want your person element to use CDATA
section markup, specify 
cdata-section-elements="person"
on xsl:output.

You don't (ever, almost) want to uuse disable-output-escaping. It looks
as if your system doesn't support it anyway, given the output you
showed. (It might not support cdata-section-elements either, but at
least if that is ignored the result will be equivalent to te result you
asked for, even if using a different markup.


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.