Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.9.0
-
None
Description
If DOMImplementation.createDocument() is called with a null namespaceURI and qualifiedName it's supposed to return an empty Document (i.e. one with no document element). This doesn't work with a few of the DOM implementations, specifically CoreDOMImplementationImpl and PSVIDOMImplementationImpl:
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at org.apache.xerces.dom.ElementNSImpl.setName(ElementNSImpl.java:106)
at org.apache.xerces.dom.ElementNSImpl.<init>(ElementNSImpl.java:81)
at org.apache.xerces.dom.CoreDocumentImpl.createElementNS(CoreDocumentImpl.java:2091)
at org.apache.xerces.dom.CoreDOMImplementationImpl.createDocument(CoreDOMImplementationImpl.java:289)
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
at org.apache.xerces.dom.ElementNSImpl.setName(ElementNSImpl.java:106)
at org.apache.xerces.dom.ElementNSImpl.<init>(ElementNSImpl.java:81)
at org.apache.xerces.dom.PSVIElementNSImpl.<init>(PSVIElementNSImpl.java:55)
at org.apache.xerces.dom.PSVIDocumentImpl.createElementNS(PSVIDocumentImpl.java:97)
at org.apache.xerces.dom.PSVIDOMImplementationImpl.createDocument(PSVIDOMImplementationImpl.java:116)