[xml] modifying tree and attributes
- From: Rob Richards <rrichards ctindustries net>
- To: "xml gnome org" <xml gnome org>
- Subject: [xml] modifying tree and attributes
- Date: Sun, 23 Oct 2005 08:16:31 -0400
I was looking at bug 319108 (which I agree with assement and additional
function needed) and was adding in some additional fixes from code I use.
i.e. - dont unlink or free if XML_ATTRIBUTE_DECL returned from xmlHasXXXProp
- dont add attr if #FIXED in DTD
These changes affect xmlAddNextSibling, xmlAddPrevSibling and
xmlAddChild. imo these are higher level functions so all checks should
be done, but...
Where is the line drawn on what is expected the caller to handle and
what the lib handles?
Looking at a few other functions:
xmlNewXXXProp - imo up to caller to handle checks as code does no checks
for anything so no issues here.
xmlSetXXXProp - grey area here. function checks for exsiting attribute
and IDs but not XML_ATTRIBUTE_DECL (really only #FIXED would cause any
problems). But in the case ofsetting a prop with ns, it is up to the
caller to insure ns is in scope. so basically some things handled here
while others arent.
Rob
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]