[xml] [PATCH] xmlIndentTreeOutput and xmlKeepBlanksDefault()
- From: Nick Wellnhofer <wellnhofer aevum de>
- To: xml gnome org
- Subject: [xml] [PATCH] xmlIndentTreeOutput and xmlKeepBlanksDefault()
- Date: Sat, 24 Jan 2009 14:16:04 +0100
I think the function xmlKeepBlanksDefault() in parserInternals.c should
never set the global variable xmlIndentTreeOutput to 0.
AFAICS its only use is to enable legacy behavior by calling
xmlKeepBlanksDefault(0). This sets xmlIndentTreeOutput to 1, which seems
to be correct.
But when you call xmlKeepBlanksDefault(1) (which in most cases should be
a no-op) xmlIndentTreeOutput is set to 0 (default is 1). The libxml perl
bindings do this for example, so suddenly indenting is disabled.
So I think the attached patch is the right solution.
Nick
--
aevum gmbh
rumfordstr. 4
80469 münchen
germany
tel: +49 89 3838 0653
http://aevum.de/
--- parserInternals.c.orig 2009-01-24 14:09:53.000000000 +0100
+++ parserInternals.c 2009-01-24 14:10:09.000000000 +0100
@@ -2067,7 +2067,7 @@
int old = xmlKeepBlanksDefaultValue;
xmlKeepBlanksDefaultValue = val;
- xmlIndentTreeOutput = !val;
+ if (!val) xmlIndentTreeOutput = 1;
return(old);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]