Re: [libxml++] writing formatted (indented) files
- From: Christophe de VIENNE <cdevienne alphacent com>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] writing formatted (indented) files
- Date: Fri, 16 May 2003 12:09:17 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le Vendredi 16 Mai 2003 11:22, Murray Cumming Comneon com a écrit :
> > Anyway we need to remove the calls to xmlKeepBlanksDefault()
> > we actually do.
>
> No, I think we probably need to ensure that the default is in effect,
> restoring the existing setting afterwards. People may be using libxml
> directly and that should not interfere with libxml++ or vice-versa. I think
> I have done that in most places, and meant to do it in all places.
On this point something is strange on libxml2 side.
calling xmlKeepBlanksDefault( xmlKeepBlanksDefault(0) ) should, in my opinion,
be like a no-op. It is not !
Digging a bit in libxml source code it appeared that after a call to
xmlKeepBlanksDefault(), xmlIndentTreeOutput == ! xmlKeepBlanksDefaultValue
But default value of both variable is 1.
Unless it is inconsistent behavior into libxml2, we can't assume that save and
restore the right value is like doing nothing :-(
We could workaround this for the parser by using the parsing context field
'keepBlank' and sax->ignorableWhitespace I guess, but for output it is not
the possible, since the global value are used.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+xLjNB+sU3TyOQjARAtfCAKDk/ShW99CRXlGJG/ECRxkI0BYMlQCguuQO
N/cQ8rcvAm9CpOAhzjdhrec=
=BzYC
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]