Re: Cross DOM implementation node importing fails for attributes in the xml (http://www.w3.org/XML/1998/namespace) namespace
"Natalia Shilenkova" <[email protected]>
| Newsgroups | gmane.text.xml.xindice.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the patch, had problem code located in no time. This is now fixed in trunk. Regards, Natalia On Thu, Feb 28, 2008 at 7:31 AM, Geoff Shuetrim <[email protected]> wrote: > I have been trying to import nodes from a Xindice DOM (produced from an > XMLResource retrieved from the Xindice Database) into a DOM created with > the Xerces parser. > > This works well until I include attributes in the xml > (http://www.w3.org/XML/1998/namespace) namespace (eg xml:lang) but do > not explicitly declare the mapping from that namespace to the xml prefix > using an xmlns:xml="http://www.w3.org/XML/1998/namespace". > > When I do include such attributes, I get the error message: > > 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.CoreDocumentImpl.checkDOMNSErr(Unknown Source) > at org.apache.xerces.dom.AttrNSImpl.setName(Unknown Source) > ... > > I have attached a patch to the version of the Xindice code base that I > checked out of SVN this morning that includes a new unit test that shows > this behaviour. > > Regards > > Geoff Shuetrim >