tree.c


Log

Author Commit Date CI Message
Nick Wellnhofer 220a7bae 2014-12-23T21:28:37 Don't add IDs in xmlSetTreeDoc This partially reverts my previous commit fixing bug #741919.
Nick Wellnhofer f54d6a92 2014-12-19T00:08:35 Account for ID attributes in xmlSetTreeDoc
Philip Withnall 57941042 2014-10-26T18:08:04 Remove various unused value assignments As detected by Coverity (CIDs 60467–60472). https://bugzilla.gnome.org/show_bug.cgi?id=739220
Kurt Roeckx 95ebe53b 2014-10-13T16:06:21 Fix and add const qualifiers For https://bugzilla.gnome.org/show_bug.cgi?id=689483 It seems there are functions that do use the const qualifier for some of the arguments, but it seems that there are a lot of functions that don't use it and probably should. So I created a patch against 2.9.0 that makes as much as possible const in tree.h, and changed other files as needed. There were a lot of cases like "const xmlNodePtr node". This doesn't actually do anything, there the *pointer* is constant not the object it points to. So I changed those to "const xmlNode *node". I also removed some consts, mostly in the Copy functions, because those functions can actually modify the doc or node they copy from
Gaurav Gupta 6d93e9ea 2014-10-06T20:20:00 Unreachable code in tree.c For https://bugzilla.gnome.org/show_bug.cgi?id=705392 Cut out an unused block
Kyle VanderBeek 1db99699 2014-07-29T00:32:15 Support element node traversal in document fragments. https://bugzilla.gnome.org/show_bug.cgi?id=733900
Daniel Veillard 42870f46 2014-07-26T21:04:54 Add couple of missing Null checks For https://bugzilla.gnome.org/show_bug.cgi?id=733710 Reported by Gaurav but with slightly different fixes
Tristan Van Berkom f0dd6e11 2014-04-22T21:15:05 xmlNodeSetName: Allow setting the name to a substring of the currently set name Avoid freeing the currently set name until after having assigned the new name, this allows one to call xmlNodeSetName (node, node->name + 1) to set the new name of the node to a substring of the current name without introducing any crash and without requiring an extra strdup().
Daniel Veillard 7e35abeb 2014-03-28T22:55:31 Fix a doc typo Raised by Blasius Bieselbert on IRC
Nicolas Le Cam 41586ca6 2013-06-17T13:01:33 Fix compilation with minimum and xinclude. xinclude needs xmlAddNextSibling(). Compile out use of xmlLocationSetPtr when xptr is disabled. Include xpath header.
Nicolas Le Cam 77b5b464 2014-02-10T10:32:45 Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement(). Fix compilation with minimum and legacy.
Jan Pokorný 75801652 2013-12-19T15:09:14 Fix typos in {tree,xpath}.c (errror) Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Gaurav 98a4e712 2013-11-29T23:28:21 Fix a couple of missing NULL checks For https://bugzilla.gnome.org/show_bug.cgi?id=708681
Daniel Veillard 75d13092 2013-09-11T15:11:27 Fix a potential NULL dereference in tree code https://bugzilla.gnome.org/show_bug.cgi?id=707750 Also reported by Gaurav, simple fix to check the pointer before dereference
Daniel Veillard 81b96178 2013-07-22T13:01:11 Two smal namespace tweaks An improvement of the documentation, and an extra safety check for xmlSetNs()
Michael Wood fb27e2cd 2012-09-28T08:59:33 Fix spelling of "length".
Daniel Veillard 7d4c529a 2012-09-05T11:45:32 Improve HTML escaping of attribute on output Handle special cases of &{...} constructs as hinted in the spec http://www.w3.org/TR/html401/appendix/notes.html#h-B.7.1 and special values as comment <!-- ... --> used for server side includes This is limited to attribute values in HTML content.
Daniel Veillard 968a03a2 2012-08-13T12:41:33 Add support for big line numbers in error reporting Fix the lack of line number as reported by Johan Corveleyn <jcorvel@gmail.com> * parser.c include/libxml/parser.h: add an XML_PARSE_BIG_LINES parser option not switch on by default, it's an opt-in * SAX2.c: if XML_PARSE_BIG_LINES is set store the long line numbers in the psvi field of text nodes * tree.c: expand xmlGetLineNo to extract those informations, also make sure we can't fail on recursive behaviour * error.c: in __xmlRaiseError, if a node is provided, call xmlGetLineNo() if we can't get a valid line number. * xmllint.c: switch on XML_PARSE_BIG_LINES in xmllint
Daniel Veillard 28cc42d0 2012-08-10T10:00:18 Regenerating docs and API files Various cleanups * configure.in: force regeneration of APIs in my environment * buf.c buf.h enc.h encoding.c include/libxml/tree.h include/libxml/xmlerror.h save.h tree.c: various comment cleanups pointed by apibuild * doc/apibuild.py: added the 3 new internal headers in the excludes * doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated the API * doc/symbols.xml: listing new entry points for 2.9.0 * doc/devhelp/*: regenerated
Daniel Veillard 3e62adbe 2012-08-09T14:24:02 Adding various checks on node type though the API Specifially checking against namespace nodes before accessing node pointers
Daniel Veillard 6ca24a39 2012-08-08T15:31:55 Namespace nodes can't be unlinked with xmlUnlinkNode
Daniel Veillard c15df7d4 2012-08-07T15:15:04 Avoid using xmlBuffer for serialization Mostly an optimization to avoid xmlBuffer->xmlBuf conversions and use the new code.
Daniel Veillard dddeede0 2012-07-16T14:44:26 Provide new xmlBuf based saving functions * include/libxml/tree.h: adds xmlBufGetNodeContent and xmlBufNodeDump as xmlBuf based equivalents of xmlNodeGetContent and xmlNodeDump * tree.c: implements one new routine and converts xmlNodeBufGetContent to use the xmlBuf equivalent. It should behave better as a result in case of data larger than 2GB.
Daniel Veillard 94431ecb 2012-05-15T10:45:05 Fix various bugs in new code raised by the API checking * testapi.c: regenerated and covering new APIs * tree.c: xmlBufferDetach can't work on immutable buffers * xzlib.c: fix a deallocation error
Daniel Veillard 79ee284a 2012-05-15T10:25:31 Fix various problems with "make dist" * tree.c: missing documentation for xmlBufferDetach * doc/symbols.xml: add two new symbols xmlTextReaderRelaxNGValidateCtxt and xmlBufferDetach * doc/apibuild.py: ignore internal header xzlib.h
Conrad Irwin 7d0d2a50 2012-05-14T14:18:58 Use a hybrid allocation scheme in xmlNodeSetContent On Fri, May 11, 2012 at 9:10 AM, Daniel Veillard <veillard@redhat.com> wrote: >  Hi Conrad, > > that's interesting ! I was initially afraid of a sudden explosion of > memory allocations for building a tree since by default buffers tend to > "waste" memory by using doubling allocations, but that's not the case. >  xmllint --noout doc/libxml2-api.xml > when compiled with memory debug produce > > paphio:~/XML -> cat .memdump >      MEMORY ALLOCATED : 0, MAX was 12756699 > > and without your patch 12755657, i.e. the increase is minimal. Heh, I thought that too. Actually you're looking at the result with XML_ALLOC_EXACT! This is because EXACT adds 10bytes "spare" on each alloc, and that interestingly wastes about the same amount of space as XML_ALLOC_DOUBLEIT on this example (see below). So it turns out that the default realloc() on my system actually handles this case really well — and I guess that all the time in xmlRealloc() was actually in xmlStrlen, not the underlying realloc() after all (sorry for misleading you). If you replace the realloc() with a bad one (like valgrind's), then the performance degrades severely. This patch implements a HYBRID allocator which has the behaviour you describe (it's like EXACT to start with, though without the spare 10 bytes; and switches to DOUBLEIT after 4kb) — that gets the memory back down to 12755657, with no noticeable impact on the performance of the synthetic pathological example under valgrind. In summary: max_memory on ./xmllint --noout doc/libxml2-api.xml, valgrind time on https://gist.github.com/2656940 max_memory valgrind time before | 12755657 | 29:18.2 EXACT | 12756699 | 2:58.6 <-- this is the state after the first patch. DOUBLEIT | 12756727 | 0:02.7 HYBRID | 12755754 | 0:02.7 <-- this is the state with both patches. > > There is also the cost of creating the buffers all the time. > I need to read the code and check but I may be interested in an hybrid > approach where we switch to buffer only when the text node starts to > become too big (4k would remove nearly all usuall types of "document" > usage, i.e. not blocks of data) I tried to avoid too much buffer creation by introducing the xmlBufferDetach function, which allows re-using one buffer to construct many strings. It's maybe a bit of a "hack" in API terms though I thought the gains would be worth it. Conrad ------8<------ To keep memory usage tight in normal conditions it's desirable to only allocate as much space as is needed. Unfortunately this can lead to problems when constructing a long string out of small chunks, because every chunk you add will need to resize the buffer. To fix this XML_ALLOC_HYBRID will switch (when the buffer is 4kb big) from using exact allocations to doubling buffer size every time it is full. This limits the number of buffer resizes to O(log n) (down from O(n)), and thus greatly increases the performance of constructing very large strings in this manner.
Conrad Irwin 7d553f83 2012-05-10T20:17:25 Use buffers when constructing string node lists. Hi Veillard and all, Firstly, thanks for libxml: it's awesome! I noticed recently that libxml was taking a surprisingly long time to perform some operations (many minutes instead of milliseconds), and so I did some digging. It turns out that the problem was caused by the realloc()ing done in xmlNodeAddContentLen() which can be called many (many) times when assigning some content into a node. For background, I'm dealing with XML that contains emails, these can have large attachments (~6MB) which are base-64 encoded, line-wrapped at 78 chars, and each line ends with &#13;. This means that xmlNodeAddContentLen() is being called about 200,000 times, and so there are 200,000 reallocs of a 6MB string, which takes a while... (I put a synthetic example of this at https://gist.github.com/2656940) The attached patch works around that problem by using the existing buffer API to merge the strings together before even creating the text node, this keeps the number of realloc()s at a managable level. I'd love feedback on the patch, and am happy to fix problems with it, or explore other solutions if you think that this is barking up the wrong tree :). Thanks, Conrad P.S. Should I create a bug for this too? ------8<------ Before this change xmlStringGetNodeList would perform a realloc() of the entire new content for every XML entity in the assigned text in order to merge together adjacent text nodes. This had the effect of making xmlSetNodeContent O(n^2), which led to unexpectedly bad performance on inputs that contained a large number of XML entities. After this change the memory management is done by the buffer API, avoiding the need to continually re-measure and realloc() the string. For my test data (6MB of 80 character lines, each ending with &#13;) this takes the time to xmlSetNodeContent from about 500 seconds to around 50ms. I have not profiled smaller cases, though I tried to minimize the performance impact of my change by avoiding unnecessary string copying. Signed-off-by: Conrad Irwin <conrad.irwin@gmail.com>
Daniel Veillard 39d027cd 2012-05-11T12:38:23 Fix html serialization error and htmlSetMetaEncoding() For https://bugzilla.gnome.org/show_bug.cgi?id=630682 The python tests were reporting errors, some of it was due to a small change in case encoding, but the main one was about htmlSetMetaEncoding(doc, NULL) being broken by not removing the associated meta tag anymore
Daniel Veillard a6b14bf9 2012-01-26T17:44:35 Clarify the need to use xmlFreeNode after xmlUnlinkNode Just add one small sentence to the xmlUnlinkNode function comments
Daniel Veillard aa54d37c 2010-09-09T18:17:47 Fix handling of XML-1.0 XML namespace declaration Usually 'xml' namespace for XML-1.0 declaration does not need to be carried but Mike Hommey raised the problem that the SVG XSD file fails to parse due to a mishandling. - SAX2.c: failure to create a namespace should not be interpreted as a memory allocation error - tree.c: document better xmlNewNs behaviour, and fix it in the case the 'xml' prefix is being used.
Daniel Veillard e4d1849c 2010-03-09T11:12:30 Fix xmlNodeSetBase() comment
François Delyon 2f700908 2010-02-03T17:32:37 xmlPreviousElementSibling mistake * tree.c: xmlPreviousElementSibling it should look for preceding sibling never for the following ones...
Rob Richards ddb01cbf 2010-01-29T13:32:12 Fix lost namespace when copying node * tree.c: reconcile namespace if not found
Martin Trappel f3703105 2010-01-22T12:08:00 Fix a const warning in xmlNodeSetBase * tree.c: xmlNodeSetName: Remove const from declaration since it is used non-const anyway. Remove unnecessary cast on xmlFree later on.
Daniel Veillard 594e5dfb 2009-09-07T14:58:47 Chasing dead assignments reported by clang-scan * SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
Daniel Veillard 76d36458 2009-09-07T11:19:33 Fixing assorted potential problems raised by scan * encoding.c parser.c relaxng.c runsuite.c tree.c xmlreader.c xmlschemas.c: nothing really serious but better safe than sorry
Daniel Veillard ee20cd7e 2009-08-22T15:18:31 574017 Realloc too expensive on most platform * tree.c: even on BSD there is too much of a penalty hit, to use the doubling buffer size strategy on all arches not just Windows.
Daniel Veillard 8ed1072c 2009-08-20T19:17:36 Add symbol versioning to libxml2 shared libs * libxml2.syms: the symbols with history, going back to 2.4.30 * Makefile.am configure.in: linking flags detection and use * parser.c tree.c valid.c xpointer.c: various cleanup of functions which could be made static or simply discarded, not that many
Petr Pajas 2afca4a1 2009-07-30T17:47:32 Preserve attributes of include start on tree copy * tree.c: copy attributes and namespaces for that kind of node
Daniel Veillard ab2a763d 2009-07-09T08:45:03 A bit of cleanups * tree.c: avoid calling xmlAddID with NULL values * parser.c: add a few xmlInitParser in some entry points
Daniel Veillard 43bc89c1 2009-03-23T19:32:04 add a missing check in xmlAddSibling, patch by Kris Breuker avoid * tree.c: add a missing check in xmlAddSibling, patch by Kris Breuker * xmlIO.c: avoid xmlAllocOutputBuffer using XML_BUFFER_EXACT which leads to performances problems especially on Windows. daniel svn path=/trunk/; revision=3820
Rob Richards 810a78b3 2008-12-31T22:13:57 set doc on last child tree in xmlAddChildList for bug #546772. Fix problem * tree.c: set doc on last child tree in xmlAddChildList for bug #546772. Fix problem adding an attribute via with xmlAddChild reported by Kris Breuker. svn path=/trunk/; revision=3806
Daniel Veillard be2bd6ac 2008-11-27T15:26:28 adds element traversal support avoid a warning regenerated daniel * include/libxml/tree.h tree.c python/generator.py: adds element traversal support * valid.c: avoid a warning * doc/*: regenerated daniel svn path=/trunk/; revision=3804
Daniel Veillard 1dc9feb0 2008-11-17T15:59:21 fix for CVE-2008-4226, a memory overflow when building gigantic text * SAX2.c parser.c: fix for CVE-2008-4226, a memory overflow when building gigantic text nodes, and a bit of cleanup to better handled out of memory problem in that code. * tree.c: fix for CVE-2008-4225, lack of testing leads to a busy loop test assuming one have enough core memory. Daniel svn path=/trunk/; revision=3803
Daniel Veillard da3fee40 2008-09-01T13:08:57 Borland C fix from Moritz Both regenerate, workaround a problem for buffer * trionan.c: Borland C fix from Moritz Both * testapi.c: regenerate, workaround a problem for buffer testing * xmlIO.c HTMLtree.c: new internal entry point to hide even better xmlAllocOutputBufferInternal * tree.c: harden the code around buffer allocation schemes * parser.c: restore the warning when namespace names are not absolute URIs * runxmlconf.c: continue regression tests if we get the expected number of errors * Makefile.am: run the python tests on make check * xmlsave.c: handle the HTML documents and trees * python/libxml.c: convert python serialization to the xmlSave APIs and avoid some horrible hacks Daniel svn path=/trunk/; revision=3790
Daniel Veillard 1572425c 2008-08-30T15:01:04 preparing 2.7.0 release remove some testing traces remove some warnings * configure.in, doc/*: preparing 2.7.0 release * tree.c: remove some testing traces * parser.c xmlIO.c xmlschemas.c: remove some warnings Daniel svn path=/trunk/; revision=3788
Daniel Veillard e83e93e7 2008-08-30T12:52:26 make a new kind of buffer where shrinking and adding in head can avoid * include/libxml/tree.h tree.c: make a new kind of buffer where shrinking and adding in head can avoid reallocation or full buffer memmoves * encoding.c xmlIO.c: use the new kind of buffers for output buffers Daniel svn path=/trunk/; revision=3787
Daniel Veillard 2cba4158 2008-08-27T11:45:41 fix a small initialization problem raised by Ashwin increase testing * threads.c: fix a small initialization problem raised by Ashwin * testapi.c gentest.py: increase testing especially for document with an internal subset, and entities * tree.c: fix a deallocation issue when unlinking entities from a document. * valid.c: fix a missing entry point test not found previously. * doc/*: regenerated the APIs, docs etc. daniel svn path=/trunk/; revision=3778
Daniel Veillard aa6de47e 2008-08-25T14:53:31 applied patch from Aswin to fix tree skipping fixed a comment and added a * xmlreader.c: applied patch from Aswin to fix tree skipping * include/libxml/entities.h entities.c: fixed a comment and added a new xmlNewEntity() entry point * runtest.c: be less verbose * tree.c: space and tabs cleanups daniel svn path=/trunk/; revision=3774
Daniel Veillard ae0765b6 2008-07-31T19:54:59 more progresses against the official regression tests small cleanup for * runxmlconf.c: more progresses against the official regression tests * runsuite.c: small cleanup for non-leak reports * include/libxml/tree.h: parsing flags and other properties are now added to the document node, this is generally useful and allow to make Name and NmToken validations based on the parser flags, more specifically the 5th edition of XML or not * HTMLparser.c tree.c: small side effects for the previous changes * parser.c SAX2.c valid.c: the bulk of teh changes are here, the parser and validation behaviour can be affected, parsing flags need to be copied, lot of changes. Also fixing various validation problems in the regression tests. Daniel svn path=/trunk/; revision=3762
Daniel Veillard ed939f8e 2008-04-08T08:20:08 fix a bug introduced when fixing #438208 and reported by Ashwin fix an * tree.c: fix a bug introduced when fixing #438208 and reported by Ashwin * python/generator.py: fix an infinite loop bug Daniel svn path=/trunk/; revision=3733
Daniel Veillard 8f6c2b11 2008-04-03T11:17:21 fix some problems with the *EatName functions when running out of memory * tree.c: fix some problems with the *EatName functions when running out of memory raised by Eric Schrock , should fix #438208 Daniel svn path=/trunk/; revision=3729
Daniel Veillard 6f8611fd 2008-02-15T08:33:21 patch from Julien Charbon to simplify the processing of xmlSetProp() * include/libxml/xmlerror.h tree.c: patch from Julien Charbon to simplify the processing of xmlSetProp() Daniel svn path=/trunk/; revision=3694
William M. Brack 38d452ac 2007-05-22T16:00:06 Fixed typo in xmlCharEncFirstLine pointed out by Mark Rowe (bug #440159) * encoding.c: Fixed typo in xmlCharEncFirstLine pointed out by Mark Rowe (bug #440159) * include/libxml/xmlversion.h.in: Added check for definition of _POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from Wendy Doyle and Mark Rowe, bug #346675) * schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor changes to fix compilation warnings - no change to logic. svn path=/trunk/; revision=3618
Daniel Veillard c9923324 2007-04-24T18:12:06 Richard Jones reported xmlBufferAdd (buf, "", -1), fixing it Daniel * tree.c: Richard Jones reported xmlBufferAdd (buf, "", -1), fixing it Daniel svn path=/trunk/; revision=3605
Daniel Veillard 0e05f4c2 2006-11-01T15:33:04 applied documentation patches from Markus Keim fixed one bug and added a * tree.c: applied documentation patches from Markus Keim * xmlregexp.c: fixed one bug and added a couple of optimisations while working on bug #362989 Daniel
Daniel Veillard 26a45c81 2006-10-20T12:55:34 fix comment for xmlDocSetRootElement c.f. #351981 order XPath elements * tree.c: fix comment for xmlDocSetRootElement c.f. #351981 * xmllint.c: order XPath elements when using --shell Daniel
Daniel Veillard b5f1197c 2006-10-14T08:46:40 fixing bug #344390 with xmlReconciliateNs Daniel * tree.c: fixing bug #344390 with xmlReconciliateNs Daniel
Daniel Veillard f1a27c65 2006-10-13T22:33:03 added --html --memory to test htmlReadMemory to test #321632 added various * xmllint.c: added --html --memory to test htmlReadMemory to test #321632 * HTMLparser.c: added various initialization calls which may help #321632 but not conclusive * testapi.c tree.c include/libxml/tree.h: fixed compilation with --with-minimum --with-sax1 and --with-minimum --with-schemas fixing #326442 Daniel
Daniel Veillard b8efdda0 2006-10-10T12:37:14 add a new function xmlPathToUri() to provide a clean conversion when * uri.c include/libxml/uri.h: add a new function xmlPathToUri() to provide a clean conversion when setting up a base * SAX2.c tree.c: use said function when setting up doc->URL or using the xmlSetBase function. Should fix #346261 Daniel
Rob Richards a02f199d 2006-09-16T14:04:26 xmlTextConcat works with comments and PI nodes (bug #355962). fix * tree.c: xmlTextConcat works with comments and PI nodes (bug #355962). * parser.c: fix resulting tree corruption when using XML namespace with existing doc in xmlParseBalancedChunkMemoryRecover.
Kasimier T. Buchcik 978039bb 2006-06-16T19:46:26 Fixed a bug in xmlDOMWrapAdoptNode(); the tree traversal stopped if the * tree.c include/libxml/tree.h: Fixed a bug in xmlDOMWrapAdoptNode(); the tree traversal stopped if the very first given node had an attribute node :-( This was due to a missed check in the traversal mechanism. Expanded the xmlDOMWrapCtxt: it now holds the namespace map used in xmlDOMWrapAdoptNode() and xmlDOMWrapCloneNode() for reusal; so the map-items don't need to be created for every cloning/adoption. Added a callback function to it for retrieval of xmlNsPtr to be set on node->ns; this is needed for my custom handling of ns-references in my DOM wrapper. Substituted code which created the XML namespace decl on the doc for a call to xmlTreeEnsureXMLDecl(). Removed those nastly "warnigns" from the docs of the clone/adopt functions; they work fine on my side.
Kasimier T. Buchcik 43ceb1ec 2006-06-12T11:08:18 Got rid of a compiler warning in xmlGetNodePath(). * tree.c: Got rid of a compiler warning in xmlGetNodePath().
Kasimier T. Buchcik d38c63f3 2006-06-12T10:58:24 Fixed xmlGetNodePath() to generate the node test "*" for elements in the * tree.c: Fixed xmlGetNodePath() to generate the node test "*" for elements in the default namespace, rather than generating an unprefixed named node test and loosing the namespace information.
Rob Richards a512d76e 2006-05-22T11:34:44 Revert behavior change in xmlSetProp to handle attributes with colons in * tree.c: Revert behavior change in xmlSetProp to handle attributes with colons in name and no namespace.
Daniel Veillard b2f8f1de 2006-04-28T16:30:48 preparing 2.6.24 release, fixed Python paths at the last moment fix some * NEWS configure.in doc//*: preparing 2.6.24 release, fixed Python paths at the last moment * relaxng.c testapi.c tree.c: fix some comments Daniel
Daniel Veillard 973dceb7 2006-04-25T20:22:20 fix compilation without tree Daniel * tree.c: fix compilation without tree Daniel
Daniel Veillard 11ce4004 2006-03-10T00:36:23 end of first pass on coverity reports. Daniel * runtest.c schematron.c testAutomata.c tree.c valid.c xinclude.c xmlcatalog.c xmlreader.c xmlregexp.c xpath.c: end of first pass on coverity reports. Daniel
Kasimier T. Buchcik 4435341d 2006-03-06T13:26:16 Simplified usage of the internal xmlNsMap. Added a "strict" lookup for * tree.c: Simplified usage of the internal xmlNsMap. Added a "strict" lookup for namespaces based on a prefix. Fixed a namespace processing issue in the clone-node function, which occured if a @ctxt argument was given.
Kasimier T. Buchcik 30f874d7 2006-03-02T18:04:29 Bundled lookup of attr-nodes and retrieving their values into the * tree.c: Bundled lookup of attr-nodes and retrieving their values into the functions xmlGetPropNodeInternal() and xmlGetPropNodeValueInternal(). Changed relevant code to use those functions.
Rob Richards 6581512a 2006-02-25T17:13:33 Fix the add sibling functions when passing attributes. Modify testing for * tree.c: Fix the add sibling functions when passing attributes. Modify testing for ID in xmlSetProp. No longer remove IDness when unlinking or replacing an attribute.
Kasimier T. Buchcik eb468708 2006-02-15T10:57:50 Fixed bug #328896 reported by Liron. The path for text- and * tree.c: Fixed bug #328896 reported by Liron. The path for text- and CDATA-section-nodes was computed incorrectly in xmlGetNodePath().
Kasimier T. Buchcik cab801b1 2006-02-03T16:35:27 Added an initial version of xmlDOMWrapCloneNode() to the API. It will be * tree.c: Added an initial version of xmlDOMWrapCloneNode() to the API. It will be used to reflect DOM's Node.cloneNode and Document.importNode methods. The pros: 1) non-recursive, 2) optimized ns-lookup (mostly pointer comparison), 3) user defined ns-lookup, 4) save ns-processing. The function is in an unfinished and experimental state and should be only used to test it.
Kasimier T. Buchcik e8f8d751 2006-02-02T12:13:07 Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt the previous addition * tree.c: Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt the previous addition of the removal of redundant ns-decls.
Kasimier T. Buchcik e01b2fd7 2006-02-01T16:36:13 Enhanced xmlDOMWrapReconcileNamespaces() to remove redundant ns-decls if * tree.c: Enhanced xmlDOMWrapReconcileNamespaces() to remove redundant ns-decls if the option XML_DOM_RECONNS_REMOVEREDUND was given. Note that I haven't moved this option to the header file yet; so just call this function with an @option of 1 to test the behaviour.
Rob Richards 77b92ff6 2005-12-20T15:55:14 fix bug #322136 in xmlNodeBufGetContent when entity ref is a child of an * tree.c: fix bug #322136 in xmlNodeBufGetContent when entity ref is a child of an element (fix by Oleksandr Kononenko). * HTMLtree.c include/libxml/HTMLtree.h: Add htmlDocDumpMemoryFormat.
Rob Richards 19dc961e 2005-10-28T16:15:16 add additional checks to prevent tree corruption. fix problem copying * tree.c: add additional checks to prevent tree corruption. fix problem copying attribute using xmlDocCopyNode from one document to another.
Rob Richards c342ec6d 2005-10-25T00:10:12 fix issue adding non-namespaced attributes in xmlAddChild(), * tree.c: fix issue adding non-namespaced attributes in xmlAddChild(), xmlAddNextSibling() and xmlAddPrevSibling() (bug #319108) - part 1.
Kasimier T. Buchcik 65c2f1d7 2005-10-17T12:39:58 Silenced intel compiler warnings (reported by Kjartan Maraas, bug * tree.c pattern.c: Silenced intel compiler warnings (reported by Kjartan Maraas, bug #318517). * xmlschemas.c: The above changes in pattern.c revealed an inconsistency wrt IDCs: we now _only_ pop XPath states, if we really pushed them beforehand; this was previously not checked for the case when we discover an element node to be invalid wrt the content model. Fixed segfault in xmlSchemaGetEffectiveValueConstraint().
Daniel Veillard 54f9a4f5 2005-09-03T13:28:24 fixing a number of issues raised by xml:id but more generally related to * SAX2.c tree.c valid.c: fixing a number of issues raised by xml:id but more generally related to attributes and ID handling, fixes #314358 among other things Daniel
Daniel Veillard 8874b94c 2005-08-25T13:19:21 added a parser XML_PARSE_COMPACT option to allocate small text nodes (less * HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h: added a parser XML_PARSE_COMPACT option to allocate small text nodes (less than 8 bytes on 32bits, less than 16bytes on 64bits) directly within the node, various changes to cope with this. * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: this slightly change the output Daniel
Daniel Veillard 73da77e0 2005-08-24T14:05:37 line numbers are now carried by most nodes, fixing xmlGetLineNo() c.f. bug * SAX2.c tree.c: line numbers are now carried by most nodes, fixing xmlGetLineNo() c.f. bug #309205 Daniel
Daniel Veillard bca3ad25 2005-08-23T22:14:02 fixed compilation when configured --without-sax1 and other cleanups fixes * SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c include/libxml/SAX2.h include/libxml/xmlregexp.h: fixed compilation when configured --without-sax1 and other cleanups fixes bug #172683 * doc/* elfgcchack.h: regenerated Daniel
Daniel Veillard 365c806e 2005-07-19T11:31:55 applied patch from Alexander Pohoyda fixing xmlGetNodePath on namespaced * tree.c: applied patch from Alexander Pohoyda fixing xmlGetNodePath on namespaced attributes #310417. Daniel
Daniel Veillard 39e5c890 2005-07-03T22:48:50 fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing * testapi.c tree.c: fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing another side effect in testapi seems to pass tests fine now. * include/libxml/parser.h parser.c: xmlStopParser() is no more limited to push mode * error.c: remove a warning * runtest.c xmllint.c: avoid compilation errors if only some parts of the library are compiled in. Daniel
Daniel Veillard 7e21fd10 2005-07-03T21:44:07 fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing * testapi.c tree.c: fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing another side effect in testapi seems to pass tests fine now. Daniel
Daniel Veillard 6b6d6809 2005-07-03T21:00:34 fixing compilations when disabling parts of the library at configure time. * runsuite.c runtest.c tree.c: fixing compilations when disabling parts of the library at configure time. Daniel
Daniel Veillard 304e78c6 2005-07-03T16:19:41 fix bug raised by zamez on IRC regenerated, seems to pop-up leaks in new * parserInternals.c: fix bug raised by zamez on IRC * testapi.c: regenerated, seems to pop-up leaks in new tree functions * tree.c: added comments missing. * doc/*: regenerated Daniel
Kasimier T. Buchcik 4d9c948f 2005-06-27T15:04:46 Added allocation/deallocation functions for the DOM-wrapper context. * tree.c include/libxml/tree.h: Added allocation/deallocation functions for the DOM-wrapper context.
Kasimier T. Buchcik 017264fe 2005-06-27T13:45:24 Commented the new functions to be experimental. * tree.c: Commented the new functions to be experimental.
Kasimier T. Buchcik bc0e3c6b 2005-06-27T10:28:23 Added xmlDOMWrapReconcileNamespaces(), xmlDOMWrapAdoptNode() and * tree.c include/libxml/tree.h: Added xmlDOMWrapReconcileNamespaces(), xmlDOMWrapAdoptNode() and xmlDOMWrapRemoveNode() to the API. These are functions intended to be used with DOM-wrappers.
Daniel Veillard da6f4af3 2005-06-20T17:17:54 applied patch from Rob Richards for removal of ID (and xml:id) applied * tree.c valid.c: applied patch from Rob Richards for removal of ID (and xml:id) * xmlreader.c: applied patch from James Wert implementing xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml Daniel
Daniel Veillard 64d7d123 2005-05-11T18:03:42 applied patch for replaceNode from Brent Hendricks Daniel * tree.c: applied patch for replaceNode from Brent Hendricks Daniel
Daniel Veillard c587bce5 2005-05-10T15:28:08 fixed bug #303682 of a leak reported by Malcolm Rowe Daniel * tree.c: fixed bug #303682 of a leak reported by Malcolm Rowe Daniel
Daniel Veillard 5d4644ef 2005-04-01T13:11:58 revamped the elfgcchack.h format to cope with gcc4 change of aliasing * doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h format to cope with gcc4 change of aliasing allowed scopes, had to add extra informations to doc/libxml2-api.xml to separate the header from the c module source. * *.c: updated all c library files to add a #define bottom_xxx and reimport elfgcchack.h thereafter, and a bit of cleanups. * doc//* testapi.c: regenerated when rebuilding the API Daniel
Daniel Veillard 5cd3e8c4 2005-03-27T11:25:28 cleanup of the Prop related functions and xmlNewNodeEatName by Rob * tree.c: cleanup of the Prop related functions and xmlNewNodeEatName by Rob Richards Daniel
Kasimier T. Buchcik ba70cc0d 2005-02-28T10:28:21 Changed xmlSearchNsByHref to call xmlNsInScope with the prefix instead of * tree.c: Changed xmlSearchNsByHref to call xmlNsInScope with the prefix instead of the namespace name. * test/schemas/annot-err_0.xsd test/schemas/element-err_0.xsd: Adapted invalid values of the "id" attribute, since they are validated now.
Daniel Veillard b6b36d37 2005-02-09T16:48:53 applied patch to xmlSetNsProp from Mike Hommey Daniel * tree.c: applied patch to xmlSetNsProp from Mike Hommey Daniel
Daniel Veillard 0996a162 2005-02-05T14:00:10 fixed the namespaces support fixed xmlGetNodePath when namespaces are used * pattern.c: fixed the namespaces support * tree.c: fixed xmlGetNodePath when namespaces are used * result/pattern/multiple result/pattern/namespaces test/pattern/multiple.* test/pattern/namespaces.*: added more regression tests Daniel
Daniel Veillard f59507d4 2005-01-27T17:26:49 fixed xmlCopyDoc to also copy the doc->URL as pointed by Martijn Faassen * tree.c: fixed xmlCopyDoc to also copy the doc->URL as pointed by Martijn Faassen Daniel