[XML-SIG] SAX prettyprinter V2 and SGMLOP

Fredrik Lundh fredrik@pythonware.com
Sun, 24 Jan 1999 13:37:37 +0100

>A general question (comes up because I had to hack my Indenter
>especially for sgmlop):
>Is a SAX parser required to report ignorableWHitespace events?
>Or is it also allowed to never call this method, as sgmlop does?
>If so, then the interface doesn't make too much sense since I have
>to collect all data and handle whitespace when the next tag appears.

If I understand things correctly, sgmlop cannot figure
out what's ignorable and not; you need to have access
to the DTD to handle that.

Our internal xml libraries allows the user to indicate
whether a resource is "xml text" or "xml data".  the
latter doesn't allow elements to contain both text
and other elements, which means that it's easy to
figure out what to ignore.

Cheers /F