[XML-SIG] namespaces and sax questions

Lars Marius Garshol larsga@garshol.priv.no
10 Sep 2001 10:53:46 +0200


* Roman Suzi
| 
| I am trying to master XML and I can't understand wgat is "qualified
| name" as understood by the sax.* modules of standard Python 2.1.1:

When you use namespaces in XML, an element name like "xhtml:p"
appearing in the document is really a shorthand for the namespace URI
"http://www.w3.org/1999/xhtml" and the local name "p". In this case,
"xhtml:p" is a qualified name (in SAX terminology), because it has a
namespace prefix that qualifies the local name "p".

| And the result:
| 
| ---
| START None http://www.w3.org/TR/REC-html40
| name= (u'http://www.w3.org/TR/REC-html40', u'html') qname= None

Apparently you are using pyexpat, which doesn't reveal the original
qualified name. If you try using xmlproc you should get the qname.

| Also, most of the features aren't supported by default xmlparser
| (pyexpat), while Python docs do not tell so.

This has been corrected to some extent in the current CVS tree, so the
next release should be better. 

If there is anything specific that has bothered you it would be
interesting to hear what it was, and we might be able to fix either
the code or the documentation.
 
--Lars M.