1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-28 00:21:53 +03:00

cleaned up the output of SAX tests, Daniel

This commit is contained in:
Daniel Veillard
2000-08-17 13:50:51 +00:00
parent 29579360a7
commit 808a3f1f9f
10 changed files with 42 additions and 43 deletions

View File

@ -143,20 +143,15 @@ void
internalSubsetDebug(void *ctx, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *SystemID)
{
/* xmlDtdPtr externalSubset; */
fprintf(stdout, "SAX.internalSubset(%s, %s, %s)\n",
name, (ExternalID == NULL) ? "(null)" : ExternalID,
(SystemID == NULL) ? "(null)" : SystemID);
/***********
if ((ExternalID != NULL) || (SystemID != NULL)) {
externalSubset = xmlParseDTD(ExternalID, SystemID);
if (externalSubset != NULL) {
xmlFreeDtd(externalSubset);
}
}
***********/
fprintf(stdout, "SAX.internalSubset(%s,", name);
if (ExternalID == NULL)
fprintf(stdout, " ,");
else
fprintf(stdout, " %s,", ExternalID);
if (SystemID == NULL)
fprintf(stdout, " )\n");
else
fprintf(stdout, " %s)\n", SystemID);
}
/**
@ -372,8 +367,9 @@ startElementDebug(void *ctx, const xmlChar *name, const xmlChar **atts)
fprintf(stdout, "SAX.startElement(%s", (char *) name);
if (atts != NULL) {
for (i = 0;(atts[i] != NULL);i++) {
fprintf(stdout, ", %s='", atts[i++]);
fprintf(stdout, "%s'", (atts[i] == NULL) ? "(null)" : atts[i]);
fprintf(stdout, ", %s", atts[i++]);
if (atts[i] != NULL)
fprintf(stdout, "='%s'", atts[i]);
}
}
fprintf(stdout, ")\n");