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

Re: CDATA Handling

Subject: Re: CDATA Handling
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 06 Jan 2009 11:36:48 -0500
Re:  CDATA Handling
At 06:52 AM 1/6/2009, David wrote:
> May be it is easier to pick the inside text of CDATA.

If you are using XML input, it's best to process it with XML tools, in
which case processing two identical inputs should have the same
difficulty. Admittedly if you are not really using XML, and just grabing
bits of text using string handling then specifying all sorts of non XML
constraints, such as use of CDATA or use of particular attribute quoting
style, and particular character encoding, may, possibly make sense,
perhaps.

But of course this wouldn't be a conforming XML application; it would just pretend to be "XML".


The bottom line is that CDATA marked sections look like markup, but they're not. They are lexical cruft, having nothing to do with information as modeled in an XML system. They express nothing in XML that couldn't be expressed otherwise. They could have been left out of XML altogether and the semantics of XML as an information modeling and processing technology would be the same.

But because they're there, and because they look like markup, and because they do mean something to a parser, they offer potentials for headaches. When used properly, as a merely syntactic alternative to escaping markup characters, they're a harmless convenience. When they invade processing semantics, they're an accident waiting to happen.

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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-2011 All Rights Reserved.