summaryrefslogtreecommitdiff
path: root/SAX.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-02-17 23:07:47 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-02-17 23:07:47 +0000
commit7aea52d03ee22bf103bdea0d7e6089998e7ff9e4 (patch)
tree61f469370b16072a53b3fb429e0d6b96da1fd979 /SAX.c
parentc7612996ad1148c324dcd75ca732cf4c0cb68ae0 (diff)
downloadlibxml2-7aea52d03ee22bf103bdea0d7e6089998e7ff9e4.tar.gz
fixed #71740 NotationDecl with a required field missing Daniel
* valid.c SAX.c: fixed #71740 NotationDecl with a required field missing Daniel
Diffstat (limited to 'SAX.c')
-rw-r--r--SAX.c9
1 files changed, 8 insertions, 1 deletions
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)