diff --git a/ChangeLog b/ChangeLog index b1926624..9b1c1e8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Feb 18 00:06:42 CET 2002 Daniel Veillard + + * valid.c SAX.c: fixed #71740 NotationDecl with a required field + missing + Sun Feb 17 23:45:40 CET 2002 Daniel Veillard * check-xml-test-suite.py: improved the behaviour a bit as diff --git a/SAX.c b/SAX.c index 022c0fbc..35c316bc 100644 --- a/SAX.c +++ b/SAX.c @@ -569,7 +569,14 @@ notationDecl(void *ctx, const xmlChar *name, "SAX.notationDecl(%s, %s, %s)\n", name, publicId, systemId); #endif - if (ctxt->inSubset == 1) + if ((publicId == NULL) && (systemId == NULL)) { + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt, + "SAX.notationDecl(%s) externalID or PublicID missing\n", name); + ctxt->valid = 0; + ctxt->wellFormed = 0; + return; + } else if (ctxt->inSubset == 1) nota = xmlAddNotationDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, name, publicId, systemId); else if (ctxt->inSubset == 2) diff --git a/valid.c b/valid.c index de44a55c..32357551 100644 --- a/valid.c +++ b/valid.c @@ -1628,6 +1628,7 @@ xmlAddNotationDecl(xmlValidCtxtPtr ctxt ATTRIBUTE_UNUSED, xmlDtdPtr dtd, if ((PublicID == NULL) && (SystemID == NULL)) { xmlGenericError(xmlGenericErrorContext, "xmlAddNotationDecl: no PUBLIC ID nor SYSTEM ID\n"); + return(NULL); } /*