mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
libxml now grok Docbook-3.1.5 and Docbook-4.1.1 DTDs, this
popped out a couple of bugs and 3 speed issues, there is only on minor speed issue left. Assorted collection of user reported bugs and fixes: - doc/encoding.html: added encoding aliases doc - doc/xml.html: updates - encoding.[ch]: added EncodingAliases functions - entities.[ch] valid.[ch] debugXML.c: removed two serious bottleneck affecting large DTDs like Docbook - parser.[ch] xmllint.c: added a pedantic option, will be useful - SAX.c: redefinition of entities is reported in pedantic mode - testHTML.c: uninitialized warning from gcc - uri.c: fixed a couple of bugs - TODO: added issue raised by Michael Daniel
This commit is contained in:
126
debugXML.c
126
debugXML.c
@ -760,38 +760,41 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) {
|
||||
xmlEntitiesTablePtr table = (xmlEntitiesTablePtr)
|
||||
doc->intSubset->entities;
|
||||
fprintf(output, "Entities in internal subset\n");
|
||||
for (i = 0;i < table->nb_entities;i++) {
|
||||
for (i = 0;i < table->max_entities;i++) {
|
||||
cur = table->table[i];
|
||||
fprintf(output, "%d : %s : ", i, cur->name);
|
||||
switch (cur->etype) {
|
||||
case XML_INTERNAL_GENERAL_ENTITY:
|
||||
fprintf(output, "INTERNAL GENERAL, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARSED, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL UNPARSED, ");
|
||||
break;
|
||||
case XML_INTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "INTERNAL PARAMETER, ");
|
||||
break;
|
||||
case XML_EXTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARAMETER, ");
|
||||
break;
|
||||
default:
|
||||
fprintf(output, "UNKNOWN TYPE %d",
|
||||
cur->etype);
|
||||
while (cur != NULL) {
|
||||
fprintf(output, "%d : %s : ", i, cur->name);
|
||||
switch (cur->etype) {
|
||||
case XML_INTERNAL_GENERAL_ENTITY:
|
||||
fprintf(output, "INTERNAL GENERAL, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARSED, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL UNPARSED, ");
|
||||
break;
|
||||
case XML_INTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "INTERNAL PARAMETER, ");
|
||||
break;
|
||||
case XML_EXTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARAMETER, ");
|
||||
break;
|
||||
default:
|
||||
fprintf(output, "UNKNOWN TYPE %d",
|
||||
cur->etype);
|
||||
}
|
||||
if (cur->ExternalID != NULL)
|
||||
fprintf(output, "ID \"%s\"", cur->ExternalID);
|
||||
if (cur->SystemID != NULL)
|
||||
fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
|
||||
if (cur->orig != NULL)
|
||||
fprintf(output, "\n orig \"%s\"", cur->orig);
|
||||
if (cur->content != NULL)
|
||||
fprintf(output, "\n content \"%s\"", cur->content);
|
||||
fprintf(output, "\n");
|
||||
cur = cur->nexte;
|
||||
}
|
||||
if (cur->ExternalID != NULL)
|
||||
fprintf(output, "ID \"%s\"", cur->ExternalID);
|
||||
if (cur->SystemID != NULL)
|
||||
fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
|
||||
if (cur->orig != NULL)
|
||||
fprintf(output, "\n orig \"%s\"", cur->orig);
|
||||
if (cur->content != NULL)
|
||||
fprintf(output, "\n content \"%s\"", cur->content);
|
||||
fprintf(output, "\n");
|
||||
}
|
||||
} else
|
||||
fprintf(output, "No entities in internal subset\n");
|
||||
@ -799,38 +802,41 @@ void xmlDebugDumpEntities(FILE *output, xmlDocPtr doc) {
|
||||
xmlEntitiesTablePtr table = (xmlEntitiesTablePtr)
|
||||
doc->extSubset->entities;
|
||||
fprintf(output, "Entities in external subset\n");
|
||||
for (i = 0;i < table->nb_entities;i++) {
|
||||
for (i = 0;i < table->max_entities;i++) {
|
||||
cur = table->table[i];
|
||||
fprintf(output, "%d : %s : ", i, cur->name);
|
||||
switch (cur->etype) {
|
||||
case XML_INTERNAL_GENERAL_ENTITY:
|
||||
fprintf(output, "INTERNAL GENERAL, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARSED, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL UNPARSED, ");
|
||||
break;
|
||||
case XML_INTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "INTERNAL PARAMETER, ");
|
||||
break;
|
||||
case XML_EXTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARAMETER, ");
|
||||
break;
|
||||
default:
|
||||
fprintf(output, "UNKNOWN TYPE %d",
|
||||
cur->etype);
|
||||
while (cur != NULL) {
|
||||
fprintf(output, "%d : %s : ", i, cur->name);
|
||||
switch (cur->etype) {
|
||||
case XML_INTERNAL_GENERAL_ENTITY:
|
||||
fprintf(output, "INTERNAL GENERAL, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARSED, ");
|
||||
break;
|
||||
case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
|
||||
fprintf(output, "EXTERNAL UNPARSED, ");
|
||||
break;
|
||||
case XML_INTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "INTERNAL PARAMETER, ");
|
||||
break;
|
||||
case XML_EXTERNAL_PARAMETER_ENTITY:
|
||||
fprintf(output, "EXTERNAL PARAMETER, ");
|
||||
break;
|
||||
default:
|
||||
fprintf(output, "UNKNOWN TYPE %d",
|
||||
cur->etype);
|
||||
}
|
||||
if (cur->ExternalID != NULL)
|
||||
fprintf(output, "ID \"%s\"", cur->ExternalID);
|
||||
if (cur->SystemID != NULL)
|
||||
fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
|
||||
if (cur->orig != NULL)
|
||||
fprintf(output, "\n orig \"%s\"", cur->orig);
|
||||
if (cur->content != NULL)
|
||||
fprintf(output, "\n content \"%s\"", cur->content);
|
||||
fprintf(output, "\n");
|
||||
cur = cur->nexte;
|
||||
}
|
||||
if (cur->ExternalID != NULL)
|
||||
fprintf(output, "ID \"%s\"", cur->ExternalID);
|
||||
if (cur->SystemID != NULL)
|
||||
fprintf(output, "SYSTEM \"%s\"", cur->SystemID);
|
||||
if (cur->orig != NULL)
|
||||
fprintf(output, "\n orig \"%s\"", cur->orig);
|
||||
if (cur->content != NULL)
|
||||
fprintf(output, "\n content \"%s\"", cur->content);
|
||||
fprintf(output, "\n");
|
||||
}
|
||||
} else
|
||||
fprintf(output, "No entities in external subset\n");
|
||||
|
Reference in New Issue
Block a user