Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| 07def30f | 2014-03-21 19:38:08 | Restore context size and position after XPATH_OP_ARG Fixes a bug with predicates: https://mail.gnome.org/archives/xml/2014-March/msg00014.html | ||
| 75801652 | 2013-12-19 15:09:14 | Fix typos in {tree,xpath}.c (errror) Signed-off-by: Jan Pokorný <jpokorny@redhat.com> | ||
| 03c67230 | 2013-12-20 00:01:53 | Handling of XPath function arguments in error case The XPath engine tries to guarantee that every XPath function can pop 'nargs' non-NULL values off the stack. libxslt, for example, relies on this assumption. But the check isn't thorough enough if there are errors during the evaluation of arguments. This can lead to segfaults: https://mail.gnome.org/archives/xslt/2013-December/msg00005.html This commit makes the handling of function arguments more robust. * Bail out early when evaluation of XPath function arguments fails. * Make sure that there are 'nargs' arguments in the current call frame. | ||
| fcd45831 | 2013-11-28 23:01:44 | Fix XPath node comparison bug For https://bugzilla.gnome.org/show_bug.cgi?id=715143 | ||
| e8de99f9 | 2013-08-05 01:26:25 | Fix XPath expressions of the form '@ns:*' Use namespace for match-all queries on the attribute axis. | ||
| b4bcba23 | 2013-08-05 00:15:11 | Fix XPath '//' optimization with predicates My attempt to optimize XPath expressions containing '//' caused a regression reported in bug #695699. This commit disables the optimization for expressions of the form '//foo[predicate]'. | ||
| e28c8a1a | 2013-08-03 14:22:54 | #705267 - add additional defines checks for support "./configure --with-minimum" https://bugzilla.gnome.org/show_bug.cgi?id=705267 | ||
| b9e4d5b6 | 2013-07-22 13:21:31 | Remove occasional leading space in XPath number formatting https://bugzilla.gnome.org/show_bug.cgi?id=704528 Somehow snprintf "%*.*e" can generate a leading space, remove it | ||
| 28876afb | 2013-03-23 17:23:27 | Add xmlXPathSetContextNode and xmlXPathNodeEval This patch adds xmlXPathSetContextNode and xmlXPathNodeEval, which make it easier to evaluation XPath expressions with a context node other than the document root without poking about inside the internals of the context. This patch is compile-tested only, and is my first libxml2 contribution, so please go easy. Signed-off-by: Alex Bligh <alex@alex.org.uk> | ||
| 713434d2 | 2012-09-26 10:21:06 | Silence a clang warning as reported by Hans Wennborg <hans@chromium.org> | ||
| 7651606f | 2012-09-11 14:02:08 | Various cleanups to avoid compiler warnings | ||
| f8e3db04 | 2012-09-11 13:26:36 | Big space and tab cleanup Remove all space before tabs and space and tabs at end of lines. | ||
| 47881284 | 2012-09-07 14:24:50 | Add a forbidden variable error number and message to XPath Related to https://bugzilla.gnome.org/show_bug.cgi?id=680938 When the XML_XPATH_NOVAR flags is being used it means that variables are forbidden, not that they are missing | ||
| 1bd45d13 | 2012-09-05 15:35:19 | Change the XPath code to percolate allocation errors looping 1000 time on an error stating that a nodeset has grown out of control is useless, make sure we percolate error up to the various loops and break when errors occurs | ||
| 510e7583 | 2012-09-04 11:50:36 | Fix a Timsort function helper comment | ||
| 3e031b7d | 2012-08-24 16:52:44 | Switching XPath node sorting to Timsort I use libxml xpath engine on quite large (and mostly "flat") xml files. It seems that Shellsort, that is used in xmlXPathNodeSetSort is a performance bottleneck for my case. I have read some posts about sorting in libxml in the libxml archive, but I agree that qsort was not the way to go. I experimented with Timsort instead and my results were good for me. For about 10000 nodes, my test was about 5x faster with Timsort, for 1000 nodes about 10% faster, for small data files, the difference was not measurable. * timsort.h: the algorithm, kept in a separate header * xpath.c: plug in the new algorithm in xmlXPathNodeSetSort * Makefile.am: add the header to the EXTRA_DIST * doc/apibuild.py: avoid indexing the new header | ||
| 62270539 | 2012-08-19 19:42:38 | Optimizing '//' in XPath expressions When investigating the libxslt performance problem reported in bug #657665, I found that '//' in XPath expressions can be very slow when working on large subtrees. One of the reasons is the seemingly quadratic time complexity of the duplicate checks when merging result nodes. The other is a missed optimization for expressions of the form 'descendant-or-self::node()/axis::test'. Since '//' is expanded to '/descendant-or-self::node()/', this type of expression is quite common. Depending on the axis of the expression following the 'descendant-or-self' step, the following replacements can be made: from descendant-or-self::node()/child::test to descendant::test from descendant-or-self::node()/descendant::test to descendant::test from descendant-or-self::node()/self::test to descendant-or-self::test from descendant-or-self::node()/descendant-or-self::test to descendant-or-self::test 'test' can be any kind of node test. With these replacements the possibly huge result of 'descendant-or-self::node()' doesn't have to be stored temporarily, but can be processsed in one pass. If the resulting nodeset is small, the duplicate checks aren't a problem. I found that there already is a function called xmlXPathRewriteDOSExpression which performs this optimization for a very limited set of cases. It employs a complicated iteration scheme for rewritten expressions. AFAICS, this can be avoided by simply changing the axis of the expression like described above. With the attached patch against libxml2 and the files from bug #657665 I got the following results. Before: $ time xsltproc/xsltproc --noout service-names-port-numbers.xsl service-names-port-numbers.xml real 2m56.213s user 2m56.123s sys 0m0.080s After: $ time xsltproc/xsltproc --noout service-names-port-numbers.xsl service-names-port-numbers.xml real 0m3.836s user 0m3.764s sys 0m0.060s I also ran the libxml2 and libxslt test suites with the patch and couldn't detect any breakage. Nick >From e0f5a8261760e4f257b90410be27657e984237c8 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer <wellnhofer@aevum.de> Date: Sun, 19 Aug 2012 18:20:22 +0200 Subject: [PATCH] Optimizations for descendant-or-self::node() Currently, the function xmlXPathRewriteDOSExpression optimizes expressions of type '//child'. Instead of adding a 'rewriteType' and doing a compound traversal, the same can be achieved simply by setting the axis of the node test from 'child' to 'descendant'. There are also many other cases that can be optimized similarly. This commit augments xmlXPathRewriteDOSExpression to essentially rewrite the following subexpressions: - descendant-or-self::node()/child:: to descendant:: - descendant-or-self::node()/descendant:: to descendant:: - descendant-or-self::node()/self:: to descendant-or-self:: - descendant-or-self::node()/descendant-or-self:: to descendant-or-self:: Since the '//' shortcut in XPath is translated to '/descendant-or-self::node()/', this greatly speeds up expressions using '//' on large subtrees. | ||
| 3e62adbe | 2012-08-09 14:24:02 | Adding various checks on node type though the API Specifially checking against namespace nodes before accessing node pointers | ||
| cd852ad1 | 2012-07-30 10:12:18 | Implement some default limits in the XPath module This adds some internal limitationson XPath expression complexity, and limits at runtime like depth of the stack and maximum size for nodeset. * xpath.c: implement the above as well as the maximum Name lenght | ||
| ade10f2c | 2012-07-12 09:43:27 | Convert XPath to xmlBuf Easy as no buffer was exported in the APIs | ||
| 1d4526f6 | 2011-10-11 16:34:34 | Fix missing error status in XPath evaluation Started by Chris Evans, I added a few more place where the error should have been set in the evaluation context. | ||
| f5048b3e | 2011-08-18 17:10:13 | Hardening of XPath evaluation Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation. | ||
| a1540403 | 2011-05-06 17:03:51 | xpath: remove unused variable As noted by gcc, this variable is not beeing used. | ||
| d7958b21 | 2011-03-23 08:13:06 | Fix some potential problems on reallocation failures The count was incremented before the allocation and not fixed in case of failure * xpath.c: corrects a few instances where the available count of some structure is updated before we know the allocation actually succeeds | ||
| fec31bcd | 2010-11-18 11:07:24 | Small fix for previous commit | ||
| df83c17e | 2010-11-17 14:12:14 | Fix a potential freeing error in XPath | ||
| 0cbeb50e | 2010-11-15 12:06:29 | Fix a potential memory access error in case of a previus allocation error | ||
| ee32ad3c | 2010-11-03 20:53:55 | 629325 XPath rounding errors first cleanup https://bugzilla.gnome.org/show_bug.cgi?id=629325 not a full solution as Vincent Lefevre pointed out but an incremental improvement over the status-quo | ||
| ea90b894 | 2010-10-22 15:50:50 | Fix a change of semantic on XPath preceding and following axis This was introduced in the prevous fix, while preceding-sibling and following sibling axis are empty for attributes and namespaces, preceding and following axis should still work based on the parent element. However the parent element is not available for a namespace node, so we keep the axis empty in that case. | ||
| 2f3523f6 | 2010-10-15 18:30:29 | Fix a leak in XPath compilation Sometimes a not well formed XPath expression could lead to a leak as reported by Ralf Junker <ralfjunker@gmx.de> | ||
| 91d19754 | 2010-10-15 14:30:52 | Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification | ||
| 2ddecc23 | 2010-10-12 09:09:07 | Fix a small bug in XPath evaluation code | ||
| 729601f1 | 2009-10-12 22:42:26 | Fix memory leak in xmlXPathEvalExpression() * xpath.c: plug some leaks when parsing misformed XPath expressions * python/tests/xpathleak.py: expand the regression tests for those | ||
| 594e5dfb | 2009-09-07 14: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) | ||
| 13cee4e3 | 2009-09-05 14:52:55 | Fix a bunch of scan 'dead increments' and cleanup * HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c: fix unused variables, or unneeded increments as well as a couple of space issues * runtest.c: check for NULL before calling unlink() | ||
| bccae2d2 | 2009-06-04 11:22:45 | * c14n.c debugXML.c doc/examples/io2.c parser.c schematron.c valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string patch by Christian Persch, fixes #581612 | ||
| 48b3eb22 | 2009-03-25 09:51:19 | fixes for Borland/CodeGear/Embarcadero compilers by Eric Zurcher Daniel * include/wsockcompat.h win32/Makefile.bcb xpath.c: fixes for Borland/CodeGear/Embarcadero compilers by Eric Zurcher Daniel svn path=/trunk/; revision=3822 | ||
| db3ce969 | 2009-03-25 09:43:49 | xmlXPathRegisterNs should not allow enpty prefixes daniel * xpath.c: xmlXPathRegisterNs should not allow enpty prefixes daniel svn path=/trunk/; revision=3821 | ||
| f63085de | 2009-01-18 20:53:59 | port patch from Marcus Meissner to add gcc checking for printf like * include/libxml/parser.h include/libxml/xmlwriter.h include/libxml/relaxng.h include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in include/libxml/valid.h include/libxml/xmlschemas.h include/libxml/xmlerror.h: port patch from Marcus Meissner to add gcc checking for printf like functions parameters, should fix #65068 * doc/apibuild.py doc/*: modified the script accordingly and regenerated * xpath.c xmlmemory.c threads.c: fix a few warnings Daniel svn path=/trunk/; revision=3813 | ||
| 074f37e7 | 2008-09-01 13:38:22 | applied a couple of patches from Martin avoiding some leaks, fixinq QName * schematron.c xpath.c: applied a couple of patches from Martin avoiding some leaks, fixinq QName checks in XPath, XPath debugging and schematron code cleanups. * python/tests/Makefile.am python/tests/xpathleak.py: add the specific regression tests, just tweak it to avoid output by default Daniel svn path=/trunk/; revision=3791 | ||
| 45490aeb | 2008-07-29 09:13:19 | space and tabs cleanup Daniel * xpath.c: space and tabs cleanup Daniel svn path=/trunk/; revision=3756 | ||
| f88d849a | 2008-04-01 08:00:31 | two patches from Alvaro Herrera to avoid problem when running out of * xpath.c: two patches from Alvaro Herrera to avoid problem when running out of memory in XPath evaluations. Daniel svn path=/trunk/; revision=3721 | ||
| f179456d | 2007-08-23 12:58:13 | fixed mlXPathCompOpEvalPositionalPredicate problem with object caching * xpath.c: fixed mlXPathCompOpEvalPositionalPredicate problem with object caching (bug #469410) svn path=/trunk/; revision=3653 | ||
| 31700e63 | 2007-06-13 20:33:02 | fixed problem in previous fix to xmlXPathNodeSetSort * xpath.c: fixed problem in previous fix to xmlXPathNodeSetSort svn path=/trunk/; revision=3640 | ||
| 97ac819c | 2007-06-06 17:19:24 | fixed problem with xmlXPathNodeSetSort; fixed problem with * xpath.c: fixed problem with xmlXPathNodeSetSort; fixed problem with xmlXPathNodeTrailingSorted (both bug#413451) svn path=/trunk/; revision=3622 | ||
| d611c88a | 2007-05-31 05:07:17 | fixed problem with string value for PI node (bug #442275) * xpath.c: fixed problem with string value for PI node (bug #442275) svn path=/trunk/; revision=3621 | ||
| d2f682a4 | 2007-05-15 19:42:08 | fixed problem on gzip streams (bug #438045) fixed minor spot of redundant * nanohttp.c: fixed problem on gzip streams (bug #438045) * xpath.c: fixed minor spot of redundant code - no logic change. svn path=/trunk/; revision=3616 | ||
| ca79788e | 2007-05-11 14:45:53 | enhanced the coding for xmlXPathCastNumberToString in order to produce the * xpath.c: enhanced the coding for xmlXPathCastNumberToString in order to produce the required number of significant digits (bug #437179) svn path=/trunk/; revision=3615 | ||
| ee0b982f | 2007-03-07 08:15:01 | fixed xmlXPathCmpNodes for incorrect result on certain cases when * xpath.c: fixed xmlXPathCmpNodes for incorrect result on certain cases when comparing identical nodes (bug 415567) with patch from Oleg Paraschenko svn path=/trunk/; revision=3587 | ||
| 0bcec06d | 2007-02-14 02:15:19 | Fixed memory bug with invalid function reported by Francois Delyon on * xpath.c: Fixed memory bug with invalid function reported by Francois Delyon on mailing list svn path=/trunk/; revision=3584 | ||
| 11be2d02 | 2007-01-24 19:17:19 | added checks for alloc fail on calls to xmlXPathNewContext (libxslt bug * xpath.c: added checks for alloc fail on calls to xmlXPathNewContext (libxslt bug #400242) svn path=/trunk/; revision=3575 | ||
| fe3970e0 | 2006-11-23 16:08:30 | fixed a bug where the principal node type of an axis wasn't tested on name * xpath.c: fixed a bug where the principal node type of an axis wasn't tested on name check, fixes bug #377432 daniel | ||
| 17970a72 | 2006-10-26 08:55:47 | William spotted an obvious bug Daniel * xpath.c: William spotted an obvious bug Daniel | ||
| c465ffc2 | 2006-10-17 19:39:33 | applied patch from Olaf Walkowiak which should fix #334104 Daniel * xpath.c: applied patch from Olaf Walkowiak which should fix #334104 Daniel | ||
| 50128ad7 | 2006-08-15 13:04:07 | Applied the proposed fix for the documentation of xmlXPathCastToString(); * xpath.c: Applied the proposed fix for the documentation of xmlXPathCastToString(); see bug #346202. | ||
| 889b7622 | 2006-07-03 11:44:13 | Changed xmlXPathCollectAndTest() to use xmlXPathNodeSetAddNs() when adding * xpath.c: Changed xmlXPathCollectAndTest() to use xmlXPathNodeSetAddNs() when adding a ns-node in case of NODE_TEST_TYPE (the ns-node was previously added plainly to the list). Since for NODE_TEST_ALL and NODE_TEST_NAME this specialized ns-addition function was already used, I assume it was missed to be used with NODE_TEST_TYPE. | ||
| 2bdb12ff | 2006-06-29 10:49:59 | Fixed a double-free in xmlXPathCompOpEvalToBoolean(), revealed by a * xpath.c: Fixed a double-free in xmlXPathCompOpEvalToBoolean(), revealed by a Libxslt regression test. | ||
| 324c75b3 | 2006-06-29 10:31:35 | Enhanced xmlXPathCompOpEvalToBoolean() to be also usable outside predicate * xpath.c: Enhanced xmlXPathCompOpEvalToBoolean() to be also usable outside predicate evaluation; the intention is to use it via xmlXPathCompiledEvalToBoolean() for XSLT tests, like in <xsl:if test="/foo">. | ||
| 8af1f0bb | 2006-06-28 17:13:19 | Fix a memory leak which occurred when using * xpath.c: Fix a memory leak which occurred when using xmlXPathCompiledEvalToBoolean(). | ||
| 631ea817 | 2006-06-26 16:47:25 | Added xmlXPathCompiledEvalToBoolean() to the API and adjusted/added * xpath.c: Added xmlXPathCompiledEvalToBoolean() to the API and adjusted/added xmlXPathRunEval(), xmlXPathRunStreamEval(), xmlXPathCompOpEvalToBoolean(), xmlXPathNodeCollectAndTest() to be aware of a boolean result request. The new function is now used to evaluate predicates. | ||
| 6422d916 | 2006-06-26 14:31:53 | Fixed an bug in xmlXPathCompExprAdd(): the newly introduced field * xpath.c: Fixed an bug in xmlXPathCompExprAdd(): the newly introduced field @rewriteType on xmlXPathStepOp was not initialized to zero here; this could lead to the activation of the axis rewrite code in xmlXPathNodeCollectAndTest() when @rewriteType is randomly set to the value 1. A test (hardcoding the intial value to 1) revealed that the resulting incorrect behaviour is similar to the behaviour as described by Arnold Hendriks on the mailing list; so I hope that will fix the issue. | ||
| 766ed7e1 | 2006-06-23 16:32:41 | Fixed an error in xmlXPathEvalExpr(), which was introduced with the * xpath.c: Fixed an error in xmlXPathEvalExpr(), which was introduced with the addition of the d-o-s rewrite and made xpath.c unable to compile if XPATH_STREAMING was not defined (reported by Kupriyanov Anatolij - #345752). Fixed the check for d-o-s rewrite to work on the correct XPath string, which is ctxt->base and not comp->expr in this case. | ||
| 9bca933a | 2006-06-19 10:26:42 | Added optimization for positional predicates (only short-hand form "[n]"), * xpath.c: Added optimization for positional predicates (only short-hand form "[n]"), which have a preceding predicate: "/foo[descendant::bar][3]". | ||
| 7cb3fa9d | 2006-06-06 15:27:46 | Fixed self-invented a segfault in xmlXPathCtxtCompile(), when the * xpath.c: Fixed self-invented a segfault in xmlXPathCtxtCompile(), when the expression was not valid and @comp was NULL and I tried to do the d-o-s rewrite. | ||
| 080152c9 | 2006-06-06 09:42:15 | Enabled the compound traversal again; I added a check to use this only if * xpath.c: Enabled the compound traversal again; I added a check to use this only if the have an expression starting with the document node; so in the case of "//foo", we already know at compilation-time, that there will be only 1 initial context node. Added the rewrite also to xmlXPathEvalExpr(). | ||
| c42e9f64 | 2006-06-02 20:48:50 | Disabled the compound traversal for the release; I need first to assure * xpath.c: Disabled the compound traversal for the release; I need first to assure that this is done only if we have 1 initial node. | ||
| 1b2be101 | 2006-05-31 20:53:43 | fixed memory leak in xpath error reporting * xpath.c: fixed memory leak in xpath error reporting | ||
| 5869469f | 2006-05-31 12:37:28 | Changed the name of the recently added public function * xpath.c include/libxml/xpath.h runsuite.c: Changed the name of the recently added public function xmlXPathContextSetObjectCache() to xmlXPathContextSetCache(); so a more generic one, in case we decide to cache more things than only XPath objects. | ||
| df0ba264 | 2006-05-30 19:45:37 | Optimized xmlXPathNodeCollectAndTest() and xmlXPathNodeCollectAndTestNth() * xpath.c: Optimized xmlXPathNodeCollectAndTest() and xmlXPathNodeCollectAndTestNth() to evaluate a compound traversal of 2 axes when we have a "//foo" expression. This is done with a rewrite of the XPath AST in xmlXPathRewriteDOSExpression(); I added an additional field to xmlXPathStepOp for this (but the field's name should be changed). The mechanism: the embracing descendant-or-self axis traversal (also optimized to return only nodes which can hold elements), will produce context nodes for the inner traversal of the child axis. This way we avoid a full node-collecting traversal of the descendant-or-self axis. Some tests indicate that this can reduce execution time of "//foo" to 50%. Together with the XPath object cache this all significantly speeds up libxslt. | ||
| 75af2a87 | 2006-05-30 09:29:23 | Enhanced xmlXPathNodeCollectAndTest() to avoid recreation (if possible) of * xpath.c: Enhanced xmlXPathNodeCollectAndTest() to avoid recreation (if possible) of the node-set which is used to collect the nodes in the current axis for the currect context node. Especially for "//foo" this will decrease dramatically the number of created node-sets, since for each node in the result node-set of the evaluation of descendant-or-self::node() a new temporary node-set was created. Added node iterator xmlXPathNextChildElement() as a tiny optimization for child::foo. | ||
| a7248443 | 2006-05-29 16:15:36 | Added an XPath object cache. It sits on an xmlXPathContext and need to be * xpath.c include/libxml/xpath.h: Added an XPath object cache. It sits on an xmlXPathContext and need to be explicitely activated (or deactivated again) with xmlXPathContextSetObjectCache(). The cache consists of 5 lists for node-set, string, number, boolean and misc XPath objects. Internally the xpath.c module will use object- deposition and -acquisition functions which will try to reuse as many XPath objects as possible, and fallback to normal free/create behaviour if no cache is available or if the cache is full. * runsuite.c: Adjusted to deactivate the cache for XML Schema tests if a cache-creation is turned on by default for the whole library, e.g. for testing purposes of the cache. It is deactivated here in order to avoid confusion of the memory leak detection in runsuite.c. | ||
| 984a9aed | 2006-05-24 09:02:35 | Removed a memcpy if xmlXPathNodeSetMerge(); it seems we really need to * xpath.c: Removed a memcpy if xmlXPathNodeSetMerge(); it seems we really need to walk the whole list, since those nastly namespace nodes need to be added with xmlXPathNodeSetDupNs(); thus a pure memcpy is not possible. A flag on the node-set indicating if namespace nodes are in the set would help here; this is the 3rd flag which would be usefull with node-sets. The current flags I have in mind: 1) Is a node-set already sorted? This would allow for rebust and optimizable sorting behaviour. 2) Of what type are the nodes in the set (or of mixed type)? This would allow for faster merging of node-sets. 3) Are namespace nodes in the set? This would allow to skipp all the namespace node specific special handling. Faster node-set merging if the first set is empty; just memcpy the set. | ||
| 5691f436 | 2006-05-22 15:19:55 | Optimization of count(): eliminated sorting (see bug #165547). * xpath.c: Optimization of count(): eliminated sorting (see bug #165547). Optimization of XPATH_OP_FILTER if the predicate is a [1] (disable with XP_OPTIMIZED_FILTER_FIRST if it produces trouble). Tiny opt in xmlXPathNodeSetMerge(). | ||
| 64f7e1a8 | 2006-05-19 19:59:54 | Substituted all remaining calls to xmlXPathCmpNodes() for * xpath.c: Substituted all remaining calls to xmlXPathCmpNodes() for xmlXPathCmpNodesExt(). Tiny further enhancement of xmlXPathCmpNodesExt(). Added additional checks in various code parts to avoid calling sorting or merging functions if the node-set(s) don't need them; i.e., if they are empty or contain just one node. | ||
| 2bdabbd7 | 2006-05-19 11:26:15 | Optimized the comparison for non-element nodes in xmlXPathCmpNodesExt(); * xpath.c: Optimized the comparison for non-element nodes in xmlXPathCmpNodesExt(); the comparison is used for sorting of node-sets. This enhancement is related to bug #165547. There are other places where the old comparison function xmlXPathCmpNodes() is still called, but I currently don't know exactly what those calls are for; thus if they can be substituted (if it makes sense) for the new function. | ||
| 6ed2eb47 | 2006-05-16 15:13:37 | Applied patch from Rob Richards, fixing a potential memory leak in * xpath.c: Applied patch from Rob Richards, fixing a potential memory leak in xmlXPathTryStreamCompile(), when a list of namespaces was assigned to the XPath compilation context; here a new namespace list was created and passed to xmlPatterncompile(); but this list was not freed afterwards. Additionally we avoid now in xmlXPathTryStreamCompile() to compile the expression, if it has a colon - indicating prefixed name tests - and no namespace list was given. The streaming XPath mechanism needs a namespace list at compilation time (unlike normal XPath, where we can bind namespace names to prefixes at execution time). * pattern.c: Enhanced to use a string dict for local-names, ns-prefixes and and namespace-names. Fixed xmlStreamPushInternal() not to use string-pointer comparison if a dict is available; this won't work, since one does not know it the given strings originate from the same dict - and they normally don't do, since e.g. namespaces are hold on xmlNs->href. I think this would be worth an investigation: if we can add a @doc field to xmlNs and put the @href in to a additionan namespace dict hold in xmlDoc. Daniel will surely not like this idea :-) But evaluation of tons of elements/attributes in namespaces with xmlStrEqual() isn't the way we should go forever. | ||
| aac7c68e | 2006-03-10 13:40:16 | fix a few warning raised by gcc-4.1 and latests changes Daniel * c14n.c encoding.c xmlschemas.c xpath.c xpointer.c: fix a few warning raised by gcc-4.1 and latests changes Daniel | ||
| 11ce4004 | 2006-03-10 00: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 | ||
| d3ff7ef6 | 2006-02-27 19:43:17 | workaround HP-UX compiler bug by Rick Jones Daniel * xpath.c: workaround HP-UX compiler bug by Rick Jones Daniel | ||
| 97258713 | 2006-01-05 12:30:43 | Fixed bug #322928, reported by Erich Schubert: The bug was in pattern.c, * pattern.c xpath.c include/libxml/pattern.h: Fixed bug #322928, reported by Erich Schubert: The bug was in pattern.c, which is used for a tiny subset of xpath expression which can be evaluated in an optimized way. The doc-node was never considered when evaluating "//" expressions. Additionally, we fixed resolution to nodes of any type in pattern.c; i.e. a "//." didn't work yet, as it did select only element-nodes. Due to this issue the pushing of nodes in xpath.c needed to be adjusted as well. | ||
| b3d1491b | 2005-09-04 20:47:39 | prepare for release work for #303289, fix a formatting bug for MIN_INT * configure.in doc/* configure.in: prepare for release * xpath.c: work for #303289, fix a formatting bug for MIN_INT Daniel | ||
| f03a8cda | 2005-09-04 12:01:57 | fixing yet another pattern induced XPath bug #314282 reverted back last * pattern.c xpath.c include/libxml/pattern.h: fixing yet another pattern induced XPath bug #314282 * relaxng.c: reverted back last change it was seriously broken Daniel | ||
| 8bda20f7 | 2005-08-24 09:36:47 | removed a potentially uninitialized variable error fixed a deprecation * xpath.c: removed a potentially uninitialized variable error * python/generator.py: fixed a deprecation warning * python/tests/tstLastError.py: silent the damn test when Okay ! Daniel | ||
| 24505b0f | 2005-07-28 23:49:35 | a lot of small cleanups based on Linus' sparse check output. Daniel * HTMLparser.c SAX2.c encoding.c globals.c parser.c relaxng.c runsuite.c runtest.c schematron.c testHTML.c testReader.c testRegexp.c testSAX.c testThreads.c valid.c xinclude.c xmlIO.c xmllint.c xmlmodule.c xmlschemas.c xpath.c xpointer.c: a lot of small cleanups based on Linus' sparse check output. Daniel | ||
| ed6c5497 | 2005-07-23 15:00:22 | changed xmlPatterncompile signature to pass an int and not an enum since * pattern.c include/libxml/pattern.h: changed xmlPatterncompile signature to pass an int and not an enum since it can generate ABI compat troubles. * include/libxml/schematron.h schematron.c: adding the new schematron code, work in progress lots to be left and needing testing * include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in Makefile.am configure.in: integration of schematron into the build * xpath.c include/libxml/xpath.h: adding flags to control compilation options right now just XML_XPATH_CHECKNS. Daniel | ||
| 32f0f717 | 2005-07-14 07:00:33 | Changed the behaviour of xmlXPathEqualNodeSetFloat to return TRUE if a * xpath.c: Changed the behaviour of xmlXPathEqualNodeSetFloat to return TRUE if a nodeset with a numeric value of NaN is compared for inequality with any numeric value (bug 309914). | ||
| 1f33c4d6 | 2005-07-10 21:38:31 | preparing to make testsuite releases along with code source releases fixed * xstc/Makefile.am README README.tests Makefile.tests Makefile.am: preparing to make testsuite releases along with code source releases * gentest.py testapi.c: fixed a couple of problem introduced by the new Schemas support for Readers * xpath.c: fixed the XPath attribute:: bug #309580, #309864 in a crude but simple way. * xmlschemas.c include/libxml/tree.h: fixed a couple of problems raised by the doc builder. * doc/*: made rebuild Daniel | ||
| ea152c05 | 2005-06-09 18:12:28 | Further enhancement for XPath streaming, consolidated with schemas usage * pattern.c, xpath.c, include/libxml/pattern.h: Further enhancement for XPath streaming, consolidated with schemas usage of pattern.c. Added a new enum xmlPatternFlags. * doc/*, testapi.c, elfgcchack.h: updated to reflect new enum. * test/XPath/tests/mixedpat, test/XPath/docs/mixed, result/XPath/mixedpat: added regression test for problems reported in bug306348 | ||
| fbb619f4 | 2005-06-06 13:49:18 | Enhanced xmlXPathRunStreamEval, fixed handling of depth/level for cases * xpath.c, pattern.c: Enhanced xmlXPathRunStreamEval, fixed handling of depth/level for cases like union operator (bug #306348 reported by Bob Stayton). Also enhanced several comments throughout pattern.c. * doc/apibuild.py: fixed problem in handling of 'signed' declaration. Rebuilt the docs. | ||
| dbfe05af | 2005-05-04 09:18:00 | on linux/gcc use weak definitions to avoid linking with pthread library on * Makefile.am configure.in threads.c: on linux/gcc use weak definitions to avoid linking with pthread library on non-threaded environments. * xpath.c: applied patch from Mark Vakoc w.r.t. a buggy namespace list allocation. Daniel | ||
| 3d426663 | 2005-04-19 14:40:28 | Added some code to avoid integer overflow for ceil, floor and round * xpath.c: Added some code to avoid integer overflow for ceil, floor and round functions (bug 301162) | ||
| d6e347e8 | 2005-04-15 01:34:41 | Applied Daniel's fix for memory leak in dtd prefix (bug 300550). minor * valid.c: Applied Daniel's fix for memory leak in dtd prefix (bug 300550). * xpath.c: minor change to comment only | ||
| 2c19a7bf | 2005-04-10 01:03:23 | fixed several places where memory cleanup was not properly done after an * xpath.c: fixed several places where memory cleanup was not properly done after an error was detected (problem was reported on the mailing list by Pawel Palucha) | ||
| 4ddaa56d | 2005-04-06 14:09:08 | fixed the bug in lang() as raised by Elliotte Rusty Harold added a * xpath.c: fixed the bug in lang() as raised by Elliotte Rusty Harold * result/XPath/tests/langsimple test/XPath/tests/langsimple test/XPath/docs/lang: added a regression test Daniel | ||
| 5d4644ef | 2005-04-01 13: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 | ||
| 12d37ab6 | 2005-02-21 13:54:07 | fixed problem when XMLLINT_INDENT was empty (bug 168033). fixed * xmlsave.c: fixed problem when XMLLINT_INDENT was empty (bug 168033). * xpath.c: fixed compilation warning, no change to logic. * xmlschemastypes.c: fixed compilation warning, no change to logic. | ||
| fa1f77f2 | 2005-02-21 10:44:36 | fixed remaining known bugs in the XPath streaming, and switched XPath to * pattern.c xpath.c: fixed remaining known bugs in the XPath streaming, and switched XPath to use it by default when possible Daniel | ||
| 56de87ee | 2005-02-16 00:22:29 | fix the comment to describe the real return values lot of work on the * encoding.c: fix the comment to describe the real return values * pattern.c xpath.c include/libxml/pattern.h: lot of work on the patterns, pluggin in the XPath default evaluation, but disabled right now because it's not yet good enough for XSLT. pattern.h streaming API are likely to be changed to handle relative and absolute paths in the same expression. Daniel | ||
| cd65bc9a | 2005-01-06 09:39:18 | fixed problem with xmlXPathErr when error number subscript was out of * xpath.c: fixed problem with xmlXPathErr when error number subscript was out of range (bug 163055) | ||
| 21e4ef20 | 2005-01-02 09:53:13 | Re-examined the problems of configuring a "minimal" library. Synchronized the header files with the library code in order to assure that all the various conditionals (LIBXML_xxxx_ENABLED) were the same in both. Modified the API database content to more accurately reflect the conditionals. Enhanced the generation of that database. Although there was no substantial change to any of the library code's logic, a large number of files were modified to achieve the above, and the configuration script was enhanced to do some automatic enabling of features (e.g. --with-xinclude forces --with-xpath). Additionally, all the format errors discovered by apibuild.py were corrected. * configure.in: enhanced cross-checking of options * doc/apibuild.py, doc/elfgcchack.xsl, doc/libxml2-refs.xml, doc/libxml2-api.xml, gentest.py: changed the usage of the <cond> element in module descriptions * elfgcchack.h, testapi.c: regenerated with proper conditionals * HTMLparser.c, SAX.c, globals.c, tree.c, xmlschemas.c, xpath.c, testSAX.c: cleaned up conditionals * include/libxml/[SAX.h, SAX2.h, debugXML.h, encoding.h, entities.h, hash.h, parser.h, parserInternals.h, schemasInternals.h, tree.h, valid.h, xlink.h, xmlIO.h, xmlautomata.h, xmlreader.h, xpath.h]: synchronized the conditionals with the corresponding module code * doc/examples/tree2.c, doc/examples/xpath1.c, doc/examples/xpath2.c: added additional conditions required for compilation * doc/*.html, doc/html/*.html: rebuilt the docs |