[XML-SIG] SAX prettyprinter V2 and SGMLOP

Christian Tismer tismer@appliedbiometrics.com
Sun, 24 Jan 1999 16:30:45 +0100

Lars Marius Garshol wrote:
> * Christian Tismer
> |
> | [ignorableWhitespace]
> |
> | Well, I understand. Lars also mentioned that without a DTD and a
> | parser which understands it, this event is useless.
> Not useless, just impossible to fire as distinguished from the
> characters event.

But after all, I'm baffled. I got whitespace events when
I didn't specify the parser. It was using xmlproc as it looks 
like. xmlproc reported whitespace to me I think between a
closing tag of a sublevel, before the next closing tag.

between these I got witespace, ignored it and handled my
own indentation, and everything looked pretty.

Is this correct behavior, then?

> Why not make a simple SAX parser filter that reads in such a list of
> element type names and then filters characters events into characters
> and ignorableWhitespace, possibly also doing whitespace normalization?
> Sounds like something that is both simple to develop and eminently
> reusable.

Well, good idea. For many simple data applications, it makes 
also sense to simply default to keep whitespace at leaf nodes, 
as Fredrik pointed out.
But before, I have to understand that topic above :-)

ciao - chris

Christian Tismer             :^)   <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.skyport.net
10553 Berlin                 :     PGP key -> http://pgp.ai.mit.edu/
     we're tired of banana software - shipped green, ripens at home