Fix a doc typo

Raised by Blasius Bieselbert on IRC
Added macros for argument casts
xmlNodeSetName: Allow setting the name to a substring of the currently set name

Avoid freeing the currently set name until after having assigned the new name,
this allows one to call xmlNodeSetName (node, node->name + 1) to set the new
name of the node to a substring of the current name without introducing any
crash and without requiring an extra strdup().
Do not fetch external parameter entities

Unless explicitely asked for when validating or replacing entities
with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com>
Avoid Double Null Check

Cleanup
For https://bugzilla.gnome.org/show_bug.cgi?id=729851
Avoid Possible null pointer dereference in memory debug mode

Fix a use before check on pointer
For https://bugzilla.gnome.org/show_bug.cgi?id=729849
xmllint was not parsing the --c14n11 flag

Cut and paste error, using the wrong variable
Fix typos in relaxng.c

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
configure: Add --with-python-install-dir

Cross-compiling the python bindings is a bit difficult today, as the
configure script will figure out the site packages dir
(PYTHON_SITE_PACKAGES) by either:

- Generating the path to the site-package target directories using
  libdir, and see if it exists. As it is not possible to point to the
  full path of the sysroot, since that will yield the wrong install
  path, and that the directory does not neccessarily exist on the host,
  this approach will not work.

- Fetch the site packages dir from the python interpreter as pointed to
  by --with-python. Since this python interpreter will point to the
  sysroot, the install dir generated will be inside the sysroot and thus
  not work.

This patch approaches the problem by adding the possibility of
explicitly stating the install dir of the python packages, leaving it up
to the cross-compilation environment to specify it. The patch does not
affect the default case (non-cross compilation).

Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
erroneously ignores a validation error if no error callback set

Reported by Stefan Behnel
https://bugzilla.gnome.org/show_bug.cgi?id=724903
Fix regressions introduced by CVE-2014-0191 patch

A number of issues have been raised after the fix, and this patch
tries to correct all of them, though most were related to
postvalidation.
https://bugzilla.gnome.org/show_bug.cgi?id=730290
and other reports on list, off-list and on Red Hat bugzilla
Fixes for xmlInitParserCtxt

let's make sure that parser options are updated too when a corrsponding
global variable or other field of the context is set.
Adding some missing NULL checks

in SAX2 DOM building code and in the HTML parser
xmlSaveUri() incorrectly recomposes URIs with rootless paths

For https://bugzilla.gnome.org/show_bug.cgi?id=731063

xmlSaveUri() of libxml2 (snapshot 2014-05-31 and earlier) returns
bogus values when called with URIs that have rootless paths
(e.g. "urx:b:b" becomes "urx://b%3Ab" where "urx:b%3Ab" would be
correct)
Fix a link to James SAX documentation old page
Adding a check in case of allocation error

For https://bugzilla.gnome.org/show_bug.cgi?id=733043

There is missing Null condition in xmlRelaxNGValidateInterleave of
relaxng.c
Dereferencing it may cause a crash.
Add a missing argument check

For https://bugzilla.gnome.org/show_bug.cgi?id=733042

the states argument of xmlRelaxNGAddStates() ought to be checked too
Add a couple of misisng check in xmlRelaxNGCleanupTree

For https://bugzilla.gnome.org/show_bug.cgi?id=733041

check cur->parent before dereferencing the pointer even if
a null parent there should not happen
Also fix a typo
Fix a potential NULL dereference

For https://bugzilla.gnome.org/show_bug.cgi?id=733040

xmlDictLookup() may return NULL in case of allocation error,
though very unlikely it need to be checked.
Fix various Missing Null checks

For https://bugzilla.gnome.org/show_bug.cgi?id=732823