> -----Original Message-----
> From: Sam Ruby [mailto:[EMAIL PROTECTED]]
> It looks like putting xerces.jar in the front of the
> classpath does the trick.
> The reason why I am fairly confident about this is that if
> xerces is not in
> the classpath, gen.java fails due to an exception in crimson.
> For those
> curious, the problem is in the following line:
>
> Element copy=(Element)doc.importNode(sub.getFirstChild(), true);
>
> The exception indicates that the child does not belong to
> this document.
> Of course, that's exactly why I was calling importNode in the
> first place!
eh ? this pretty much interests me since I have hundred of importNode in a
code I'm using and crimson is the xml parser.
Thanks for mentioning it. Chance is that I'm using importNode on all but
Document.
I checked the code of XmlDocument and the one in the JDK 1.4 is different,
apparently Edwin fixed the bug 2 months ago.
revision 1.7
date: 2001/03/19 23:39:35; author: edwingo; state: Exp; lines: +5 -2
Fix Document.importNode() causes WRONG_DOCUMENT_ERR for deep copies
Crimson XmlDocument (from JAXP1.1)
case ELEMENT_NODE:
// XXX Fix copying of defaulted attributes
node = importedNode.cloneNode(deep);
break;
Crimson XmlDocument( from JDK 1.4 and in CVS )
case ELEMENT_NODE:
node = ((ElementNode2)
importedNode).createCopyForImportNode(deep);
break;
In any case, thanks a lot for mentioning this bug !
--
St�phane Bailliez
Software Engineer, Paris - France
iMediation - http://www.imediation.com
Disclaimer: All the opinions expressed above are mine and not those from my
company.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]