1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

More work toward DTD parsing, informations on the mailing-list and Web, Daniel.

This commit is contained in:
Daniel Veillard
1999-01-31 22:15:06 +00:00
parent 7eb5c4f227
commit 3b9def1571
7 changed files with 280 additions and 19 deletions

7
tree.c
View File

@ -20,6 +20,7 @@
#include "tree.h"
#include "entities.h"
#include "valid.h"
static CHAR xmlStringText[] = { 't', 'e', 'x', 't', 0 };
int oldXMLWDcompatibility = 0;
@ -345,7 +346,7 @@ xmlFreeDtd(xmlDtdPtr cur) {
if (cur->SystemID != NULL) free((char *) cur->SystemID);
if (cur->ExternalID != NULL) free((char *) cur->ExternalID);
if (cur->elements != NULL)
fprintf(stderr, "xmlFreeDtd: cur->elements != NULL !!! \n");
xmlFreeElementTable((xmlElementTablePtr) cur->elements);
if (cur->entities != NULL)
xmlFreeEntitiesTable((xmlEntitiesTablePtr) cur->entities);
memset(cur, -1, sizeof(xmlDtd));
@ -2268,13 +2269,15 @@ xmlDtdDump(xmlDocPtr doc) {
xmlBufferWriteCHAR(cur->SystemID);
xmlBufferWriteChar("\"");
}
if (cur->entities == NULL) {
if ((cur->entities == NULL) && (cur->elements == NULL)) {
xmlBufferWriteChar(">\n");
return;
}
xmlBufferWriteChar(" [\n");
if (cur->entities != NULL)
xmlDumpEntitiesTable((xmlEntitiesTablePtr) cur->entities);
if (cur->elements != NULL)
xmlDumpElementTable((xmlElementTablePtr) cur->elements);
xmlBufferWriteChar("]");
/* TODO !!! a lot more things to dump ... */