On Mon, 2009-07-27 at 22:10 +0800, Bo Yang wrote:
> > I don't think so. The client will already know what the context is --
> > they passed it to the Document after all.
> 
> Ok, I will put it to the internal API headers.

Thanks.

> >> >> I think our clients may need to test whether two NodeMap are equal.
> >> >> Such as in JS.
> >> >
> >> > Would they not just perform simple equality checking -- i.e. comparing
> >> > the objects' addresses in memory?
> >>
> >> In the implementation of NamedNodeMap now, two Map may equals even  if
> >> they are different objects.
> >
> > Only if you're wanting member-wise equality, no?
> 
> I am sorry, but I did not catch what you mean. I think the equals test
> may need when our clients write something like :
> 
> if (ele1.attributes == ele2.attributes){ do something! }
> 
> in JS.

A small amount of testing shows that this returns false unless ele1 ==
ele2. Therefore, equality of NamedNodeMaps is simply determined by their
address in memory. Thus, this API is not necessary and should be
removed.


J.


Reply via email to