[XML-SIG] XMLReader features & properties

Lars Marius Garshol larsga@garshol.priv.no
28 Aug 2001 23:02:59 +0200


* Juergen Hermann
| 
| Is there a documented default for a reader's features & properties,
| namely validation & namespace processing?

They are documented here:

<URL: http://www.python.org/doc/current/lib/module-xml.sax.handler.html >


The documentation has followed the Java SAX 2.0 API, but I think the
default for 

  feature_validation

should be the opposite of what that page says. The default SAX parser
you get in Python is the expat driver, and for this property it has
the opposite value of that documented. That is bound to confuse
people, and so I think we should change the documentation.


There is also

  feature_external_pes

which I don't know what expat does with. Does the expat version we
have now read external parameter entities? If not, we should either
change that or the documentation. The best is, I think, to change the
implementation, but if that proves difficult we should change the
documentation. 


The

  feature_namespaces

feature is also troublesome. Part of the point behind splitting the
startElement event into startElement and startElementNS was to make
SAX easier to use for novices. If that is to have any point the
default has to be that namespace processing is off. This is also what
expatreader.py and drv_xmlproc.py implement at the moment. 

I think we should change the documentation to reflect this.


Comments, anyone?

--Lars M.