Re: [libxml++] keek blancs.
- From: Christophe de VIENNE <cdevienne alphacent com>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] keek blancs.
- Date: Wed, 28 May 2003 15:27:04 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le Mercredi 28 Mai 2003 14:46, Murray Cumming Comneon com a écrit :
> > From: Christophe de VIENNE [mailto:cdevienne alphacent com]
> > Hi,
> >
> > Not keeping blancs at parsing time or adding some when
> > writing to indent is
> > breaking the XML specifications.
> > However I think it can be usefull to do so. For example in my
> > application I do
> > have XML files in which I have no content nodes, and that I
> > have to edit by
> > hand. Having them indented automatically is _very_ much
> > easier than to
> > include artificial content nodes. I'm sure I'm not alone in this case.
> >
> > So I propose to modify the API of libxml to give the
> > possibility not to keep
> > blanks (xmlKeepBlanksDefault option in libxml).
>
> To start with I think the whole keep_blanks name is very confusing.
Indeed.
> We seem to be dealing with 2 things here:
>
> 1. _Ignoring_ significant white space when parsing the document.
> 2. _Adding_ indents when writing the document.
>
> Those are easy to understand. If we add the features then I think we should
> add them separately and with meaningful names in the API.
1. Does renaming set_keepblancs to set_ignore_whitespaces (and keepblancs
parameter to ignore_whitespace) seem ok for you ?
2. I think write_to_formated_xxx is meaningful enough, but if somebody propose
me something better. Or do you prefer some external functions ?
>
> I think other parsers add 2. as some kind of pretty-printing method. I
> don't know if any other parsers add 1.
> 1. does seem much more XML-spec-breaking than 2.
Probably. But if we have content nodes it makes use of 2. easier. (1. is easy
to avoid if we don't have content nodes : we can just filter the element and
ignore the content node.).
Cheers,
Christophe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+1LkoB+sU3TyOQjARAtkLAJ9PJw3poSxGPhkCteVs2fWXtfJrpwCgkVfQ
63FRaQyFHpPMRsSAj1NiScg=
=OxAR
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]