mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Release of libxml-1.1, Daniel.
This commit is contained in:
11
testSAX.c
11
testSAX.c
@ -28,6 +28,7 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "parser.h"
|
||||
#include "parserInternals.h" /* only for xmlNewInputFromFile() */
|
||||
#include "tree.h"
|
||||
#include "debugXML.h"
|
||||
|
||||
@ -63,6 +64,7 @@ xmlSAXHandler emptySAXHandlerStruct = {
|
||||
};
|
||||
|
||||
xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;
|
||||
extern xmlSAXHandlerPtr debugSAXHandler;
|
||||
|
||||
/*
|
||||
* Note: there is a couple of errors introduced on purpose.
|
||||
@ -148,8 +150,14 @@ void
|
||||
internalSubsetDebug(xmlParserCtxtPtr ctxt, const CHAR *name,
|
||||
const CHAR *ExternalID, const CHAR *SystemID)
|
||||
{
|
||||
xmlDtdPtr externalSubset;
|
||||
|
||||
fprintf(stdout, "SAX.internalSubset(%s, %s, %s)\n",
|
||||
name, ExternalID, SystemID);
|
||||
|
||||
if ((ExternalID != NULL) || (SystemID != NULL)) {
|
||||
externalSubset = xmlSAXParseDTD(debugSAXHandler, ExternalID, SystemID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -171,6 +179,9 @@ resolveEntityDebug(xmlParserCtxtPtr ctxt, const CHAR *publicId, const CHAR *syst
|
||||
{
|
||||
fprintf(stdout, "SAX.resolveEntity(%s, %s)\n",
|
||||
(char *)publicId, (char *)systemId);
|
||||
if (systemId != NULL) {
|
||||
return(xmlNewInputFromFile(ctxt, systemId));
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user