cleaned up the output of SAX tests, Daniel
diff --git a/testHTML.c b/testHTML.c
index 721f0e5..d680cf0 100644
--- a/testHTML.c
+++ b/testHTML.c
@@ -143,20 +143,15 @@
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 @@
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");