fix a small initialization problem raised by Ashwin increase testing

* threads.c: fix a small initialization problem raised by Ashwin
* testapi.c gentest.py: increase testing especially for document
  with an internal subset, and entities
* tree.c: fix a deallocation issue when unlinking entities from
  a document.
* valid.c: fix a missing entry point test not found previously.
* doc/*: regenerated the APIs, docs etc.
daniel

svn path=/trunk/; revision=3778
diff --git a/doc/devhelp/libxml2-tree.html b/doc/devhelp/libxml2-tree.html
index d5879f5..f822935 100644
--- a/doc/devhelp/libxml2-tree.html
+++ b/doc/devhelp/libxml2-tree.html
@@ -96,6 +96,7 @@
 typedef struct _xmlSAXLocator <a href="#xmlSAXLocator">xmlSAXLocator</a>;
 typedef <a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * <a href="#xmlElementContentPtr">xmlElementContentPtr</a>;
 typedef enum <a href="#xmlElementContentType">xmlElementContentType</a>;
+typedef enum <a href="#xmlDocProperties">xmlDocProperties</a>;
 typedef <a href="libxml2-tree.html#xmlID">xmlID</a> * <a href="#xmlIDPtr">xmlIDPtr</a>;
 typedef struct _xmlDtd <a href="#xmlDtd">xmlDtd</a>;
 typedef struct _xmlAttribute <a href="#xmlAttribute">xmlAttribute</a>;
@@ -421,10 +422,25 @@
     int	charset	: encoding of the in-memory content actually an <a href="libxml2-encoding.html#xmlCharEncoding">xmlCharEncoding</a>
     struct _xmlDict *	dict	: dict used to allocate names or NULL
     void *	psvi	: for type/PSVI informations
+    int	parseFlags	: set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used to parse the document
+    int	properties	: set of <a href="libxml2-tree.html#xmlDocProperties">xmlDocProperties</a> for this document set at the end of parsing
 } xmlDoc;
 </pre><p/>
 </div>
         <hr/>
+        <div class="refsect2" lang="en"><h3><a name="xmlDocProperties">Enum </a>xmlDocProperties</h3><pre class="programlisting">enum <a href="#xmlDocProperties">xmlDocProperties</a> {
+    <a name="XML_DOC_WELLFORMED">XML_DOC_WELLFORMED</a> = 1 /* document is XML well formed */
+    <a name="XML_DOC_NSVALID">XML_DOC_NSVALID</a> = 2 /* document is Namespace valid */
+    <a name="XML_DOC_OLD10">XML_DOC_OLD10</a> = 4 /* parsed with old XML-1.0 parser */
+    <a name="XML_DOC_DTDVALID">XML_DOC_DTDVALID</a> = 8 /* DTD validation was successful */
+    <a name="XML_DOC_XINCLUDE">XML_DOC_XINCLUDE</a> = 16 /* XInclude substitution was done */
+    <a name="XML_DOC_USERBUILT">XML_DOC_USERBUILT</a> = 32 /* Document was built using the API and not by parsing an instance */
+    <a name="XML_DOC_INTERNAL">XML_DOC_INTERNAL</a> = 64 /* built for internal processing */
+    <a name="XML_DOC_HTML">XML_DOC_HTML</a> = 128 /*  parsed or built HTML document */
+};
+</pre><p/>
+</div>
+        <hr/>
         <div class="refsect2" lang="en"><h3><a name="xmlDocPtr">Typedef </a>xmlDocPtr</h3><pre class="programlisting"><a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * xmlDocPtr;
 </pre><p/>
 </div>
@@ -567,7 +583,7 @@
     struct _xmlEntity *	nexte	: unused
     const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	URI	: the full URI as computed
     int	owner	: does the entity own the childrens
-    int	checked	: was the entity content checked
+    int	checked	: was the entity content checked this is also used to count entites * r
 } xmlEntity;
 </pre><p/>
 </div>
@@ -757,6 +773,7 @@
     <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a>	freeAttrs	: * the complete error informations for the last error. *
     <a href="libxml2-xmlerror.html#xmlError">xmlError</a>	lastError
     <a href="libxml2-parser.html#xmlParserMode">xmlParserMode</a>	parseMode	: the parser mode
+    unsigned long	nbentities	: number of entities references
 } xmlParserCtxt;
 </pre><p/>
 </div>