summaryrefslogtreecommitdiff
path: root/xmlsave.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-10-13 08:57:08 +0000
committerMike Hommey <mh@glandium.org>2004-10-13 08:57:08 +0000
commit0732be88d054db33fa0ca479eab9988c8e6be42e (patch)
tree8b9cf70e04bd32115caebeb74cb0d841d1eced3b /xmlsave.c
parent09deb06614c3408ec0816a3c88920138bae2083c (diff)
downloadlibxml2-0732be88d054db33fa0ca479eab9988c8e6be42e.tar.gz
Load /tmp/tmp.zzO3vU/libxml2-2.6.14 intoupstream/2.6.14
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'xmlsave.c')
-rw-r--r--xmlsave.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xmlsave.c b/xmlsave.c
index 1e8e0d7..398f62a 100644
--- a/xmlsave.c
+++ b/xmlsave.c
@@ -517,14 +517,18 @@ xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
xmlBufferWriteQuotedString(buf->buffer, dtd->SystemID);
}
if ((dtd->entities == NULL) && (dtd->elements == NULL) &&
- (dtd->attributes == NULL) && (dtd->notations == NULL) &&
- (dtd->pentities == NULL)) {
+ (dtd->attributes == NULL) && (dtd->notations == NULL) &&
+ (dtd->pentities == NULL)) {
xmlOutputBufferWrite(buf, 1, ">");
return;
}
xmlOutputBufferWrite(buf, 3, " [\n");
- /* Dump the notations first they are not in the DTD children list */
- if (dtd->notations != NULL) {
+ /*
+ * Dump the notations first they are not in the DTD children list
+ * Do this only on a standalone DTD or on the internal subset though.
+ */
+ if ((dtd->notations != NULL) && ((dtd->doc == NULL) ||
+ (dtd->doc->intSubset == dtd))) {
xmlDumpNotationTable(buf->buffer, (xmlNotationTablePtr) dtd->notations);
}
format = ctxt->format;