W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2005

Re: [dom3core] getAttribute

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 01 Dec 2005 10:58:12 +0100
To: "Kasimier Buchcik" <K.Buchcik@4commerce.de>
Cc: www-dom <www-dom@w3.org>
Message-ID: <op.s03nbao164w2qv@id-c0020.oslo.opera.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:58 GMT