Re: [dom3core] getAttribute

On Thu, 01 Dec 2005 10:46:17 +0100, Kasimier Buchcik  
<K.Buchcik@4commerce.de> wrote:
> If both, "" and NULL would be allowed to be returned, then people would
> have to test for both cases to have the code run under any
> implementation.

That is actually today's situation. People check only for NULL though, not  
for "".


> I don't think getAttribute() should be used to test if an attribute
> is existent; getAttributeNode() is there for this purpose.

We never said it should be used in that way.


> I second Joseph Kesselman's argument; people can use what is already
> there to solve this problem:
> 1) test for attribute node existence with getAttributeNode()
> 2) retrieve the value with getAttribute() or work on the attribute
>    node previously acquired

That's not really the point. The point is that people don't and that the  
people are with many doing this on quite some important sites. (In other  
words, the real world does not play ball.)

Until now we had some site specific workarounds et cetera, but that does  
not cut it. Hence the change.

Kind regards,

Anne van Kesteren


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Thursday, 1 December 2005 09:58:44 UTC