problem with null namespace for local attributes in importNode (DOM level 2) 2003-01-23 - By Aleksandar Milanovic
False alarm. It seems that the namespace URI is null despite the existence of a prefix. Not sure why though. Will investigate :). Alex
> -----Original Message----- > From: Aleksandar Milanovic [mailto:amilanovic@(protected)] > Sent: Thursday, January 23, 2003 2:59 PM > To: Xerces-J-User > Subject: problem with null namespace for local attributes in importNode > (DOM level 2) > > > Hi, > > I have a document created using another DOM-compliant parser, > which I import > into a Xerces 2.2.1 document. The import fails on the first attribute, > because its namespace is null. This shouldn't be a problem though because > the original document was parsed with namespaces enabled and the attribute > in question is local. > > I looked into checkDOMNSErr() code, and it seems that it fails because the > namespace is null. However, it is perfectly normal for local attributes to > have null namespace in DOM level 2 documents. The stack trace is below. > > NAMESPACE_ERR: An attempt is made to create or change an object in a way > which is incorrect with regard to namespaces. > 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) > at org.apache.xerces.dom.AttrNSImpl.<init>(Unknown Source) > at > org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(Unknown Source) > at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) > at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) > at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) > > Any help would be appreciated. > > thx > Alex > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) > For additional commands, e-mail: xerces-j-user-help@(protected) > > >
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|