diff --git a/ChangeLog b/ChangeLog index f076c46f..9bc20ed7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 5 00:52:25 CEST 2001 Daniel Veillard + + * SAX.c: fixed a URI-Reference computation problem when validating + * xmlIO.c: small cleanup + Thu Jul 5 00:04:58 CEST 2001 Daniel Veillard * parser.c: improved the description of a couple of interfaces diff --git a/SAX.c b/SAX.c index a1079289..5b410724 100644 --- a/SAX.c +++ b/SAX.c @@ -26,12 +26,6 @@ /* #define DEBUG_SAX */ /* #define DEBUG_SAX_TREE */ -#ifdef __GNUC__ -#ifdef DEBUG_SAX -#define ATTRIBUTE_UNUSED -#endif -#endif - /** * getPublicId: * @ctx: the user data (XML parser context) @@ -369,7 +363,7 @@ getEntity(void *ctx, const xmlChar *name) xmlNodePtr children; parse = xmlParseCtxtExternalEntity(ctxt, - ret->SystemID, ret->ExternalID, &children); + ret->URI, ret->ExternalID, &children); xmlAddChildList((xmlNodePtr) ret, children); } return(ret); @@ -530,34 +524,36 @@ attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname, * An element definition has been parsed */ void -elementDecl(void *ctx, const xmlChar *name, int type, - xmlElementContentPtr content) +elementDecl(void *ctx, const xmlChar * name, int type, + xmlElementContentPtr content) { xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; xmlElementPtr elem = NULL; #ifdef DEBUG_SAX xmlGenericError(xmlGenericErrorContext, - "SAX.elementDecl(%s, %d, ...)\n", - fullname, type); + "SAX.elementDecl(%s, %d, ...)\n", name, type); #endif - + if (ctxt->inSubset == 1) - elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, - name, (xmlElementTypeVal) type, content); + elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->intSubset, + name, (xmlElementTypeVal) type, content); else if (ctxt->inSubset == 2) - elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, - name, (xmlElementTypeVal) type, content); + elem = xmlAddElementDecl(&ctxt->vctxt, ctxt->myDoc->extSubset, + name, (xmlElementTypeVal) type, content); else { - if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) - ctxt->sax->error(ctxt, - "SAX.elementDecl(%s) called while not in subset\n", name); - return; + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt, + "SAX.elementDecl(%s) called while not in subset\n", + name); + return; } - if (elem == NULL) ctxt->valid = 0; + if (elem == NULL) + ctxt->valid = 0; if (ctxt->validate && ctxt->wellFormed && ctxt->myDoc && ctxt->myDoc->intSubset) - ctxt->valid &= xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); + ctxt->valid &= + xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem); } /** diff --git a/xmlIO.c b/xmlIO.c index 33f2d7ee..fd2b6104 100644 --- a/xmlIO.c +++ b/xmlIO.c @@ -74,7 +74,7 @@ #define xmlRegisterDefaultOutputCallbacks xmlRegisterDefOutputCallbacks #endif -#define DEBUG_EXTERNAL_ENTITIES +/* #define DEBUG_EXTERNAL_ENTITIES */ /* #define DEBUG_INPUT */ #ifdef DEBUG_INPUT