problem with null namespace for local attributes in importNode (DOM level 2) 2003-01-23 - By Aleksandar Milanovic
Hi,
Eventually I found an error in the method
AttrNSImpl.setName(String namespaceURI, String qname)
However, I am not sure if this has been fixed since 2.2.1. The error is that the namespace string was interned, but then the original namespace string used instead of the interned ones. This led to erros in subsequent string comparisons using ==.
I've never submitted a bug fix before. Since this is really a small one, is there somebody out there who'd be willing to do this for me? I'd provide the fixed source file.
thx Alex
> -----Original Message----- > From: Aleksandar Milanovic [mailto:amilanovic@(protected)] > Sent: Thursday, January 23, 2003 3:10 PM > To: xerces-j-user@(protected) > Subject: RE: problem with null namespace for local attributes in > importNode (DOM level 2) > > > 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) > > >
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|