Re: [xml] xmlTextWriterSetIndent and significant whitespace
- From: Lucas Brasilino <brasilino recife pe gov br>
- To: chpe gnome org
- Cc: xml gnome org
- Subject: Re: [xml] xmlTextWriterSetIndent and significant whitespace
- Date: Mon, 05 Jan 2004 09:47:15 -0300
Hi
I'd have expected xmlTextWriter's output with xmlTextWriterSetIndent to
be the same as the tree api's output with xmlIndentTreeOutput = 1, but
that isn't the case. Consider the output of the attached testcase:
Yep, it was a bug. Here comes the patch. Daniel, please commit
it.
Thanks providing a test code. If you can stress-test it, I'll
be very thankful. :)
regards
--
[]'s
Lucas Brasilino
brasilino recife pe gov br
http://www.recife.pe.gov.br
Emprel - Empresa Municipal de Informatica (pt_BR)
Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078
Index: xmlwriter.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/xmlwriter.c,v
retrieving revision 1.9
diff -u -r1.9 xmlwriter.c
--- xmlwriter.c 2 Jan 2004 20:04:21 -0000 1.9
+++ xmlwriter.c 5 Jan 2004 12:41:39 -0000
@@ -1224,6 +1224,9 @@
break;
}
+ if (writer->indent)
+ writer->doindent = 0;
+
if (buf != 0) {
count =
xmlOutputBufferWriteString(writer->out, (const char *) buf);
@@ -1980,7 +1983,6 @@
if (count == -1)
return -1;
sum += count;
- writer->doindent = 0;
count = xmlTextWriterEndElement(writer);
if (count == -1)
return -1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]