mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
fixing bug #119264 xmllint failing to report serialization errors in some
* xmllint.c: fixing bug #119264 xmllint failing to report serialization errors in some cases. Daniel
This commit is contained in:
parent
18ab8721ff
commit
3df01181bd
@ -1,3 +1,8 @@
|
|||||||
|
Wed Dec 10 11:16:29 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* xmllint.c: fixing bug #119264 xmllint failing to report
|
||||||
|
serialization errors in some cases.
|
||||||
|
|
||||||
Tue Dec 9 23:50:23 CET 2003 Daniel Veillard <daniel@veillard.com>
|
Tue Dec 9 23:50:23 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* entities.c: fixed an XML entites content serialization
|
* entities.c: fixed an XML entites content serialization
|
||||||
|
@ -214,7 +214,7 @@ AC_ARG_ENABLE(xmltest,
|
|||||||
enable_xmltest=yes)
|
enable_xmltest=yes)
|
||||||
|
|
||||||
if test x$xml_config_exec_prefix != x ; then
|
if test x$xml_config_exec_prefix != x ; then
|
||||||
xml_config_args="$xml_config_args --exec-prefix=$xml_config_exec_prefix"
|
xml_config_args="$xml_config_args"
|
||||||
if test x${XML2_CONFIG+set} != xset ; then
|
if test x${XML2_CONFIG+set} != xset ; then
|
||||||
XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
|
XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
|
||||||
fi
|
fi
|
||||||
|
19
xmllint.c
19
xmllint.c
@ -1066,6 +1066,8 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
|||||||
#endif /* LIBXML_READER_ENABLED */
|
#endif /* LIBXML_READER_ENABLED */
|
||||||
#ifdef LIBXML_OUTPUT_ENABLED
|
#ifdef LIBXML_OUTPUT_ENABLED
|
||||||
if (noout == 0) {
|
if (noout == 0) {
|
||||||
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print it.
|
* print it.
|
||||||
*/
|
*/
|
||||||
@ -1144,14 +1146,25 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
|
|||||||
}
|
}
|
||||||
else if (encoding != NULL) {
|
else if (encoding != NULL) {
|
||||||
if ( format ) {
|
if ( format ) {
|
||||||
xmlSaveFormatFileEnc(output ? output : "-", doc, encoding, 1);
|
ret = xmlSaveFormatFileEnc(output ? output : "-", doc,
|
||||||
|
encoding, 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xmlSaveFileEnc(output ? output : "-", doc, encoding);
|
ret = xmlSaveFileEnc(output ? output : "-", doc, encoding);
|
||||||
|
}
|
||||||
|
if (ret < 0) {
|
||||||
|
fprintf(stderr, "failed save to %s\n",
|
||||||
|
output ? output : "-");
|
||||||
|
progresult = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (format) {
|
else if (format) {
|
||||||
xmlSaveFormatFile(output ? output : "-", doc, 1);
|
ret = xmlSaveFormatFile(output ? output : "-", doc, 1);
|
||||||
|
if (ret < 0) {
|
||||||
|
fprintf(stderr, "failed save to %s\n",
|
||||||
|
output ? output : "-");
|
||||||
|
progresult = 6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FILE *out;
|
FILE *out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user