[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] Namespace issue with empty element using SAX (patch)



On Tue, Jan 04, 2005 at 04:21:33PM -0500, Rob Richards wrote:
> I ran into an issue when an empty element declares a namespace, the 
> namespace doesnt get popped off the stack correctly.
> i.e.:
> <root>
>    <foo xmlns="abc" />
>    <bar />
> </root>
> 
> bar ends up in the abc namespace.

  It always amazes me how monstruous bugs like this manage to fell
through the cracks and stay unnoticed for so long, impressive ! Can
be trivially reproduced with xmllint --push ...
  If you have found other problems like that, please post them :-)

> The following patch pops the namespace for empty elements.

  Didn't work fine for me, I made a slightly different (and I hope
correct) using nsPop(ctxt, ctxt->nsNr - nsNr) . I also added the
test case to the regression tests,

  thanks a lot !

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]