W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2011

DOMImplementation.createDocumentType bug?

From: David Flanagan <dflanagan@mozilla.com>
Date: Wed, 06 Jul 2011 13:26:43 -0700
Message-ID: <4E14C503.7040004@mozilla.com>
To: www-dom@w3.org
DOM Core says this:

The |createDocumentType(qualifiedName, publicId, systemId)| method must 
run the following steps:

> 1.
>
>     If qualifiedName does not match the |Name
>     <http://www.w3.org/TR/xml/#NT-Name>| production in XML, throw an
>     |INVALID_CHARACTER_ERR
>     <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_character_err>|
>     exception and terminate these steps.
>
> 2.
>
>     If qualifiedName does not match the |NCName
>     <http://www.w3.org/TR/xml-names/#NT-NCName>| production in
>     Namespaces in XML, throw a |NAMESPACE_ERR
>     <http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-namespace_err>|
>     exception and terminate these steps.
>
The NCName production is just an XML Name minus the colon, so the upshot 
is that if qualifiedName has a colon anywhere in it, it should throw.

That doesn't match Firefox's behavior, nor does it match ms2ger's test 
here: 
http://www.w3c-test.org/webapps/DOMCore/tests/submissions/Ms2ger/DOMImplementation-createDocumentType.html

Should it read something like this?

     1. If qname does not match the Name production, then:

      a) If qname does not match NCName, throw NAMESPACE_ERR otherwise 
throw INVALID_CHARACTER_ERR

      b) terminate these steps

     David
Received on Wednesday, 6 July 2011 20:27:12 GMT

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