Re: [Libxmlplusplus-general] write() broken, maybe fixed
- From: Christophe de VIENNE <cdevienne alphacent com>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [Libxmlplusplus-general] write() broken, maybe fixed
- Date: Mon, 16 Dec 2002 19:04:39 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le Lundi 16 Décembre 2002 17:38, Murray Cumming a écrit :
> >
> > no. The _content attribute is used only in text nodes, and it has always
> > been like this in libxml++.
>
> "always" is very unclear. I don't think that libxml++ was usable before
> 0.16.0 and I think that the current API represents text as "content"
> rather than as child nodes of a certain type.
at least it's the way I was anderstanding the stuff. That led to all these
misanderstanding between us since the beginning. I hope it will get better...
if we continue to interpret the API in a different way we won't go far :-(
In fact I was not andestanding why you wanted to put the content in the parent
node. I was using (it _was_ usable, even if not perfect) libxml++-0.13 and
this behavior was logic to me, and there was no reason for me to change it.
>
> What you suggest seems very silly:
> NodeText = node.add_content("some text");
> nodeText->set_content("changed text");
Thanks for the silly ;-)
Indeed this looks not logic. But the documentation of libxml++-0.13 was
somehow clear on this point, and I think people were using it this way, like
I did.
extract from old README
123 bool is_content()
124 Returns true if the node is a content node and false otherwise.
125
126 const string & content()
127 Returns the content of the node.
128
129 const string & content(const string &c)
130 Sets the content of the node.
[...]
145 XMLNode *add_content(const string &c = string())
146 Adds a new child that is set to store content.
147
When starting working on libxml++ this was very clear to me, and working well.
So my feeling was, why change it since it's clear and working ?
The problems started because of a misanderstanding between us about the
content handling.
>
> What I suggest seems clearer:
> node->set_content("some text");
> node->set_content("changed text");
agree it's clearer. But to have this working correctly we have to change
set_content behavior.
>
> > yes. By the way, I want to warn people waiting for these changes that I
> > have a lack of time this week and next one. So the next release shouldn't
> > happen before beginning of january.
>
> Which effectively means the middle of January at the latest.
>
> I wouldn't worry about this temporary problem, but this makes it not so
> temporary.
I'll do my best to finish it sooner but I cannot make my days longer
unfortunately.
> > If you don't mind, we'll go back on your last change on node.cc, and
> > correct the dom_build example.
> > Since we didn't do any big changes since the last release, we can do a
> > 0.17.1 version release including the fix.
>
> I would prefer to
> a)
> remove add_content() because it seems unnecessary and leads to
> confusion.
> b)
> Hear about any problems with the current code. Maybe you need to repeat
> something from the previous emails.
I think there is no proper solution but change the API.
I'll try to do something sooner to avoid the confusion being too long...
I keep you informed,
Cheers,
Christophe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAj3+FbsACgkQB+sU3TyOQjDr5wCfdatCwWJOjqUis5ZW4GtIod61
H3MAoJo7xQZcj6Dg1jldW9IoEE5Kqka8
=VMlf
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]