include/libxml


Log

Author Commit Date CI Message
Daniel Veillard 3b666224 2012-08-13T17:49:15 Fix const qualifyer to definition of xmlBufferDetach For https://bugzilla.gnome.org/show_bug.cgi?id=676629 As the buffer is beng mdified by the call the const doesn't make sense.
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 Richard G 5706b6d8 2012-08-06T11:32:54 Various "make distcheck" and portability fixups Makefile.am: * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make variable, it allows overriding the value at the command line, and (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS assignment when @MODULE_PLATFORM_LIBS@ is empty * Changed how the THREADS_W32 mechanism switches the build between testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL allows this to work cleanly and plays well with dependencies * testapi.c should be specified as BUILT_SOURCES * Create symlinks to the test/ and result/ subdirs so that the runtests target is usable in out-of-source-tree builds * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f" instead of just "rm" is good form * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to pass configure.in: * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been superceded by LT_INIT * Don't rebuild docs by default, as this requires GNU Make (as implemented) * Check for uint32_t as some platforms don't provide it * Check for some more functions, and undefine HAVE_MMAP if we don't also HAVE_MUNMAP (one system I tested on actually needed this) * Changed THREADS_W32 from a filename insert into an Automake conditional * The "Copyright" file will not be in the current directory if builddir != srcdir doc/Makefile.am: * EXTRA_DIST cannot use wildcards when they refer to generated files; this breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU Make $(wildcard) directives to build up a list of files, and EXTRA_DIST, as a literal expansion of EXTRA_DIST_wc. I also added a new rule, "check-extra-dist", to simplify checking that the two variables are equivalent. (Note that this works only when builddir == srcdir) (I can implement this differently if desired; this is just one way of doing it) * Don't define an "all" target; this steps on Automake's toes * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for dependencies (as Make doesn't process the wildcards otherwise) and qualifying appropriate files with $(srcdir) (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH, which we can count on as this is GNU-Make-only code anyway) doc/devhelp/Makefile.am: * Qualified appropriate files with $(srcdir) * Added an "uninstall-local" rule so that "make distcheck" passes doc/examples/Makefile.am: * Rather than use a wildcard that doesn't work, use a substitution that most Make programs can handle doc/examples/index.py: * Do the same here include/libxml/nanoftp.h: * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET: user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\ Include$ grep -R INVALID_SOCKET . ./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0) ./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0) include/libxml/xmlversion.h.in: * Support ancient GCCs (I was actually able to build the library with 2.5 but for this bit) python/Makefile.am: * Expanded CLEANFILES to allow "make distcheck" to pass python/tests/Makefile.am: * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow "make distcheck" to pass testRelax.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some systems have the header but not the function) testSchemas.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H testapi.c: * Don't use putenv() if it's not available threads.c: * This fixes the following build error on Solaris 8: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \ -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \ -xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o "threads.c", line 442: controlling expressions must have scalar type "threads.c", line 512: controlling expressions must have scalar type cc: acomp failed for threads.c *** Error code 1 trio.c: * Define isascii() if the system doesn't provide it trio.h: * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion win32/configure.js: * Added support for the LZMA compression option win32/Makefile.{bcb,mingw,msvc}: * Added appropriate bits to support WITH_LZMA=1 * Install the header files under $(INCPREFIX)\libxml2\libxml instead of $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools xml2-config.in: * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for `xml2-config --libs` to provide a complete set of dependencies xmllint.c: * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
Daniel Veillard e258adec 2012-08-06T11:16:30 Provide new accessors for xmlOutputBuffer To avoid digging into buf->buffer insternal strcuture the two new entry points xmlOutputBufferGetContent() and xmlOutputBufferGetSize() should make the ode cleaner. * include/libxml/xmlIO.h: add two new functions * xmlIO.c: impement the 2 functions based on the new buffer entry points
Daniel Veillard 18e1f1f1 2012-08-06T10:16:41 Improvements for old buffer compatibility Now tree.h exports LIBXML2_NEW_BUFFER macro indicating that the API uses the new buffers, important to keep code working with both versions. * tree.h buf.h: also export xmlBufContent(), xmlBufEnd(), and xmlBufUse() to help port the old code * buf.c: make sure the compatibility counters are updated on buffer usage, to keep proper working of application compiled against the old structures, but take care of int overflow
Daniel Veillard 52d8ade7 2012-07-30T10:08:45 Introduce some default parser limits Those can be overrided by the XML_PARSE_HUGE option, they are just default limits for Name lenght, dictionary size limits and maximum amount of parser lookup. * include/libxml/parserInternals.h: define the limits * include/libxml/xmlerror.h: add a new error * parser.c parserInternals.c: implements the new limits
Daniel Veillard 7c693dad 2012-07-25T16:32:18 Cleanups and new limit APIs for dictionaries * include/libxml/dict.h dict.c: adding 2 new functions xmlDictGetUsage and xmlDictSetLimit allowing to review the amount of memory allocated for dictionary strings. Aslo cleanup of various signed int used as size values in the code.
Daniel Veillard 57560386 2012-07-24T11:44:23 Cleanup URI module memory allocation code * uri.c: cleanup the code doing the allocations, set up a structured error handler to report memory errors, and set up an abitrary limit on URI saving size * error.c include/libxml/xmlerror.h: add a new FROM_URI indication for structured error reporting, also adding strings for schematron and buffer which were missing
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 65c7d3b2 2012-07-16T14:13:58 Incompatible change to the Input and Output buffers Since the whole set of structures was public, the only way to switch to size_t clean buffer is to introduce an incompatible API change. Modifying the xmlParserInputBuffer and xmlOutputBuffer structures is the best place to make this change as those structures are deep into the parser feeding data, and no public API suggest to build those manually.
Daniel Veillard bca22f40 2012-07-11T16:48:47 Adding a new buf module for buffers This also add converter functions between xmlBuf and xmlBuffer * buf.c buf.h: the old xmlBuffer routines but modified for size_t and using xmlBuf instead of xmlBuffer * Makefile.am: add the 2 new files * include/libxml/xmlerror.h: add an entry for the new module * include/libxml/tree.h: expose the xmlBufPtr type but not the structure which stay private
Daniel Veillard 379ebc1d 2012-05-18T15:41:31 Cleanup on randomization tsan reported that rand() is not thread safe, so create a thread safe wrapper, use rand_r() if available. Consolidate the function, initialization and cleanup in dict.c and make sure it is initialized in xmlInitParser()
Daniel Veillard 0d51cfeb 2012-05-15T11:18:40 Fix a race in xmlNewInputStream For https://bugzilla.gnome.org/show_bug.cgi?id=643148 Reported by Bill Clarke <llib@computer.org>, it used a global variable as a counter for the input id and this was not thread safe. To avoid the race without adding unneeded locking in the parser path, move the id to the parser context instead.
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>
Michael Cronenworth 1eabc314 2012-05-10T11:25:38 Fix library problems with mingw-w64 For https://bugzilla.gnome.org/show_bug.cgi?id=663588 Fix a windows only issue when compiling the library with MingW (64 bits) using Fedora cross-compiler chain. Change the dllexport for data
Noam Postavsky 15794990 2012-03-19T16:08:16 add function xmlTextReaderRelaxNGValidateCtxt() Since there is xmlTextReaderSchemaValidateCtxt() it seems like there should be an equivalent RelaxNG function. The attached patch adds it. The code is essentially the same as Schema implementation, but I'm uncertain as to how to add things to the documentation and test suite: there seems to be a lot of auto-generation going on.
Anders F Bjorklund eae52617 2011-09-18T16:59:13 add lzma compression support
Daniel Veillard f5048b3e 2011-08-18T17: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.
Daniel Veillard c62efc84 2011-05-16T16:03:50 Add options to ignore the internal encoding For both XML and HTML, the document can provide an encoding either in XMLDecl in XML, or as a meta element in HTML head. This adds options to ignore those encodings if the encoding is known in advace for example if the content had been converted before being passed to the parser. * parser.c include/libxml/parser.h: add XML_PARSE_IGNORE_ENC option for XML parsing * include/libxml/HTMLparser.h HTMLparser.c: adds the HTML_PARSE_IGNORE_ENC for HTML parsing * HTMLtree.c: fix the handling of saving when an unknown encoding is defined in meta document header * xmllint.c: add a --noenc option to activate the new parser options
Daniel Veillard 4c2e7c65 2010-11-04T18:35:57 Release of libxml2-2.7.8
Giuseppe Iuculano 48f7dcb7 2010-11-04T17:42:42 480323 add code to plug in ICU converters by default This is not configured in by default but after some serious massaging incorporate that patch from Chromium/Chrome.
Ozkan Sezer f99d2223 2010-11-04T12:08:08 614087 Fix Socket API usage to allow Windows64 compilation In Windows 64 a socket is no more represented by an int, this breaks the nanoftp API and nanoftp/nanohttp, the patch changes this and fix the API for Win64 Regenerated the XML and documentation as a result too.
Adrian Bunk 64b0d60c 2010-11-04T09:43:31 Switch from the obsolete mkinstalldirs to AC_PROG_MKDIR_P This was obsoleted in 2005 so we should be safe. But keep AC_PREREQ to 2.59 as it's still widely deployed.
Adam Spragg d2e62311 2010-11-03T15:33:40 Add xmlSaveOption XML_SAVE_WSNONSIG non destructive indentation option using spaces within markup constructs and hence not modifying content * include/libxml/xmlsave.h: new option * xmlsave.c: some refactoring and new code for the new option * xmllint.c: adds --pretty option where option 2 uses the new formatting
Daniel Veillard f1121c48 2010-07-26T14:02:42 Add an HTML parser option to avoid a default doctype - include/libxml/HTMLparser.h: defines the new HTML parser option HTML_PARSE_NODEFDTD - HTMLparser.c: if option is set don't add a default DTD - xmllint.c: add the corresponding --nodefdtd option in xmllint
Eugene Pimenov 615904f5 2010-03-15T15:16:02 Switch the HTML parser to be non-recursive * HTMLparser.c: new htmlParseElementInternal non recursive, with htmlParseContentInternal and new function to handle node info and element end. * include/libxml/parser.h: add new stack for element info in parser context * parserInternals.c: fee element info stack
Roumen Petrov 120a2699 2010-03-10T10:07:49 Fix build with mingw - include/libxml/xmlexports.h: restore export decoration otherwise xsltproc and xmlsec crash - libxml.h: define LIBXML_STATIC for static build - configure.in: enable modules support for mingw* builds - Makefile.am: flags for testdso if modules support enabled
Daniel Veillard e20fb5a7 2010-01-29T20:47:08 Fix xmlParseInNodeContext for HTML content xmlParseInNodeContext notices that the enclosing document is an HTML document, so invoke the HTML parser for that fragment, and the HTML parser finding a "<p>hello world!</p>" document automatically augment it with defaulted <html> and <body>. This defaulting should be turned off in the HTML parser for this to work, but there is no such HTML parser option. There is an htmlOmittedDefaultValue global variable that you could use, but really we should not rely on global variable for processing options anymore, best is to add an HTML_PARSE_NOIMPLIED. * include/libxml/HTMLparser.h: add the HTML_PARSE_NOIMPLIED parser flag * HTMLparser.c: do add implied element if HTML_PARSE_NOIMPLIED is set * parser.c: add HTML_PARSE_NOIMPLIED to options for xmlParseInNodeContext on HTML documents
Daniel Veillard 57f71aed 2009-09-09T18:57:26 594250 rename ATTRIBUTE_ALLOC_SIZE to avoid clashes * include/libxml/xmlmemory.h include/libxml/xmlversion.h.in: rename it to LIBXML_ATTR_ALLOC_SIZE to avoid conflicts in public headers
Paul Smith 65d359e3 2009-09-07T15:24:24 Fix the globals.h to use XMLPUBFUN * include/libxml/globals.h: in addition to the extern extern Paul Smith noted that XMLPUBFUN should be used instead of LIBXML_DLL_IMPORT
Daniel Veillard 82cf412d 2009-09-07T15:20:24 Problem with extern extern in header * include/libxml/globals.h: LIBXML_DLL_IMPORT should not be followed by extern * include/libxml/xmlmemory.h: fix the same problem but in a comment
Stefan Behnel b9590e9c 2009-08-24T19:45:54 440226 Add xmlXIncludeProcessTreeFlagsData API * xinclude.c include/libxml/xinclude.h: new function similar to xmlXIncludeProcessFlagsData but operating on a subtree
Wang Lam 1de382eb 2009-08-24T17:34:25 Fix SetGenericErrorFunc and SetStructured clash * include/libxml/globals.h globals.c global.data: define a new global variable (per thread) for structured error reporting, to not conflict with generic one * error.c: when defined use the structured error report over any generic one
Daniel Veillard 029a04d2 2009-08-24T12:50:23 541335 HTML avoid creating 2 head or 2 body element * HTMLparser.c: check when we see an head or a body tag and avoid autogenerating them * include/libxml/parser.h: the values for ctxt->html change depending on the head or body tags being seen
Daniel Veillard f39eafaa 2009-08-20T19:15:08 Make xmlRecoverDoc const (Martin Trappel) * include/libxml/parser.h parser.c: just make the parameter a const
Daniel Veillard fcf2457d 2009-08-12T23:02:08 Both args of xmlStrcasestr are const * include/libxml/xmlstring.h xmlstring.c: fix the constness of the second arg of xmlStrcasestr()
Daniel Veillard a194ccb8 2009-08-10T10:08:41 Try to avoid __imp__xmlFree link trouble on msys * include/libxml/xmlexports.h: when compiling with mingw/MSYS or linking to an precompiled library this _imp__xmlFree missing at runtime is a common problem. Igor and various people faced it and this seems the minimal fix for it, should resolve 590302 and 561340
Aleksey Sanin 175beba0 2009-07-09T22:54:00 Fix a couple of ABI issues with C14N 1.1 * include/libxml/c14n.h c14n.c: fix API to not include enum xmlC14NMode in the arguments, and do a bit more check on input
Aleksey Sanin 83868247 2009-07-09T10:26:22 Aleksey Sanin support for c14n 1.1 * c14n.c include/libxml/c14n.h: adds support for C14N 1.1, new flags at the API level * runtest.c Makefile.am testC14N.c xmllint.c: add support in CLI tools and test binaries * result/c14n/1-1-without-comments/* test/c14n/1-1-without-comments/*: add a new batch of tests
Daniel Veillard f076f348 2009-04-15T09:20:25 change ATTRIBUTE_PRINTF into LIBXML_ATTR_FORMAT to avoid macro name * 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: change ATTRIBUTE_PRINTF into LIBXML_ATTR_FORMAT to avoid macro name collisions with other packages and headers as reported by Belgabor and Mike Hommey daniel svn path=/trunk/; revision=3827
Daniel Veillard 97ff9b36 2009-01-18T21:43:30 preparing 0.7.3 release fix a typo in a name Daniel * configure.in doc/xml.html doc/*: preparing 0.7.3 release * include/libxml/parserInternals.h SAX2.c: fix a typo in a name Daniel svn path=/trunk/; revision=3814
Daniel Veillard f63085de 2009-01-18T20: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
Daniel Veillard d032a5bc 2009-01-18T19:41:26 windows header should get the same define Daniel * include/libxml/xmlwin32version.h.in: windows header should get the same define Daniel svn path=/trunk/; revision=3812
Daniel Veillard d4d47057 2009-01-18T17:26:02 apply patch from Marcus Meissner to add gcc attribute alloc_size should * include/libxml/xmlversion.h.in include/libxml/xmlmemory.h: apply patch from Marcus Meissner to add gcc attribute alloc_size should fix #552505 * doc/apibuild.py doc/* testapi.c: regenerate the API * include/libxml/parserInternals.h: fix a comment problem raised by apibuild.py daniel svn path=/trunk/; revision=3811
Daniel Veillard 1fb2e0df 2009-01-18T14:08:36 add a new define XML_MAX_TEXT_LENGHT limiting the maximum size of a single * include/libxml/parserInternals.h SAX2.c: add a new define XML_MAX_TEXT_LENGHT limiting the maximum size of a single text node, the defaultis 10MB and can be removed with the HUGE parsing option Daniel svn path=/trunk/; revision=3808
Rob Richards b9ed017d 2009-01-05T17:28:50 add XML_PARSE_OLDSAX parser option to enable pre 2.7 SAX behavior. * include/libxml/parser.h parser.c: add XML_PARSE_OLDSAX parser option to enable pre 2.7 SAX behavior. svn path=/trunk/; revision=3807
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 856d9281 2008-09-25T14:31:40 new options to serialize as XML/HTML/XHTML and restore old entry point * include/libxml/xmlsave.h xmlsave.c: new options to serialize as XML/HTML/XHTML and restore old entry point behaviours Daniel svn path=/trunk/; revision=3794
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 0161e638 2008-08-28T15:36:32 completely different fix for the recursion detection based on entity * parser.c include/libxml/parser.h: completely different fix for the recursion detection based on entity density, big cleanups in the entity parsing code too * result/*.sax*: the parser should not ask for used defined versions of the predefined entities * testrecurse.c: automatic test for entity recursion checks * Makefile.am: added testrecurse * test/recurse/lol* test/recurse/good*: a first set of tests for the recursion Daniel svn path=/trunk/; revision=3783
Daniel Veillard 49d4405a 2008-08-27T19:57:06 a bit of cleanup and added checks based on the regression tests of the * include/libxml/xmlerror.h parser.c: a bit of cleanup and added checks based on the regression tests of the xmlconf suite Daniel svn path=/trunk/; revision=3782
Daniel Veillard a8f09ce8 2008-08-27T13:02:01 cleanup entity pushing error handling based on a patch from Ashwin daniel * include/libxml/parserInternals.h parser.c: cleanup entity pushing error handling based on a patch from Ashwin daniel svn path=/trunk/; revision=3779
Daniel Veillard 8915c150 2008-08-26T13:05:34 strengthen some of the internal parser limits, add an XML_PARSE_HUGE * include/libxml/parser.h parser.c xmllint.c: strengthen some of the internal parser limits, add an XML_PARSE_HUGE option to bypass them all. More internal parser limits will still need to be added. Daniel svn path=/trunk/; revision=3777
Daniel Veillard 54bd29b7 2008-08-26T07:26:55 patch based on Wieant Nielander contribution to add the option of not * include/libxml/parser.h xinclude.c xmllint.c: patch based on Wieant Nielander contribution to add the option of not doing URI base fixup in XInclude Daniel svn path=/trunk/; revision=3775
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 f4f4e485 2008-08-25T08:57:48 rework the patch to avoid some ABI issue with people allocating entities * include/libxml/entities.h entities.c SAX2.c parser.c: rework the patch to avoid some ABI issue with people allocating entities structure directly Daniel svn path=/trunk/; revision=3773
Daniel Veillard 4bf899bf 2008-08-20T17:04:30 fix for CVE-2008-3281 Daniel * include/libxml/parser.h include/libxml/entities.h entities.c parserInternals.c parser.c: fix for CVE-2008-3281 Daniel svn path=/trunk/; revision=3772
Daniel Veillard d7af5553 2008-08-04T15:29:44 rewrite the URI parser to update to rfc3986 (from 2396) removed the error * uri.c include/libxml/uri.h: rewrite the URI parser to update to rfc3986 (from 2396) * test/errors/webdav.xml result/errors/webdav.xml*: removed the error test, 'DAV:' is a correct URI under 3986 * Makefile.am: small cleanup in make check Daniel svn path=/trunk/; revision=3763
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 37334576 2008-07-31T08:20:02 added a skipped list, insert rmt-ns10-035 improve 'make check' clean up * runxmlconf.c: added a skipped list, insert rmt-ns10-035 * Makefile.am: improve 'make check' * include/libxml/xmlerror.h parser.c: clean up namespace errors checking and reporting, errors when a document is labelled as UTF-16 while it is parsed as UTF-8 and no encoding was given explicitely. * result/errors/webdav.xml.*: some warnings are no recategorized as Namespace errors Daniel svn path=/trunk/; revision=3761
Daniel Veillard 09459bf1 2008-07-30T12:58:11 add xmlMemDisplayLast to help debug incremental memory leaks, and some * include/libxml/xmlmemory.h xmlmemory.c: add xmlMemDisplayLast to help debug incremental memory leaks, and some cleanups * runxmlconf.c: use that new call and avoid ever touching the system catalog in the regression tests Daniel svn path=/trunk/; revision=3760
Daniel Veillard 40ec29a5 2008-07-30T12:35:40 an XML-1.0 document can't load an 1.1 entity when using entities make sure * parser.c include/libxml/xmlerror.h: an XML-1.0 document can't load an 1.1 entity * runxmlconf.c: when using entities make sure we load them Daniel svn path=/trunk/; revision=3759
Daniel Veillard 34e3f641 2008-07-29T09:02:27 implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stick * include/libxml/parser.h include/libxml/xmlerror.h parser.c: implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stick to old behaviour * testapi.c gentest.py: modified slightly and regenerated * Makefile.am: add testchar Daniel svn path=/trunk/; revision=3755
Daniel Veillard 438ebbd5 2008-05-12T12:58:46 fx compilation when configured without the reader should fix #513110 * xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h python/types.c python/libxml_wrap.h python/libxml.c: fx compilation when configured without the reader should fix #513110 * doc/*: regenerated Daniel svn path=/trunk/; revision=3743
Daniel Veillard dee23485 2008-04-11T12:58:43 added new function xmlSchemaValidCtxtGetParserCtxt based on Holger * include/libxml/xmlschemas.h xmlschemas.c: added new function xmlSchemaValidCtxtGetParserCtxt based on Holger Kaelberer patch * doc/apibuild.py doc/*: regenerated the doc, chased why the new function didn't got any documentation, added more checking in the generator * include/libxml/relaxng.h include/libxml/schematron.h include/libxml/xmlschemas.h include/libxml/c14n.h include/libxml/xmlregexp.h include/libxml/globals.h include/libxml/xmlreader.h threads.c xmlschemas.c: various changes and cleanups following the new reports Daniel svn path=/trunk/; revision=3738
Daniel Veillard e43579b2 2008-04-03T04:56:04 small doc improvement for xmlXPathContext from Jack Jansen, fixes #524759 * include/libxml/xpath.h: small doc improvement for xmlXPathContext from Jack Jansen, fixes #524759 * doc/newapi.xsl doc/*: fixed a problem and regenerated the docs Daniel svn path=/trunk/; revision=3722
Daniel Veillard 68b6e02b 2008-03-31T09:26:00 lot of out of memory handling fixes from Ashwin work around a problem with * parser.c: lot of out of memory handling fixes from Ashwin * elfgcchack.h doc/elfgcchack.xsl: work around a problem with xmlDllMain * include/libxml/threads.h: indenting cleanups Daniel svn path=/trunk/; revision=3720
Daniel Veillard c4b0debc 2008-03-14T12:46:42 applied patch from Tobias Minich to allow plugin schematron error * include/libxml/schematron.h include/libxml/xmlerror.h schematron.c: applied patch from Tobias Minich to allow plugin schematron error reporting in the normal error system, should fix #513998 Daniel svn path=/trunk/; revision=3707
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
Rob Richards e967f0bd 2007-06-08T19:36:04 *use specified calling convention for xmlDllMain. Old SDKs (VC6) only support InterlockedCompareExchange. add xmlDllMain to header for win32 when building for static dll svn path=/trunk/; revision=3624
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 a1413b84 2007-04-26T08:33:28 patch from Richard Jones to save the query part in raw form. Daniel * uri.c include/libxml/uri.h: patch from Richard Jones to save the query part in raw form. Daniel svn path=/trunk/; revision=3607
Daniel Veillard 7ef51690 2007-03-21T16:47:12 applied documentation patch from James Dennett Daniel * include/libxml/xpath.h: applied documentation patch from James Dennett Daniel svn path=/trunk/; revision=3595
Aleksey Sanin d8377640 2007-01-03T23:13:12 expose xmlTextReaderSetup function svn path=/trunk/; revision=3571
Daniel Veillard 602f2bd0 2006-12-04T09:26:04 patch from Michael Day on standalone and XML declaration detection, and * parser.c include/libxml/tree.h: patch from Michael Day on standalone and XML declaration detection, and associated documentation change Daniel
Daniel Veillard c8338f1a 2006-10-25T16:06:29 preparing release of libxml2-2.6.27 fix a small problem with preproc flags * NEWS configure.in testapi.c doc//*: preparing release of libxml2-2.6.27 * include/libxml/tree.h: fix a small problem with preproc flags 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 f4721d66 2006-10-11T21:12:10 fix comment on versions do not spend too much time digging in dumped * include/libxml/xmlversion.h.in: fix comment on versions * xmlmemory.c: do not spend too much time digging in dumped memory Daniel
Daniel Veillard a37a6ad9 2006-10-10T20:05:45 trying to fix entities behaviour when using SAX, had to extend entities * include/libxml/entities.h entities.c SAX2.c parser.c: trying to fix entities behaviour when using SAX, had to extend entities content and hack on the entities processing code, but that should fix the long standing bug #159219 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
Daniel Veillard 681e904e 2006-09-29T09:16:00 fixed a comment applied a patch from Michael Day to add a new function * xmlsave.c: fixed a comment * xinclude.c include/libxml/xinclude.h: applied a patch from Michael Day to add a new function providing the _private field for the generated parser contexts xmlXIncludeProcessFlagsData() Daniel
Daniel Veillard 34c647cf 2006-09-21T06:53:59 exports htmlNewParserCtxt() as Michael Day pointed out this is needed to * HTMLparser.c include/libxml/HTMLparser.h: exports htmlNewParserCtxt() as Michael Day pointed out this is needed to use htmlCtxtRead*() Daniel
Daniel Veillard 75acfeea 2006-07-13T06:29:56 applied patch from Andrew W. Nosenko to expose if zlib support was * configure.in parser.c xmllint.c include/libxml/parser.h include/libxml/xmlversion.h.in: applied patch from Andrew W. Nosenko to expose if zlib support was compiled in, in the header, in the feature API and in the xmllint --version output. Daniel
Kasimier T. Buchcik 631ea817 2006-06-26T16: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.
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 803e37ac 2006-06-09T19:46:46 Clarified in the docs that the tree must not be tried to be modified if * include/libxml/parser.h: Clarified in the docs that the tree must not be tried to be modified if using the parser flag XML_PARSE_COMPACT as suggested by Stefan Behnel (#344390).
Kasimier T. Buchcik 5869469f 2006-05-31T12: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.
Kasimier T. Buchcik e5f810f6 2006-05-30T09:41:25 A warning will now be reported in the value of the XSD attribute * xmlschemas.c: A warning will now be reported in the value of the XSD attribute 'schemaLocation' does not consist of tuples (namespace-name, document-URI). A warning will be reported if a schema document could not be found at the specified location (via 'schemaLocation' or 'noNamespaceSchemaLocation'). * include/libxml/xmlerror.h: Added XML_SCHEMAV_MISC to xmlParserErrors.
Kasimier T. Buchcik a7248443 2006-05-29T16: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.
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 05e9db80 2006-03-27T09:30:13 applied patches from Aivars Kalvans to make unicode tables const, fixes * chvalid.c genChRanges.py genUnicode.py xmlunicode.c include/libxml/chvalid.h include/libxml/xmlunicode.h: applied patches from Aivars Kalvans to make unicode tables const, fixes bug #336096, this also updates to Unicode 4.01 final with a couple of character ranges fixes. Daniel
Daniel Veillard 8ea29c48 2006-03-26T22:52:40 fixed bug #335603 and resync'ed genChRanges.py to the expected output. * chvalid.c genChRanges.py include/libxml/chvalid.h: fixed bug #335603 and resync'ed genChRanges.py to the expected output. Daniel
Kasimier T. Buchcik a81d9199 2006-02-03T16:37:44 Added the xmlDOMWrapCloneNode() to the header file. * include/libxml/tree.h: Added the xmlDOMWrapCloneNode() to the header file.
Kasimier T. Buchcik a930fbec 2006-01-09T16:28:20 Added xmlRelaxNGSetParserStructuredErrors() to the API. * relaxng.c include/libxml/relaxng.h: Added xmlRelaxNGSetParserStructuredErrors() to the API.
Kasimier T. Buchcik 97258713 2006-01-05T12: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.
Daniel Veillard d0271473 2006-01-02T10:22:02 compilation and doc build fixes from Michael Day Daniel * xmlreader.c include/libxml/xmlreader.h xmlschemas.c: compilation and doc build fixes from Michael Day Daniel
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.
Kasimier T. Buchcik d81ebd17 2005-12-14T17:14:35 Fixed to define LIBXML_DEBUG_RUNTIME on the basis of @WITH_RUN_DEBUG@. * include/libxml/xmlversion.h.in: Fixed to define LIBXML_DEBUG_RUNTIME on the basis of @WITH_RUN_DEBUG@.