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

 Hi Daniel,

 My preference goes to the distinct callbacks for elements and attributes.

      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"/>

Very good idea IMHO. This would make it easier to deal with documents that use QNames in content. This callback should also be called to notify when the default namespace changes.

      there is another option even more disturbing from an API viewpoint:
        change name to simple const xmlChar * zero terminated to
        const xmlChar * with a lenght in bytes, like for the character
goal would be to minimize the number of string copies needed, this could be very effective for attribute values which operates on a non-bounded
      vocabulary. Minimizing the number of string allocated for tags can
be done very easilly by the parser since the values pertains to a fixed
      vocabulary this is part of the enhancements I have long planned to do
      in libxml2.

I'm not sure to understand you ont this. Do you mean that the attribute callback could report the value of the attribute by chunks ? Or the name of the attribute ?

Fabrice Desré
France Télécom R&D/DTL/TAL
Tél: +(33) (0)2 96 05 31 43
Fax: +(33) (0)2 96 05 39 45

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