Re: [xml] Refactoring of the SAX interface for namespace support.

On Wed, Aug 13, 2003 at 10:39:45AM +0100, Dave Beckett wrote:
On Tue, 12 Aug 2003 11:05:50 -0400
      there is one thing to note, that a namespace() callback may actually
      provide the namepace binding for the element after startElementNs()
      was called like in <foo:bar xmlns:foo="bar"/>

Please no.  If you go with the second style, you really must generate
namespace() first before any names with that namespace.

  Hum, there isn't really a way around this. I don't think making namespace
callbacks before the element start is any better. 
   if you get an events flow of
     startElement(bar, ns,...)
     endElement(bar, ns,...)

you really expect 
     <foo xmlns:ns=...><ns:bar href=.../></foo>
   and not
     <foo><ns:bar xmlns:ns=... href=.../></foo>

  I think this would make scope detection more complex too.
This "use before declaration" is a property of the XML serialisation


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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