[xmljs-users] Namespace validation question
Brought to you by:
djoham,
witchhunter
From: Ilya B. <il...@dr...> - 2009-04-06 17:20:30
|
Hello, In DOMDocument.prototype._isValidNamespace (xmlw3cdom.js) on line 2928, there is a check for the "xml" prefix: if ((valid) && (qName.prefix == "xml") && (namespaceURI != "http://www.w3.org/XML/1998/namespace")) { ... Why does the namespaceURI have to be set to "http://www.w3.org/XML/1998/namespace" if the prefix is "xml"? This fails to validate the namespace for the xml:lang attribute in something like the following, which to me looks perfectly valid: <body xmlns='http://jabber.org/protocol/httpbind'> <iq id="set_1" to="us...@se.../res" type="error" from="us...@se.../res"> <tag1 xmlns="my:namespace"> <tag2> <tag3 name="asfsafsf"/> </tag2> </tag1> <error code="502" type="CANCEL"> <remote-server-error xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/> <text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" xml:lang="en"/> </error> </iq> </body> Doesn't the "xml" prefix by definition mean that "lang" is in the "http://www.w3.org/XML/1998/namespace" namespace? Thanks, Ilya |