[XML-SIG] xmlproc, Lexical handler and CDATA

Sylvain Thenault Sylvain.Thenault@logilab.fr
Mon, 17 Dec 2001 16:48:50 +0100 (CET)


On 17 Dec 2001, Lars Marius Garshol wrote:

> 
> (Sorry about the late response. I've been two weeks in Florida, in
> connection with XML 2001.)
> 
> * Sylvain Thenault
> | 
> | here is a patch which fix the bug in xmlproc with the
> | lexical_handler enabled.
> 
> Actually, it's not a bug, it's a missing feature, and one that was
> left out on purpose.

In my opinion it's a bug since xmlproc implements the LexicalHandler
property which should call startCDATA and endCDATA. So when you enable
this feature and no exception is raised, you are waiting for a
"well-known" behaviour.
  
> | It just call startCDATA and endCDATA on the lexical handler before
> | and after calling characters on the content handlers.
> | 
> | I can commit this but I would like to have Lars opinion
> 
> I'm not very keen on this, to be honest. It slows xmlproc down, and
> the only thing we achieve by doing so is to provide people with
> information for which they hardly ever have any appropriate use
> anyway.

How important is the slow down ? (if you don't know, I can do a little
benchmark) 
For instance, I have recently written a python program which colorize XML
files by formatting them using HTML or DOCBOOK. This kind of stuff _need_
this callback.

> If the consensus is that we should have this I can apply the patch,
> but personally I think we're better off without this "feature".
 
That's true that only a few applications care about this callback, but if 
the speed down is not too much important, I believe we should have it in
xmlproc which is one of the most complete parser in pyxml (in term of SAX 
callbacks handled)

regards

-- 
Sylvain Thenault

  LOGILAB           http://www.logilab.org