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

Re: CDATA sections in W3C XML Infoset

  • From: Bob Kline <bkline@r...>
  • To: John Cowan <jcowan@r...>
  • Date: Fri, 30 Mar 2001 11:58:36 -0500 (EST)

w3c amp
On Fri, 30 Mar 2001, John Cowan wrote:

> Bob Kline wrote:
> 
> > No?  We have quite a bit of code in our XML repository which uses XML
> > commands over sockets for its client-server interface to the rest of the
> > world.  Most of the commands embed an XML document being stored in or
> > retrieved from the repository.  The embedded documents are wrapped in
> > CDATA sections.
> 
> And when the embedded document already contains a CDATA section?  Bzzzzt,
> not well-formed.
> 

Yes, the inability to nest CDATA sections is a flaw in the XML rec to
which we've resigned ourselves.  We don't accept documents into the
repository with CDATA sections.  We can do that because we're not a
general-purpose XML repository product.

[...]

> > Therefore information has been lost.
>
> Not so if you encode properly.  By changing every "&" in the embedded
> document to "&amp;" and every "<" to "&lt;" (conceptually in that order),
> you get this result:
> 
> 	Original	Embedding
> 	<		&lt;
> 	&		&amp;
> 	&lt;		&amp;lt;
> 	&amp;		&amp;amp;
> 	&amp;lt;	&amp;amp;lt
> 
> Etc. etc.  No information is lost: change every "&lt;" to "<" and
> every "&amp;" to "&" (conceptually in that order) and the exact
> original is restored.  In this encoding, ">" characters need not
> be changed.
> 

Yuck.  We should re-write our software (client and server) because the
W3C changed its mind about what an XML document's tree consists of?  If
the W3C was going to stomp on the distinctions enabled by CDATA
sections, it shouldn't have included them in XML in the first place.

-- 
Bob Kline
mailto:bkline@r...
http://www.rksystems.com





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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.