|
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.
|
|
857104cd
|
2012-09-04T14:25:23
|
|
Remove all .cvsignore as they are not used anymore
For https://bugzilla.gnome.org/show_bug.cgi?id=682985
suggested by Adrian Bunk <bunk@stusta.de>
|
|
7a2215db
|
2012-09-04T12:05:17
|
|
Fix reuse of xmlInitParser
While xmlCleanupParser() should not be used unless complete control
is insured over the programe making sure libxml2 is not in use anywhere
It should still be usable, and allow a sequence of
xmlInitParser();
xmlCleanupParser();
calls if needed, the problem is that the thread key wasn't reallocated
on subsequent xmlinitParser() calls leading to corruption of pthread
keys used by the program.
* threads.c: make sure xmlCleanupParser() reset the pthread_once()
global variable driving thread key allocation.
|
|
510e7583
|
2012-09-04T11:50:36
|
|
Fix a Timsort function helper comment
|
|
28f5e1a2
|
2012-09-04T11:18:39
|
|
Fix potential crash on entities errors
Related to https://bugs.launchpad.net/lxml/+bug/502959
Basically the core of the issue is that if an entity references another
entity, then in case we are replacing entities content, we should always
do so by copying the referenced content as long as the reference is
done within the entity. Otherwise, if for some reason there is a later
parsing error that entity content may be freed.
Complex scenario exposed by command:
thinkpad:~/XML/diveintopython-5.4/xml -> valgrind --db-attach=yes
../../xmllint --loaddtd --noout --noent diveintopython.xml
Document references &a;
a references &b;
we references b content directly in by linking in the a content
a has an error further down
we free a, freeing the chunk from b
Document references &b; after &a;
we try to copy b content, but it was freed already => segfault
* parser.c: never reference directly entity content without copying if
we aren't in the document main entity
|
|
3b6d7b9a
|
2012-08-28T23:40:56
|
|
xml2-config.1 markup error
There is a spurious ".l" in the xml2-config.1 man page. This line can
simply be removed.
$ mandoc -Tlint -Werror xml2-config.1
xml2-config.1:12:2: ERROR: skipping unknown macro: .l
|
|
1f01f49b
|
2012-08-28T22:16:50
|
|
Handle ICU_LIBS as LIBADD, not LDFLAGS to prevent linking errors
For https://bugzilla.gnome.org/show_bug.cgi?id=677606
For https://bugs.gentoo.org/show_bug.cgi?id=417539
If libxml2-2.8.0 is built with --with-icu --with-python on a system that has an
older version of libxml2 installed, then during "make install", libxml2mod.so
gets relinked to the systemwide version of libxml2.so.2 instead of libxml2.so.2
from the build tree, and fails at runtime if symbol versions from the older
libxml2.so.2 are not available. This effectively makes it impossible to build a
libxml2-2.8.0 binary package on a system that does not already have
libxml2-2.8.0 installed.
Investigation by Rafał Mużyło and Arfrever Frehtes Taifersar Arahesis revealed
the cause of the problem to be that libxml2's configure was adding ICU_LIBS to
LDFLAGS instead of to LIBADD. This resulted in GNU libtool using the wrong
argument order in its relinking command that gets run during "make install".
|
|
961b535c
|
2012-07-03T14:13:59
|
|
Bug 676544 - fails to build with --without-sax1
Added some ifdef'd LIBXML_SAX1_ENABLED to make it buildable with
--without-sax1 configure option.
|
|
236ea1ea
|
2012-08-27T11:56:07
|
|
fix builds not having stdint.h
|
|
8f2d6b57
|
2012-08-27T05:08:54
|
|
initialize var
|
|
8880170e
|
2012-08-27T16:20:05
|
|
Fix the XPath arity check to also check the XPath stack limits
Example xmlXPathNormalizeFunction() would do CHECK_ARITY(1)
and the expect valuePop(ctxt); to return an object, except
now valuePop() looks at the XPath stack frames and fails returning
NULL, and we end up crashing dereferencing the object.
Real solution is to exten CHECK_ARITY() and recompile all
XPath functions using it.
|
|
890faa54
|
2012-08-27T13:24:08
|
|
Fix problem with specific and generic error handlers
It seems that setting up both xmlTextReaderSetStructuredErrorHandler and
xmlSetStructuredErrorFunc confuses the code around error.c:592 and following
This patch works with any combinations of using xmlSetStructuredErrorFunc,
xmlTextReaderSetStructuredErrorHandler, both, or none.
|
|
466fcdaa
|
2012-08-27T12:03:40
|
|
Avoid a potential infinite recursion
Which can happen when eliminating epsilon transitions, as reported
by Pavel Madr <pmadr@opentext.com>
|
|
3e031b7d
|
2012-08-24T16: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
|
|
73f94c60
|
2012-08-24T16:38:54
|
|
Small cleanup for valgrind target
|
|
62270539
|
2012-08-19T19: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.
|
|
c70d185a
|
2012-08-23T23:28:04
|
|
Fix an XSD error when generating internal automata
When generating a sequence add an extra epsilon transition
to avoid further constructs from entering via the last state
Bug reported by Johan Corveleyn <jcorvel@gmail.com>
|
|
82cdfc4e
|
2012-08-22T11:05:09
|
|
Expose xmlBufShrink in the public tree API
As suggested by Andrew W. Nosenko:
Proposal: expose the new xmlBufShrink() to the "public" API for
compatibility with xmlBufUse().
Reason: the following scenario:
1. Read something into xmlParserInputBuffer (e.g. using
xmlParserInputBufferRead())
2. Extract content through xmlBufContent()
3. Extract content length through xmlBufUse(). Result have type
'size_t'.
4. Use this content
5. Now, you need to shrink the buffer. How to do it? Doing that
through legacy xmlBufferShrink() is unsafe because it uses 'unsigned
int' and the whole point of introducing the new API was handling the
cases, when 'unsigned int' is not enough. Therefore, need to use the
new xmlBufShrink(). But it is "private".
Therefore, I propose to expose the new xmlBufShrink() in the same way,
as xmlBufContent() and xmlBufUse() are exposed.
|
|
ff7227f2
|
2012-08-20T20:58:24
|
|
Patch for portability of latin characters in C files
Coming from LibreOffice repository:
http://cgit.freedesktop.org/libreoffice/core/plain/libxml2/libxml2-latin.patch
|
|
dce1c8ba
|
2012-08-17T20:42:52
|
|
Patch for xinclude of text using multibyte characters
for bug https://bugzilla.gnome.org/show_bug.cgi?id=633166
When you xinclude a text file, reading portions (by 4000 bytes) of the
buffer incorrectly handled the situation when the end comes across
portions of the bytes in a multibyte character.
|
|
40851d0c
|
2012-08-17T20:34:05
|
|
Fix a segfault on XSD validation on pattern error
As reported by Sven <sven@e7o.de>:
The following pattern will cause a segmentation fault in my
Apache (using PHP5 to validate a XML against a XSD):
<xs:pattern value="(.*)|"/>
Fix a cascade of error handling failures which led to the
crash in that scenario.
|
|
b60061a7
|
2012-07-27T15:42:27
|
|
Visible HTML elements close the head tag
In HTML email it's common to find arbitrary fragments of HTML, the one
that triggered this change was of the form:
<meta><font></font><div>...
Before this change the <font> tag was part of the implicit <head> that
gets created for the <meta> tag, after this change, it is part of the
<body>, which more closely matches the behaviour of modern HTML
implementations.
|
|
c9a575cf
|
2012-08-17T11:59:01
|
|
libxml(3) manpage typo fix
|
|
dfc0aa0a
|
2012-08-17T11:04:24
|
|
GetProcAddressA is available only on WinCE
As Roumen pointed out
"After recent commits I count not link build for mingw* host as
GetProcAddressA is missing."
Looking around a bit it seems you are right:
http://voidnish.wordpress.com/2005/06/14/getprocaddress-in-unicode-builds/
except it was introduced in Windows CE
http://msdn.microsoft.com/en-us/library/ms885634.aspx
|
|
ec4fc529
|
2012-08-17T10:04:30
|
|
More updates and cleanups on autotools and Makefiles
Makefile.am, example/Makefile.am:
* Replaced the obsolete INCLUDES variable with AM_CPPFLAGS/AM_CFLAGS
acinclude.m4:
* autoupdate replaced AC_FD_CC with AS_MESSAGE_LOG_FD
autogen.sh:
* Added -Wall to the autoreconf invocation, which turned up a whole slew
of warnings that are fixed by this patch
configure.in:
* Most of the changes are due to autoupdate, with subsequent manual
tidying
* Note that autoupdate bumped the AC_PREREQ version from 2.59 to 2.68. If
you normally use an older version of Autoconf, and everything works fine
if you comment out that directive, feel free to bump down the version
accordingly.
* Ensure that #include directives in C fragments always have no whitespace
to the left of the '#' mark, as some preprocessors need that to be in
the first column
example/Makefile.am:
* Don't need DEPS
* Use plain LDADD instead of LDADDS; if all programs in this file need to
link against the same set of libraries, then this is all you need
|
|
6842ee81
|
2012-08-17T09:58:38
|
|
More cleanups to the documentation part of libxml2
doc/Makefile.am:
* Build what's in doc/ before doc/devhelp/, as the dependency graph flows
that way
* Add "--path $(srcdir)" so that xsltproc can find DTDs in srcdir
* Replaced $(top_srcdir)/doc with an equivalent $(srcdir)
* Qualified libxml2-api.xml with $(srcdir) as it's always generated there
* Rewrote the dependencies for libxml2-api.xml so that xmlversion.h
doesn't throw everything off
doc/devhelp/Makefile.am:
* Use Automake constructs to install the HTML files instead of an
install-data-local rule
* Reorganized the file a bit (hello whitespace!)
* EXTRA_DIST doesn't need to list so many files now that dist_devhelp_DATA
is being used
* Only print "Rebuilding devhelp files" if rebuilding is actually
occurring
doc/examples/index.py:
* Make the "this file is auto-generated" banner more prominent
* Autotools updates: Use AM_CPPFLAGS/AM_CFLAGS instead of INCLUDES
* Got rid of DEPS as it's not needed (Automake already sees the dependency
on libxml2.la by way of LDADD(S))
* Replaced LDADDS with LDADD, which is applied to all programs listed
in the file. Since all the test programs have the same link
dependencies, this way is more concise yet equivalent.
* Remove the *.tmp files via "make clean" instead of having the test
programs do it themselves (more on this later)
* Invoke index.py in srcdir, as it pretty much needs to run there
* Restructured the index.html rule so that only the xmllint invocation is
allowed to fail
* Use $(MKDIR_P) instead of $(mkinstalldirs), $(VAR) instead of @VAR@
* Remove symlinks for test?.xml in an out-of-source build
* Sort lists for neatness
* Better formatting for EXTRA_DIST and noinst_PROGRAMS variables
* Simplified the Automake bits printed for each program: *_LDFLAGS doesn't
need to be specified as it's empty anyway, *_DEPENDENCIES is redundant,
*_LDADD isn't needed due to the global LDADD
* Added a bit that symlinks in test?.xml from srcdir in out-of-source
builds. This allows the reader4 test to read these files in the current
directory, which ensures that the output always looks the same (i.e.
does not contain references to srcdir)
* Don't hide the test program invocation (or else it's hard to tell which
test failed), and don't use superfluous parentheses
* NOTE: If you check in these changes, be sure to run this script and also
check in the updated files that it generates!
doc/examples/*.c:
* Updated the test: lines so that
+ "&&" is used to separate commands instead of ";" so that errors are
not masked
+ reference files are qualified with $(srcdir)/
+ no "rm" takes place -- these are a problem because (1) if a test
fails, it's useful to have the output file ready for inspection; (2)
the "rm" invocation masks a potential non-zero exit status from diff
(This is why I added the CLEANFILES line above)
doc/examples/io1.res:
* Updated this ref file so that the test passes. (This is correct, right?)
doc/examples/reader4.res:
* Changed this back to its original form, as the symlinking of test?.xml
means this file no longer has to contain path prefixes on the filenames
doc/examples/testWriter.c:
* Changed the output filenames to *.tmp instead of *.res, partly for
consistency, partly to not have to add special cases to CLEANFILES
doc/examples/xpath1.c:
* Removed the "./" prefix on the test invocation, which is redundant as
index.py already adds one
|
|
e0286980
|
2012-08-15T16:30:10
|
|
More changes for Win32 compilation
|
|
414f269a
|
2012-08-15T13:52:09
|
|
Basic changes for Win32 builds of release 2.9.0: compile buf.c
Makes builds on Windows (whether by MSVC, BCB, or MinGW) to compile buf.c
|
|
1f972e9f
|
2012-08-15T10:16:37
|
|
Cleanup some of the parser code
Prefetching assumptions about the amount of data read in GROW
should be backed up with test for 0 termination when at the
end of the buffer.
|
|
64d11249
|
2012-08-15T09:10:50
|
|
Fix missing xmlsave.h module which was ignored in recent builds
due to "save.h" rule discarding it too
|
|
ef4526ad
|
2012-08-15T09:14:31
|
|
Fix a variable name in comment
|
|
baaeadcf
|
2012-08-15T09:13:54
|
|
Regenerated testapi.c
|
|
d10a72ce
|
2012-08-14T12:50:25
|
|
Bundles all generated files for python into the distribution
So end users building the Python module don't need to
regenerate any source files. some clean-up too.
|
|
97fa5b3c
|
2012-08-14T11:01:07
|
|
Fix file and line report for XSD SAX and reader streaming validation
Things now work correctly at the xmllint level:
thinkpad:~/XML -> xmllint --sax --noout --schema test_schema.xsd
test_xml.xml
test_xml.xml:72721: Schemas validity error : Element 'level1': Missing
child element(s). Expected is ( level2 ).
test_xml.xml fails to validate
thinkpad:~/XML -> xmllint --stream --schema test_schema.xsd test_xml.xml
test_xml.xml:72721: Schemas validity error : Element 'level1': Missing
child element(s). Expected is ( level2 ).
test_xml.xml fails to validate
thinkpad:~/XML ->
* error.c: fix a corner case of not reporting lines when we should
* include/libxml/xmlschemas.h doc/symbols.xml: had to add new entry
points to set the filename on a validation context and a locator
callback used to fetch the line and file from the context
* xmlschemas.c: add the new entry points xmlSchemaValidateSetFilename()
and xmlSchemaValidateSetLocator(), plus make sure the error reporting
routine gets the information if available. Add a locator for SAX.
* xmlreader.c: add and plug a locator for readers.
|
|
aabc0847
|
2012-08-10T12:34:24
|
|
Fix compiler warnings of wincecompat.c
For https://bugzilla.gnome.org/show_bug.cgi?id=681592
*) Add and explicit cast when converting FILE* to int
*) Don't assign a c-string to the element of an char-array
|
|
fd4f6fdd
|
2012-08-13T17:54:20
|
|
Fix non __GNUC__ build
For https://bugzilla.gnome.org/show_bug.cgi?id=681590
Length member of _xmlDictEntry is called "len" and not "l"
|
|
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.
|
|
5a82e48e
|
2012-08-13T17:39:06
|
|
Fix windows unicode build
For https://bugzilla.gnome.org/show_bug.cgi?id=638650
After much discussions in the list:
https://mail.gnome.org/archives/xml/2012-May/msg00062.html
The simplest at this point is to fallback to only officially
supporting ASCII names in those APIs, document it and use
the "A" entry points on Windows.
|
|
c3b1d09b
|
2012-08-13T16:50:48
|
|
clean redefinition of {v}snprintf in C-source
as those from *config.h are preferable (e.g. win32config.h)
|
|
1f0453f7
|
2012-08-13T16:56:11
|
|
minimize use of HAVE_CONFIG_H
as build process for supported platforms provide "config.h" header file
|
|
8886f335
|
2012-08-13T16:38:09
|
|
fixup regression in Various "make distcheck" and portability fixups
Was using the wrong variable and adds proper m4 quoting
|
|
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
|
|
264cee69
|
2012-08-13T12:40:53
|
|
Add a missing element check
|
|
aa017c54
|
2012-08-10T10:42:56
|
|
Release candidate 1 of libxml2-2.9.0
* configure.in libxml.spec.in python/setup.py: bumped release numbers
* doc//*: regenerated as part of the release
|
|
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
|
|
3e62adbe
|
2012-08-09T14:24:02
|
|
Adding various checks on node type though the API
Specifially checking against namespace nodes before accessing node
pointers
|
|
6ca24a39
|
2012-08-08T15:31:55
|
|
Namespace nodes can't be unlinked with xmlUnlinkNode
|
|
89b6f73a
|
2012-08-04T05:09:56
|
|
use xmlBuf... if DEBUG_INPUT is defined
|
|
c15df7d4
|
2012-08-07T15:15:04
|
|
Avoid using xmlBuffer for serialization
Mostly an optimization to avoid xmlBuffer->xmlBuf conversions
and use the new code.
|
|
7f713494
|
2012-08-07T14:34:53
|
|
Improve compatibility between xmlBuf and xmlBuffer
An old xsltproc binary now works correctly with the new libxml2
|
|
495a73df
|
2012-08-07T10:14:56
|
|
fix runtests to use pthreads support for various Unix platforms
The runtests program currently fails with
Specific platform thread support not detected
on HP-UX, AIX and other Unix systems which do not match the conditional
#if defined(linux) || defined(__sun) || defined(__APPLE_CC__)
It is silly to try to enumerate all systems which use pthreads in a conditional
like this. I am attaching a patch (against git master) that rewrites the cpp
conditional structure so that pthreads is used if HAVE_PTHREAD_H is defined,
and moves that section of code down below the Win32 and BeOS cases so that
native thread libraries are used preferentially in those two cases.
|
|
5d6c02ba
|
2012-08-07T10:05:34
|
|
Various "make distcheck" and portability fixups 2nd part
doc/examples/Makefile.am:
* Use $(VAR), not @VAR@
* Use $(MKDIR_P) instead of $(mkinstalldirs), as the latter is an
* obsolete
name
* Added $(srcdir) qualification to the various test program invocations
* in
the "tests" target. More work is needed here (notably, when the
reference output contains the path to the input file), but this gets
things a lot closer to working correctly in an out-of-source build.
doc/examples/reader4.res:
* Added "./" path qualifiers so that the reader4 test continues to pass
cleanly for in-source builds
python/tests/Makefile.am:
* Symlink in test input files for out-of-source builds
|
|
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
|
|
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
|
|
187e5290
|
2012-08-06T10:27:58
|
|
Fix make dist to include new private header files
|
|
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
|
|
3f0c613f
|
2012-08-03T12:04:09
|
|
Expand the limit test program
|
|
5353bbf7
|
2012-08-03T12:03:31
|
|
More fixups on the push parser behaviour
|
|
2b52aa00
|
2012-07-31T10:53:47
|
|
Strengthen behaviour of the push parser in problematic situations
Implement the maximum lookahead stategy, and fix some handling
of DTD to speed up processing.
|
|
e7bf892d
|
2012-07-30T20:09:25
|
|
Improve error reporting on parser errors
The extra string was being dismissed when provided.
* parser.c: handle bot case properly
* result/: this changes a few error reports
|
|
48b4cdde
|
2012-07-30T16:16:04
|
|
Enforce XML_PARSER_EOF state handling through the parser
That condition is one raised when the parser should positively stop
processing further even to report errors. Best is to test is after
most GROW call especially within loops
|
|
0df83cae
|
2012-07-30T15:41:10
|
|
Fixup limits parser
|
|
cd852ad1
|
2012-07-30T10: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
|
|
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
|
|
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.
|
|
6f6feba8
|
2012-07-25T16:30:56
|
|
Fixup for buf.c
|
|
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
|
|
747c2c10
|
2012-07-19T20:36:43
|
|
Extend testlimits
|
|
f572a78d
|
2012-07-19T20:36:25
|
|
More avoid quadratic behaviour
|
|
51304816
|
2012-07-19T20:34:26
|
|
Impose a reasonable limit on PI size
Unless the XML_PARSE_HUGE option is given to the parser,
the value is XML_MAX_TEXT_LENGTH, i.e. the same than for a
text node within content.
Also cleanup some unsigned int used for memory size.
|
|
0de1f311
|
2012-07-18T17:43:34
|
|
first version of testlimits new test
Used to check behaviour on various parsing limits
|
|
65686451
|
2012-07-19T18:25:01
|
|
Avoid quadratic behaviour in some push parsing cases
avoid rescanning over and over a very long input, just check
the incoming chunks
|
|
58f73aca
|
2012-07-19T11:58:47
|
|
Impose a reasonable limit on comment size
Unless the XML_PARSE_HUGE option is given to the parser,
the value is XML_MAX_TEXT_LENGTH, i.e. the same than for a
text node within content.
Also cleanup some unsigned int used for memory size.
|
|
e17db994
|
2012-07-19T11:25:16
|
|
Impose a reasonable limit on attribute size
Unless the XML_PARSE_HUGE option is given to the parser,
the value is XML_MAX_TEXT_LENGTH, i.e. the same than for a
text node within content.
|
|
b60e612e
|
2012-07-18T16:21:17
|
|
Small cleanup of unused variables in test
|
|
9ee02f80
|
2012-07-16T19:57:42
|
|
Harden the buffer code and make it more compatible
Mimic the old xmlBuffer strcture in xmlBuf to avaoid catastrophic
failures in case of old code directly reading ctxt->input->buf->buffer
Check on all buffer entry points if an error previously occured on
the buffer, and fail the operation if this is the case, the buffer
becomes immutable and unreadable.
|
|
00ac0d3b
|
2012-07-16T18:03:01
|
|
More cleanups for input/buffers code
When calling xmlParserInputBufferPush, the buffer may be reallocated
and at the input level the pointers for base, cur and end need to
be reevaluated.
* buf.c buf.h: add two new functions, one to get the base from the
input of the buffer, and another one to reset the pointers based
on the cur and base inded
* HTMLparser.c parser.c: cleanup to use the new helper functions
as well as making sure size_t is used for the indexes computations
|
|
61551a1e
|
2012-07-16T16:28:47
|
|
Cleanup function xmlBufResetInput() to set input from Buffer
This was scattered in a number of modules, xmlParserInputPtr
have usually their base, cur and end pointer set from an
xmlBuf used as input.
* buf.c buf.h: add a new function implementing this setup
* parser.c HTMLparser.c catalog.c parserInternals.c xmlreader.c
use the new function instead of digging into the buffer in
all those modules
|
|
145477d8
|
2012-07-16T14:59:29
|
|
Swicth the test program for characters to new input buffers
it was manipulating the buffer content and structures directly
this cleans it up
|
|
7b9b0719
|
2012-07-16T14:58:02
|
|
Convert the HTML tree module to the new buffers
The new input buffers induced a couple of changes, the others
are related to the switch to xmlBuf in saving routines.
|
|
a78d8036
|
2012-07-16T14:56:50
|
|
Convert of the HTML parser to new input buffers
Changes similar to the ones done in the XML parser for the
routines which are not shared.
|
|
dbf5411b
|
2012-07-16T14:54:45
|
|
Convert the writer to new output buffer and save APIs
Only a handful of places had to be converted for xmlBuf and
the new saving entry point.
|
|
8aebce3e
|
2012-07-16T14:42:31
|
|
Convert XMLReader to the new input buffers
A few direct access were replaced, and also one internal
xmlBuffer structure is converted to use xmlBuf instead
|
|
50cdab55
|
2012-07-16T14:52:00
|
|
New saving functions using xmlBuf and conversion
* save.h: new header providing new functions currently internal
and xmlBuf counterparts of old xmlBuffer based ones
* xmlsave.c: convert functions to use xmlBuf as much as possible
|
|
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.
|
|
345ee8b6
|
2012-07-16T14:40:37
|
|
Convert XInclude to the new input buffers
A few xmlBuffer...() calls changed to their xmlBuf...() counterparts
|
|
2a1d2422
|
2012-07-16T14:38:14
|
|
Convert catalog code to the new input buffers
Only one place where the buffers fields where accessed directly
|
|
53aa293d
|
2012-07-16T14:37:00
|
|
Convert C14N to the new Input buffer
one case of direct access cleaned up
|
|
a6a6e70c
|
2012-07-16T14:22:54
|
|
Convert xmlIO.c to the new input and output buffers
Relatively mechanical changes, this also led to a couple of fixes
upon review of the I/O code on buffer usage.
|
|
768eb3b8
|
2012-07-16T14:19:49
|
|
Convert XML parser to the new input buffers
The main changes are when the internal of the buffers structure
were adressed directly, we now use routines coming from buf.h
The routine xmlParserInputRead() which wasn't used anywhere is
deprecated too.
|
|
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.
|
|
18d0db25
|
2012-07-13T19:51:15
|
|
Adding new encoding function to deal with the new structures
* encoding.c: adds xmlCharEncFirstLineInput, xmlCharEncInput and
xmlCharEncOutput
* enc.h: the functions are not made public but added to this new header
|
|
ade10f2c
|
2012-07-12T09:43:27
|
|
Convert XPath to xmlBuf
Easy as no buffer was exported in the APIs
|
|
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
|
|
4629ee02
|
2012-07-23T14:15:40
|
|
Do not fetch external parsed entities
Unless explicietely asked for when validating or replacing entities
with their value. Problem pointed out by Tom Lane <tgl@redhat.com>
* parser.c: do not load external parsed entities unless needed
* test/errors/extparsedent.xml result/errors/extparsedent.xml*:
add a regression test to avoid change of the behaviour in the future
|
|
baaf03f8
|
2012-07-20T15:41:34
|
|
Fix an error in previous commit
|
|
4f9fdc70
|
2012-07-18T11:38:17
|
|
Fix entities local buffers size problems
|
|
459eeb9d
|
2012-07-17T16:19:17
|
|
Fix parser local buffers size problems
|
|
740cb1a4
|
2012-07-18T16:05:37
|
|
Memory error within SAX2 reuse common framework
There is no reason for that class of errors to not use
the same handling allowing strctured error processing.
|
|
c508fa3f
|
2012-07-18T17:39:56
|
|
Fix a failure to report xmlreader parsing failures
Related to https://bugzilla.gnome.org/show_bug.cgi?id=654567
the problem is that the provided patch failed to raise an error
on xmlTextReaderRead() return when an actual parsing error occured
|