3 hours of debug, this was hell:
- SAX.c parser.c xpath.c: generating IDs when not validating
  from an external parsed entity was poisoning the ID has table
  with removed values. This was killing XSLT on the KDE help
  browser.
Daniel
diff --git a/SAX.c b/SAX.c
index 9691a88..c3f94fc 100644
--- a/SAX.c
+++ b/SAX.c
@@ -890,7 +890,7 @@
 	    ctxt->valid &= xmlValidateOneAttribute(&ctxt->vctxt, ctxt->myDoc,
 					       ctxt->node, ret, value);
 	}
-    } else {
+    } else if (ctxt->external != 2){
         /*
 	 * when validating, the ID registration is done at the attribute
 	 * validation level. Otherwise we have to do specific handling here.