added entities testing to the Thread test make the test reasonable fix the

* test/threads/*: added entities testing to the Thread test
* testThreads.c: make the test reasonable
* DOCBparser.c: fix the DTD public and system ID
* xmllint.c: added --sgml for SGML DocBook importing
* Makefile.am: added Docbtests target
Daniel
diff --git a/DOCBparser.c b/DOCBparser.c
index 5ea8b0a..013e819 100644
--- a/DOCBparser.c
+++ b/DOCBparser.c
@@ -48,6 +48,15 @@
 #include <libxml/globals.h>
 
 /*
+ * DocBook XML current versions
+ */
+
+#define XML_DOCBOOK_XML_PUBLIC (const xmlChar *)			\
+             "-//OASIS//DTD DocBook XML V4.1.2//EN"
+#define XML_DOCBOOK_XML_SYSTEM (const xmlChar *)			\
+             "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
+
+/*
  * Internal description of an SGML entity
  */
 typedef struct _docbEntityDesc docbEntityDesc;
@@ -3554,17 +3563,20 @@
 
     /*
      * Create or update the document accordingly to the DOCTYPE
+     * But use the predefined PUBLIC and SYSTEM ID of DocBook XML
      */
     if ((ctxt->sax != NULL) && (ctxt->sax->internalSubset != NULL) &&
        (!ctxt->disableSAX))
-       ctxt->sax->internalSubset(ctxt->userData, name, ExternalID, URI);
+       ctxt->sax->internalSubset(ctxt->userData, name,
+	                         XML_DOCBOOK_XML_PUBLIC,
+				 XML_DOCBOOK_XML_SYSTEM);
 
-    /*
-     * Is there any internal subset declarations ?
-     * they are handled separately in docbParseInternalSubset()
-     */
-    if (RAW != '[') {
-       return;
+    if (RAW != '>') {
+       if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
+           ctxt->sax->error(ctxt->userData,
+		   "docbParseDocTypeDecl : internal subset not handled\n");
+    } else {
+	NEXT;
     }
 
     /*