From 4e52f2f43080485d279e4b6d187c7c034be752a7 Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Sun, 14 Sep 2003 18:07:39 +0000 Subject: [PATCH] fixed bug 121759 - early declaration of attribute-list in external DTD * valid.c: fixed bug 121759 - early declaration of attribute-list in external DTD --- ChangeLog | 5 +++++ valid.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 251bc555..dfd0c2bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Sep 14 11:03:27 PDT 2003 William Brack + + * valid.c: fixed bug 121759 - early declaration of + attribute-list in external DTD + Sat Sep 13 14:42:11 CEST 2003 Daniel Veillard * parser.c include/libxml/xmlerror.h: starting cleaning up diff --git a/valid.c b/valid.c index 5e28d0da..36d1a35b 100644 --- a/valid.c +++ b/valid.c @@ -1214,6 +1214,11 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, xmlFree(uqname); return(NULL); } + /* + * For new element, may have attributes from earlier + * definition in internal subset + */ + ret->attributes = oldAttributes; } /* @@ -1221,7 +1226,6 @@ xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar *name, */ ret->etype = type; ret->content = xmlCopyElementContent(content); - ret->attributes = oldAttributes; /* * Link it to the DTD