W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Definition of malformed qualfied names

From: Martijn Pieters <mj@digicool.com>
Date: Thu, 1 Feb 2001 14:49:15 +0100
To: www-dom@w3.org
Message-ID: <20010201144914.C948@zopatista.com>
I can't find the a definition of what exactly constitutes a 'malformed
qualfied name'. Many methods of the DOM API (like
DOMImplementation.createDocument) should raise NAMESPACE_ERR if the
qualified name is malformed. There is one method 

In OSS implementations of the DOM (like Xerces), the qualfied name is
considered malformed if it contains more than one colon or if the colon is
the first or last character of the qualfied name.

I would think that would raise an INVALID_CHARACTER_ERR instead though, as
the XML Namespaces specification defines the local name and prefix parts
as the same as XML names without the colon.

I suspect that INVALID_CHARACTER_ERR only should be raised when the
qualified name is not a valid XML Name (including colons), and
NAMESPACE_ERR when the colon is misplaced or there is more than one colon.

Node.prefix should raise NAMESPACE_ERR if the prefix is malformed. Again,
when should NAMESPACE_ERR be raised, and when should INVALID_CHARACTER_ERR
be raised? A qualfied name, according to the XML Namespaces spec, should
never include a colon, so I don't see when a NAMESPACE_ERR applies.

Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
Received on Thursday, 1 February 2001 08:49:27 UTC

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