fixing bug #108976 get the ID/REFs to reference the ID in the document

* parser.c: fixing bug #108976 get the ID/REFs to reference
  the ID in the document content and not in the entity copy
* SAX.c include/libxml/parser.h: more checking of the ID/REF
  stuff, better solution for #107208
* xmlregexp.c: removed a direct printf, dohhh
* xmlreader.c: fixed a bug on streaming validation of empty
  elements in entities
* result/VC/ElementValid8 test/VCM/v20.xml result/valid/xhtml1.xhtml:
  cleanup of the validation tests
* test/valid/id* test/valid/dtds/destfoo.ent result/valid/id*:
  added more ID/IDREF tests to the suite
Daniel
diff --git a/valid.c b/valid.c
index 599a818..ee2e678 100644
--- a/valid.c
+++ b/valid.c
@@ -5170,6 +5170,7 @@
     xmlElementPtr eDecl;
     int extsubset = 0;
 
+/* printf("PushElem %s\n", qname); */
     if ((ctxt->vstateNr > 0) && (ctxt->vstate != NULL)) {
 	xmlValidStatePtr state = ctxt->vstate;
 	xmlElementPtr elemDecl;
@@ -5257,6 +5258,7 @@
 xmlValidatePushCData(xmlValidCtxtPtr ctxt, const xmlChar *data, int len) {
     int ret = 1;
 
+/* printf("CDATA %s %d\n", data, len); */
     if (len <= 0)
 	return(ret);
     if ((ctxt->vstateNr > 0) && (ctxt->vstate != NULL)) {
@@ -5330,6 +5332,7 @@
 		      const xmlChar *qname ATTRIBUTE_UNUSED) {
     int ret = 1;
 
+/* printf("PopElem %s\n", qname); */
     if ((ctxt->vstateNr > 0) && (ctxt->vstate != NULL)) {
 	xmlValidStatePtr state = ctxt->vstate;
 	xmlElementPtr elemDecl;