[XML-SIG] pb with sax2 and name spaces
Sylvain Thenault
Sylvain.Thenault@logilab.fr
Tue, 30 Oct 2001 12:35:03 +0100 (CET)
On 29 Oct 2001, Lars Marius Garshol wrote:
>
> * Sylvain Thenault
> |
> | I'm trying to write a sax2 handler, but when I want to parse an xml file
> | using :
>
> Actually, it seems that you are using pDomlette, rather than making
> your own SAX 2.0 handler.
> You don't say where this "handler" is coming from, but from your
> traceback it seems to be the pDomlette DOM builder.
in fact, I have a sax2 handler wich may delegate works to another handler,
initialized on elements which are on a given level in the xml
tree. Depending on the node name, the handler shoud be a pDomlette handler
or not (I want to produce different objects from a single xml document).
I have attached the parser.py file to this mail if someone want to take a
look ...
> | File "parser.py", line 64, in startElementNS
> | self._handler.startElementNS(name, qname, attrs)
> | File "/home/syt/lib/python2.1/site-packages/Ft/Xml/pDomletteReader.py",
> | line 238, in startElementNS
> | (foo,bar, baz) = self._handleStartElementNss(name, attribs)
> | File "/home/syt/lib/python2.1/site-packages/Ft/Xml/ReaderBase.py", line
> | 225, in _handleStartElementNss
> | raise "Namespaces in validating docs not supported"
> | Namespaces in validating docs not supported
>
> What version of 4Suite are you using?
I have the same result with 0.11.1 and a cvssnapshot from 2 weeks ago.
> | (notice I have disabled validation !)
>
> You have, and so this looks very much like a pDomlette bug to me.
I wonder if i didn't believe something in the handler initialisation...
Note I managed to have this code working with the pulldom sax handler
instead of the pdomlette handler !
> --Lars M.
--
Sylvain Thenault
LOGILAB http://www.logilab.org