[Python-Dev] Encoding of code in XML

Paul Prescod paul@prescod.net
Wed, 19 Apr 2000 15:25:42 -0500


Sjoerd Mullender wrote:
> 
> ...
>
> CDATA sections are not part of the markup, so the XML parser
> is allowed to coallese the multiple CDATA sections and other character
> data into one string before it gives it to the application.

Allowed but not required. Most SAX parsers will not. Some DOM parsers
will and some won't. :(

> So, yes, this requires smarts on the XML parsing stage, but I think
> those smarts need to be there anyway.

I don't follow this part. Typically those "smarts" are not there. At the
end of one CDATA section you get an event and at the beginning of the
next you get a different event. It's the application's job to glue them
together. :( Fixing this is one of the goals of EventDOM.

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Pop stars come and pop stars go, but amid all this change there is one
eternal truth: Whenever Bob Dylan writes a song about a guy, the guy is
guilty as sin.
	- http://www.nj.com/page1/ledger/e2efc7.html