W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

Re: SVGT 1.2: no way to tell through uDOM if an attribute is present

From: Maciej Stachowiak <mjs@apple.com>
Date: Mon, 30 Jan 2006 23:59:35 -0800
Message-Id: <E2E32A29-17E7-4ECD-85FC-E4C5F14D1687@apple.com>
Cc: www-svg@w3c.org
To: Cyril Concolato <cyril.concolato@enst.fr>


On Jan 4, 2006, at 1:09 AM, Cyril Concolato wrote:

> Hi,
>
> Maciej Stachowiak a écrit :
>> Since getAttributeNS returns empty string for both an absent   
>> attribute and an attribute that is present but with an empty  
>> value,  there is no way to determine through the uDOM whether an  
>> attribute is  absent. This seems like a significant hole in the  
>> API and the  implementation load from adding hasAttributeNS seems  
>> small.
> I understand the concern about compatibility between uDOM and DOM  
> on getAttributeNS, but I don't think testing if an attribute is  
> absent is relevant in SVG T1.2. In SVG T 1.2, the intent is that  
> unspecified attributes default to a value, so whether it's absent  
> or specified with the default value is the same. Could you explain  
> why you would test if an attribute is absent?

For foreign attributes it would make a difference. You may also wish  
to know so you can do your own serialization of an element. I can't  
say it is the most useful thing in the world, but it is not useless  
either, and I think adding it would not be a large burden on  
implementors.

Regards,
Maciej
Received on Tuesday, 31 January 2006 07:59:44 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:33 GMT