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

Re: purpose CDATA sections

  • From: Eric Baatz - Sun Microsystems Labs BOS <ebaatz@b...>
  • To: Martin.Beet@n...
  • Date: Fri, 15 Aug 1997 11:15:39 -0400 (EDT)

xml purpose of cdata
>  The only purpose of the CDATA section (CDSect) I can think of is for
>  showing code examples. Am I missing something?

By "code" do you mean XML markup?

Text other than XML markup can contain characters that might be mistaken
for XML and therefore should be escaped.  It may be more convenient
to stick the entire text into a CDATA rather than individually escaping
each character that an XML processor is sensitive to.  For example:

<EMAIL-HEADER>
<![CDATA[From: Martin Beet <Martin.Beet@n...>]]>
</EMAIL-HEADER>


Similarly for more specialized text, such as the native commands of a
speech synthesizer (where I don't have any control over the syntax
accepted by the synthesizer):

<SYNTHCMDS ID="Croaker"><![CDATA[<voice=bullfrog><ribbit=1>]]></SYNTHCMDS>

The CDATA method may be easier to generate programatically and it may
be viewed as more readable than individually escaping characters.


Eric Baatz
Sun Microsystems Laboratories
2 Elizabeth Drive, MS UCHL03-207                 (508) 442-0257
Chelmsford, MA 01824                        fax: (508) 250-5067
USA                                    Internet: eric.baatz@e...


xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


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.