diff --git a/ChangeLog b/ChangeLog index b36f6734..bb4d2708 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 21 19:04:34 CET 2001 Daniel Veillard + + * parser.c: fixed a function name header typo + * SAX.c: notations can also occur in external subset. + Tue Mar 20 14:21:28 CET 2001 Daniel Veillard * error.c: removed a C++ like comment diff --git a/SAX.c b/SAX.c index 069fd560..9d6218fa 100644 --- a/SAX.c +++ b/SAX.c @@ -621,12 +621,22 @@ unparsedEntityDecl(void *ctx, const xmlChar *name, 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); + } } /** diff --git a/parser.c b/parser.c index b5352f9c..e1de3115 100644 --- a/parser.c +++ b/parser.c @@ -9092,7 +9092,7 @@ xmlParseExternalEntity(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, } /** - * xmlParseBalancedChunk: + * xmlParseBalancedChunkMemory: * @doc: the document the chunk pertains to * @sax: the SAX handler bloc (possibly NULL) * @user_data: The user data returned on SAX callbacks (possibly NULL)