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

Re: copying CData sections from the source to destination do

Subject: Re: copying CData sections from the source to destination documents
From: Mike Brown <mike@xxxxxxxx>
Date: Wed, 15 Nov 2000 11:15:48 -0700 (MST)
embed source destination
R_KNOWLES wrote:
> >Does it matter whether the output uses character references or CDATA? They
> >are just different ways of expressing the same information.
> 
> I think so. What we are trying to do is embed an XML fragment (or even
> document) inside another XML document (they will have different dtd's).

Mike Kay's point was that it still doesn't matter.

Tim Bray's annotated XML spec explains:

"CDATA sections don't mean anything; they are strictly a convenience to
make XML document authors' lives easier. Suppose I want to include an
example of some XML in an XML document (this isn't that uncommon, after
all I'm about to do it right now). There are two ways I could do this:

&lt;tag>Hello, world!&lt;/tag>

and 
<![CDATA[<tag>Hello, world!</tag>]]>

These encode strictly identical data, and there is nothing wrong with
either. The CDATA technique, though, is probably a lot more convenient for
an author, because she can cut chunks of XML out of other documents and
drop them right into the CDATA section, without having to worry about
escaping all those < and & characters."


 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.