Changed to the MIT Licence updated the doc accordingly preparing 2.4.14

* Copyright Makefile.am README configure.in libxml.spec.in:
  Changed to the MIT Licence
* doc/FAQ.html doc/catalog.html doc/intro.html doc/xml.html
  doc/xmlio.html: updated the doc accordingly
* include/libxml/xmlwin32version.h configure.in: preparing
  2.4.14 release
* python/generator.py python/libxml.c python/libxml2-python-api.xml
  python/libxml2class.txt python/libxml_wrap.h python/types.c:
  fixed the const xmlChar * wrapper and generator, XPath extension
  functions now use the context as first argument
* python/tests/tstxpath.py python/tests/xpath.py
  python/tests/xpathext.py: Updated the tests accordingly
* tree.c: fixed bug #70067
Daniel
diff --git a/tree.c b/tree.c
index 23d2c6a..4d86c7e 100644
--- a/tree.c
+++ b/tree.c
@@ -3446,6 +3446,11 @@
     xmlNodePtr old = NULL;
 
     if (doc == NULL) return(NULL);
+    if (root == NULL)
+	return(NULL);
+    xmlUnlinkNode(root);
+    root->doc = doc;
+    root->parent = (xmlNodePtr) doc;
     old = doc->children;
     while (old != NULL) {
 	if (old->type == XML_ELEMENT_NODE)