[XML-SIG] SAX 2.0 alpha 1

Paul Prescod paul@prescod.net
Mon, 17 Apr 2000 14:09:12 -0500

Lars Marius Garshol wrote:
> * Paul Prescod
> |
> | I think that the there would be only stream-getting methods on a Python
> | InputSource. Java has the most confusing IO library of any language I
> | know...
> I'm not sure I understand what you mean here.

See attached...

> My view is this: we should have both current Python file-like objects
> (byte streams) and the character streams in the new Python 1.6a2
> Unicode implementations, so that applications can either do conversion
> themselves or leave it to the parser.

How often will applications want to do conversion themselves? Surely if
they aren't happy with Python's encoding conversion they should "hook
in" at a lower level rather than in SAX!

> | Would it break things if the "mini" SAX2 that goes into the core library
> | did not have support for InputSource and entity handler overriding?
> Not necessarily, but I'm pretty sure the entity resolution stuff in
> the SAX2 distribution will be tiny, so it would hardly cost anything
> at all to have it there.

I'm thinking more about confusion, documentation, etc. SAX is not really
so "simple" anymore, when you get into entity handlers, decl handlers,
input sources, locators, etc. etc. I would like the documented interface
to be something that you could read and understand in fifteen minutes.

Or maybe it's the DOM event layer that should be that simple.

Here's the attachment I promised:

class java.io.InputStream 
class java.io.ByteArrayInputStream 
class java.io.FileInputStream 
class java.io.FilterInputStream 
class java.io.BufferedInputStream 
class java.util.zip.CheckedInputStream 
class java.io.DataInputStream (implements java.io.DataInput) 
class java.security.DigestInputStream 
class java.util.zip.InflaterInputStream 
class java.util.zip.GZIPInputStream 
class java.util.zip.ZipInputStream (implements
class java.io.LineNumberInputStream 
class java.io.PushbackInputStream 
class java.io.ObjectInputStream (implements java.io.ObjectInput,
class java.io.PipedInputStream 
class java.io.SequenceInputStream 
class java.io.StringBufferInputStream 
class java.io.Reader 
class java.io.BufferedReader 
class java.io.LineNumberReader 
class java.io.CharArrayReader 
class java.io.FilterReader 
class java.io.PushbackReader 
class java.io.InputStreamReader 
class java.io.FileReader 
class java.io.PipedReader 
class java.io.StringReader 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
[In retrospect] the story of a Cold War that was the scene of history's
only nuclear arms race will be very different from the story of a Cold
War that turned out to be only the first of many interlocking nuclear
arms races in many parts of the world. The nuclear, question, in sum,
hangs like a giant question mark over our waning century.
        - The Unfinished Twentieth Century by Jonathan Schell
          Harper's Magazine, January 2000