Re: [Libxmlplusplus-general] Multiple Node types



On Mon, 2002-12-09 at 21:57, Christophe de Vienne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Lundi 9 Décembre 2002 21:16, Murray Cumming wrote:
> > Sorry, this time I'm sure. The example is showing child nodes, with the
> > name "text". content() returns nothing for their parent nodes.
> >
> 
> that's funny because I saw the same 'bug' in a different way :
> For me the problem was at write time (the created xmlNode created for a text 
> node was a normal one) and in the name of the accessor (has_content instead 
> of is_content).
> That's why I changed the way dom_parser display them, and was annoyed with the 
> has_content accessor...
> 
> I agree on the bug fix release.
> I think it would be better to rename has_content() to is_content() since it 
> correspond to the actual behavior (of the previous releases too), and to 
> correct the write method (there is only one line missing, it seems to be a 
> mistake I did when rewriting write).
> 
> Do you agree on that ?

I don't have much faith that the previous releases had much consistency
or structure.

I think that content() should do the reverse of set_content().
set_content() works, but content() doesn't so it should be fixed. I can
check that fix in if you like.

is_content() might be useful (it's just name == "text"), but it's not
really just a rename of has_content() - it does something different. But
as soon as you add a working node-type-identifier such as this, people
will expect to see the other ones.

has_content() isn't very useful anyway.


-- 
Murray Cumming
murray usa net
www.murrayc.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]