- From: David Flanagan <dflanagan@mozilla.com>
- Date: Wed, 06 Jul 2011 13:36:18 -0700
- To: www-dom@w3.org
- Message-ID: <4E14C742.7050507@mozilla.com>
On 7/6/11 1:26 PM, David Flanagan wrote: > > 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 > My suggestion above doesn't actually make much sense. More likely, the fix is to change NCName in step 2 to QName. Is that what was intended? David
Received on Wednesday, 6 July 2011 20:36:46 UTC