Re: [xml] release of libxml2-2.6.0beta3



On Mon, Sep 29, 2003 at 05:14:14PM -0400, Daniel Veillard wrote:
On Mon, Sep 29, 2003 at 08:03:27PM +0100, Graham Bennett wrote:
On Fri, Sep 26, 2003 at 04:36:55AM -0400, Daniel Veillard wrote:
  The question is purely at the new SAX2 API:
    - currently defaulted attributes are always reported
    - there is a number of defaulted attribute indication allowing
      to discard them if not needed on top of the SAX2 API
But the current behaviour could be reversed and the defaulted attributes
could be shown only if the XML_PARSE_DTDATTR option is required.

From the point of view of my application (and many others I imagine), I
only care about the final value of the attribute.  So I would prefer it
if it remained the way it is, it seems like the most logical default
behaviour.

  Hum, this might be a misunderstanding, libxml2 new SAX2 shows defaulted
attributes only if they are effectively defaulted, i.e. they are not
in the input element stream but are marked as #FIXED in the DTD.
The previous SAX1 simply didn't reported them, and currently SAX2
report those but allows to ignore them by specifying how many attributes
were defaulted (and they show up as last items in the array passed in
the callback).
  If the attribute is in the input stream the value from the DTD is not
reported at that level.

Ok so as I understand it the new API will work as Expat does (I think).
You get attributes that were explicitly set in the input stream first,
then you get the ones which were defaulted in because of the DTD, and
there is a count which tells you where the changeover point in the list
is.  That is the kind of behaviour I would be looking for, I wasn't sure
what the current 'SAX1' behavour was.

cheers,

Graham.

-- 
Graham Bennett



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