[XML-SIG] gray areas in Python SAX API
Alexandre Fayolle
Alexandre.Fayolle@logilab.fr
Mon, 19 Nov 2001 12:14:09 +0100 (CET)
On 16 Nov 2001, Lars Marius Garshol wrote:
> | namespace-prefix feature is not supported by parsers
> | * decide if supporting setting this feature is mandatory or not
> | * if yes, fix parsers
>
> Hmmmm. I have no strong opinion on this, but unless I am mistaken it
> is impossible to implement this in PyExpat, and that suggests to me
> that we should leave it optional. Does anyone have good reasons why it
> should be mandatory?
Well, for what it's worth, the Java SAX2 documentation says in (careful,
long URL wrapped)
http://www.saxproject.org/apidoc/org/xml/sax/XMLReader.html#setFeature(java.lang.String,
boolean)
"All XMLReaders are required to support setting
http://xml.org/sax/features/namespaces to true and
http://xml.org/sax/features/namespace-prefixes to false."
My opinion is that it is a reasonable requirement. Please note that this
does not require any change in Expat. Just the wrapper should not raise an
exception when setting namespace-prefixes to false.
If we choose to do things differently, I'd say we should document this.
Alexandre Fayolle
--
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Narval, the first software agent available as free software (GPL).