Commit 41c4a753 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fixed 2 problems raised by #152140, one which is that notation not in the

* valid.c xmlsave.c: fixed 2 problems raised by #152140, one
  which is that notation not in the internal subset should
  not be saved, and the second more nasty on an error saving
  NOTATIONs, if there is a proof that nobody uses notations !
Daniel
parent 5eba91f2
Wed Sep 8 22:50:27 CEST 2004 Daniel Veillard <daniel@veillard.com>
* valid.c xmlsave.c: fixed 2 problems raised by #152140, one
which is that notation not in the internal subset should
not be saved, and the second more nasty on an error saving
NOTATIONs, if there is a proof that nobody uses notations !
Wed Sep 8 11:04:27 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
 
* xmlschemas.c include/libxml/xmlschemas.h: Added the function
......
......@@ -2325,11 +2325,11 @@ xmlDumpNotationDecl(xmlBufferPtr buf, xmlNotationPtr nota) {
xmlBufferWriteQuotedString(buf, nota->PublicID);
if (nota->SystemID != NULL) {
xmlBufferWriteChar(buf, " ");
xmlBufferWriteCHAR(buf, nota->SystemID);
xmlBufferWriteQuotedString(buf, nota->SystemID);
}
} else {
xmlBufferWriteChar(buf, " SYSTEM ");
xmlBufferWriteCHAR(buf, nota->SystemID);
xmlBufferWriteQuotedString(buf, nota->SystemID);
}
xmlBufferWriteChar(buf, " >\n");
}
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment