A typo and an obscure bug fix:
- parser.c: fixed a function name header typo
- SAX.c: notations can also occur in external subset.
Daniel
diff --git a/SAX.c b/SAX.c
index 069fd56..9d6218f 100644
--- a/SAX.c
+++ b/SAX.c
@@ -621,12 +621,22 @@
             name, publicId, systemId, notationName);
 #endif
     if (ctxt->validate && ctxt->wellFormed &&
-        ctxt->myDoc && ctxt->myDoc->intSubset)
+        ctxt->myDoc && ctxt->myDoc->extSubset)
 	ctxt->valid &= xmlValidateNotationUse(&ctxt->vctxt, ctxt->myDoc,
 	                                      notationName);
-    xmlAddDocEntity(ctxt->myDoc, name,
-                    XML_EXTERNAL_GENERAL_UNPARSED_ENTITY,
-		    publicId, systemId, notationName);
+    if (ctxt->inSubset == 1)
+	xmlAddDocEntity(ctxt->myDoc, name,
+			XML_EXTERNAL_GENERAL_UNPARSED_ENTITY,
+			publicId, systemId, notationName);
+    else if (ctxt->inSubset == 2)
+	xmlAddDtdEntity(ctxt->myDoc, name,
+			XML_EXTERNAL_GENERAL_UNPARSED_ENTITY,
+			publicId, systemId, notationName);
+    else {
+	if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
+	    ctxt->sax->error(ctxt, 
+	     "SAX.unparsedEntityDecl(%s) called while not in subset\n", name);
+    }
 }
 
 /**