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

Re: Hesitation on setAttributeNS

From: Andrew Clover <and-w3@doxdesk.com>
Date: Wed, 10 Dec 2003 16:58:49 +0000
To: www-dom@w3.org
Message-ID: <20031210165849.GB4308@doxdesk.com>

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.

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

> or it is clearly allowed, with indication of how the implementation may
> produce the prefix

See http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/namespaces-algorithms.html

-- 
Andrew Clover
mailto:and@doxdesk.com
http://www.doxdesk.com/
Received on Wednesday, 10 December 2003 12:17:26 GMT

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