Agreed. Definitely a getChildNodes() bug. We implemented a deep copy using getFirstChild/getNextSibling and are up and running. We still needed to include "conditional logic" based on whether we were using Xalan 2.1 or 2.2 due to the fact that node lists passed to extensions in 2.2 include an "imaginary" document node, whereas pre-2.2 did not include this extra level.
- Rick -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 13, 2001 12:21 PM To: [EMAIL PROTECTED] Subject: RE: Xalan D13/Extension Function Issue? DTM getChildNodes bug? There does seem to be a glitch here. When I add the lines NodeList nl1=nl.item(0).getChildNodes(); for(int i=0;i<nl1.getLength();++i) System.out.println(nl1.item(i).getNodeName()+" = " +nl1.item(i).getNodeValue()); to your extension, it's printing out the "A" node. When I modify the first line to NodeList nl1=nl.item(0).getFirstChild.getChildNodes(); it's printing out the #text node which is "B"'s child. Not right. I suspect the bug is in getChildNodes(), which is relatively new code. You might want to try getFirstChild()/getNextSibling() as an alternative -- usually more efficient anyway -- and see if that works better for you. Suppose I should log this into Bugzilla as well...
