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

Re: [dom3core] getAttribute

From: Curt Arnold <carnold@houston.rr.com>
Date: Fri, 18 Nov 2005 22:23:42 -0600
Message-Id: <784AC10C-4833-4560-B8F4-EA53CC774597@houston.rr.com>
To: DOM mailing list <www-dom@w3.org>

On Nov 18, 2005, at 4:37 PM, Joseph Kesselman wrote:

> Personal reaction: If all the other browsers really are wrong...  
> They're
> still wrong, and we should be beating them up and trying to get  
> them to fix
> it rather than endorsing this error.
> But I have a bit of trouble believing this assertion.
> If folks want to distinguish between empty attribute and absent  
> attribute,
> they should be using getAttributeNode(), which *does* return null  
> for an
> empty node.
> Are you sure you aren't confusing these two calls, or working in a  
> language
> binding that masks the difference between null and empty string?

My recollection (which I'll confirm tomorrow) is that Anne's  
observation is correct.  The recommendation explicitly says "empty  
string" (http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/ 
core.html#ID-666EE0F9).  Java implementations typically conform to  
the spec and return "", ECMAScript implementations typically return  
null to be compatible with Internet Explorer.
Received on Saturday, 19 November 2005 04:23:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:12 UTC