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 18:57:44 +0100
Message-ID: <3FD75E98.2060804@expway.fr>
To: Andrew Clover <and-w3@doxdesk.com>
Cc: www-dom@w3.org

Andrew Clover wrote:
> Robin Berjon <robin.berjon@expway.fr> wrote:
>>whether it is legal to use it with a defined nsURI, and a qName that
>>doesn't contain a prefix part.
> 
> Sure it is. For example, the element in '<a xmlns="a"/>' has a non-null
> namespaceURI but no prefix. It must be possible to create the element by
> DOM methods without having to create the namespace declaration attribute.

True, and the spec does mention xmlns but as a special case (which it 
is, 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.

>>Most implementations seem to accept it, and then fail to serialise it 
>>properly.
> 
> Up until DOM Level 3, there was nothing to say how (if at all) namespace
> fixup should be done in this case. This is better defined in the latest
> specs (dependent on the value of the 'namespaces' parameter to
> DOMConfiguration, an imp might be expected to do the fixup on serialisation
> and/or normalisation), with a suggested algorithm, so imps should hopefully
> become more standardised on this issue.

Yes, I'm not at all worried about that part which so far I've found rosy 
and fairly straightforward to implement.

Thanks!

-- 
Robin Berjon
Received on Wednesday, 10 December 2003 12:57:46 GMT

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