Re: [xml] xmlRemoveID patch



From: Daniel Veillard

  What problem does it fixes ? Did you run the full regression tests,
including the streaming/validation ones ? I'm pretty sure this breaks
streaming validation. So without even a description of what it's supposed
to fix, I'm not tempted a priori to apply it.
  Actually I just checked to make sure,
     xmllint --valid --stream test/valid/REC-xml-19980210.xml
fails all the ID/IDREF detection and even segfaults with your patch. Sorry
I really can't apply this !

Hmm, just found the reference to the previous thread on this with someone
elses patch as well:
http://mail.gnome.org/archives/xml/2003-August/msg00230.html
Patches are almost identical, but there is more to this it seems.

Sorry hadn't run the regression tests. I know, my bad. Working with it on
windows so not sure how to run the tests other than one at a time.

The problem I ran into was that I was looking at implementing the
setIDAttribute (dom level 3), which looks like it should also remove ids
based on the boolean passed in so was trying to use the xmlRemoveID
function.

One question on the streaming issue:
In xmlAddID and xmlAddRef it supposedly checks for streaming mode, yet I
found out when running the exact same test you did, ctxt->vstateNr is always
0 in here so ret->attr always gets set which causes the issues when
streaming (following from xmlAddID):
    if ((ctxt != NULL) && (ctxt->vstateNr != 0)) {
 /*
  * Operating in streaming mode, attr is gonna disapear
  */
 ret->name = xmlStrdup(attr->name);
 ret->attr = NULL;
    } else {
 ret->attr = attr;
 ret->name = NULL;
    }



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