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

Re: Hesitation on setAttributeNS

From: Robin Berjon <robin.berjon@expway.fr>
Date: Wed, 10 Dec 2003 20:53:54 +0100
Message-ID: <3FD779D2.8020508@expway.fr>
To: Andrew Clover <and-w3@doxdesk.com>
Cc: www-dom@w3.org

Andrew Clover wrote:
> Robin Berjon <robin.berjon@expway.fr> wrote:
>>I surely hope no other prefix-less attribute can be considered to 
>>have a namespace in XML :) I didn't find it clear from the text that 
>>setting a nsURI and no prefix was allowed.
> Ah! I see what you mean properly now. :-)
> As I read it, the prefix of an Attr node is, in the face of namespace
> normalisation, not fixed, so it makes sense that a non-namespace-well-formed
> situation (namespace w/ null prefix) should be allowed to exist temporarily
> - it could be used by authors to create attributes in a namespace without
> caring what prefix will later be used in the serialisation.
> My interpretation, anyway.

Yes, I agree that having the prefix as an indication of what the author 
would like to see used that may eventually be something different (if 
two attributes with the same prefix but different namespaces are set on 
the same element) or that may be absent to let the implementation make a 
reasonable choice is a good feature. But as you say, the text around the 
method more or less leaves that up to interpretation, having it spelt 
out would be nicer and more conducive to interoperable implementations.

Robin Berjon
Received on Wednesday, 10 December 2003 14:57:05 UTC

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