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

Re: [dom3core] getAttribute

From: Kasimier Buchcik <K.Buchcik@4commerce.de>
Date: Thu, 01 Dec 2005 11:33:32 +0100
To: Anne van Kesteren <annevk@opera.com>
Cc: ML-www-dom <www-dom@w3.org>
Message-Id: <1133433212.1272.46.camel@librax>

Hi,

On Thu, 2005-12-01 at 10:58 +0100, Anne van Kesteren wrote:
> 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.

True, this comment was not related to anything you said.

> > 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.)

I object to this. 'some important sites' should not be an argument here,
since those sites are still written by people and people tend to make
mistakes. Shold we favour mistakes over the spec? What are the arguments
for trying to inject something into the spec to make broken things work?

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

I understand that the DOM spec evolves over time; mostly on basis of
requirements of the 'real world'. But the issue we talk about is,
in my eyes, a simple misuse of a method. Aren't the sites you call
'the real world' a broken world?

IMHO the effort to make things work should be directed to those
who wrote those broken sites.

Regards,

Kasimier
Received on Thursday, 1 December 2005 10:34:18 GMT

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