DOMImplementation.createDocumentType bug?

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 UTC