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>
|
Thu Jul 5 00:04:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* parser.c: improved the description of a couple of interfaces
|
* 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 */
|
||||||
/* #define DEBUG_SAX_TREE */
|
/* #define DEBUG_SAX_TREE */
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#ifdef DEBUG_SAX
|
|
||||||
#define ATTRIBUTE_UNUSED
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getPublicId:
|
* getPublicId:
|
||||||
* @ctx: the user data (XML parser context)
|
* @ctx: the user data (XML parser context)
|
||||||
@@ -369,7 +363,7 @@ getEntity(void *ctx, const xmlChar *name)
|
|||||||
xmlNodePtr children;
|
xmlNodePtr children;
|
||||||
|
|
||||||
parse = xmlParseCtxtExternalEntity(ctxt,
|
parse = xmlParseCtxtExternalEntity(ctxt,
|
||||||
ret->SystemID, ret->ExternalID, &children);
|
ret->URI, ret->ExternalID, &children);
|
||||||
xmlAddChildList((xmlNodePtr) ret, children);
|
xmlAddChildList((xmlNodePtr) ret, children);
|
||||||
}
|
}
|
||||||
return(ret);
|
return(ret);
|
||||||
@@ -530,7 +524,7 @@ attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
|
|||||||
* An element definition has been parsed
|
* An element definition has been parsed
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
elementDecl(void *ctx, const xmlChar *name, int type,
|
elementDecl(void *ctx, const xmlChar * name, int type,
|
||||||
xmlElementContentPtr content)
|
xmlElementContentPtr content)
|
||||||
{
|
{
|
||||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||||
@@ -538,8 +532,7 @@ elementDecl(void *ctx, const xmlChar *name, int type,
|
|||||||
|
|
||||||
#ifdef DEBUG_SAX
|
#ifdef DEBUG_SAX
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
xmlGenericError(xmlGenericErrorContext,
|
||||||
"SAX.elementDecl(%s, %d, ...)\n",
|
"SAX.elementDecl(%s, %d, ...)\n", name, type);
|
||||||
fullname, type);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ctxt->inSubset == 1)
|
if (ctxt->inSubset == 1)
|
||||||
@@ -551,13 +544,16 @@ elementDecl(void *ctx, const xmlChar *name, int type,
|
|||||||
else {
|
else {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt,
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (elem == NULL) ctxt->valid = 0;
|
if (elem == NULL)
|
||||||
|
ctxt->valid = 0;
|
||||||
if (ctxt->validate && ctxt->wellFormed &&
|
if (ctxt->validate && ctxt->wellFormed &&
|
||||||
ctxt->myDoc && ctxt->myDoc->intSubset)
|
ctxt->myDoc && ctxt->myDoc->intSubset)
|
||||||
ctxt->valid &= xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem);
|
ctxt->valid &=
|
||||||
|
xmlValidateElementDecl(&ctxt->vctxt, ctxt->myDoc, elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
2
xmlIO.c
2
xmlIO.c
@@ -74,7 +74,7 @@
|
|||||||
#define xmlRegisterDefaultOutputCallbacks xmlRegisterDefOutputCallbacks
|
#define xmlRegisterDefaultOutputCallbacks xmlRegisterDefOutputCallbacks
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG_EXTERNAL_ENTITIES
|
/* #define DEBUG_EXTERNAL_ENTITIES */
|
||||||
/* #define DEBUG_INPUT */
|
/* #define DEBUG_INPUT */
|
||||||
|
|
||||||
#ifdef DEBUG_INPUT
|
#ifdef DEBUG_INPUT
|
||||||
|
Reference in New Issue
Block a user