Commit 7aea52d0 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fixed #71740 NotationDecl with a required field missing Daniel

* valid.c SAX.c: fixed #71740 NotationDecl with a required field
  missing
Daniel
parent c7612996
Mon Feb 18 00:06:42 CET 2002 Daniel Veillard <daniel@veillard.com>
* valid.c SAX.c: fixed #71740 NotationDecl with a required field
missing
Sun Feb 17 23:45:40 CET 2002 Daniel Veillard <daniel@veillard.com>
* check-xml-test-suite.py: improved the behaviour a bit as
......
......@@ -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)
......
......@@ -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);
}
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment