mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
fixed a URI-Reference computation problem when validating small cleanup
* SAX.c: fixed a URI-Reference computation problem when validating * xmlIO.c: small cleanup Daniel
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
Thu Jul 5 00:52:25 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* SAX.c: fixed a URI-Reference computation problem when validating
|
||||
* xmlIO.c: small cleanup
|
||||
|
||||
Thu Jul 5 00:04:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* parser.c: improved the description of a couple of interfaces
|
||||
|
22
SAX.c
22
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,7 +524,7 @@ attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
||||
* An element definition has been parsed
|
||||
*/
|
||||
void
|
||||
elementDecl(void *ctx, const xmlChar *name, int type,
|
||||
elementDecl(void *ctx, const xmlChar * name, int type,
|
||||
xmlElementContentPtr content)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
@@ -538,8 +532,7 @@ elementDecl(void *ctx, const xmlChar *name, int type,
|
||||
|
||||
#ifdef DEBUG_SAX
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"SAX.elementDecl(%s, %d, ...)\n",
|
||||
fullname, type);
|
||||
"SAX.elementDecl(%s, %d, ...)\n", name, type);
|
||||
#endif
|
||||
|
||||
if (ctxt->inSubset == 1)
|
||||
@@ -551,13 +544,16 @@ elementDecl(void *ctx, const xmlChar *name, int type,
|
||||
else {
|
||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||
ctxt->sax->error(ctxt,
|
||||
"SAX.elementDecl(%s) called while not in subset\n", name);
|
||||
"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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user