[XML-SIG] namespaces and sax questions

Roman Suzi rnd@onego.ru
Tue, 11 Sep 2001 22:27:48 +0400 (MSD)


On 10 Sep 2001, Lars Marius Garshol wrote:

>
>* 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".

Yes, this I understand more or less.

>| 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.

Does it mean, that my code is right and the problem is indeed in
the expat? If so, are pyexpat + namespaces usable?

>| 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.

Thanks for answering!

Sincerely yours, Roman Suzi
-- 
_/ Russia _/ Karelia _/ Petrozavodsk _/ rnd@onego.ru _/
_/ Tuesday, September 11, 2001 _/ Powered by Linux RedHat 6.2 _/
_/ "I was the next door kid's imaginary friend." _/