The following methods: HTMLSelectElementImpl.getOptions() HTMLTableElementImpl.getRows() HTMLFormElementImpl.getElements() HTMLMapElementImpl.getAreas() HTMLTableElementImpl.getTBodies() HTMLTableRowElementImpl.getCells() HTMLTableSectionElementImpl.getRows() appear to return the wrong cached results, if the following sequence of events occurs (HTMLSelectElementImpl is used as an example): 1) You have a variable, origSelect, to an HTMLSelectElementImpl object 2) You call origSelect.getOptions() 3) You call origSelect.cloneNode(true) and assign it to the variable clonedSelect 4) Your call to clonedSelect.getOptions() inappropriately returns the same result as a call to origSelect.getOptions(). I will be attaching patch files that I believe fix the problem by clearing the cached items upon a clonedNode, and I will also include a file called TestingSelectCloneNode.java. This appears to not be platform, OS, or JDK specific.
Created attachment 11615 [details] Reproducible Test Case Code and Patches to Fix the Problem
Just wanted to follow up with a few things. The attachment is a .tar file. I think my patch fixes the problem because it clears the cache upon a cloneNode happening. Also, thanks go to Neil Berget, also of Altona Ed, for helping to track down the problem and provide a fix.
My apologies -- I didn't realize that Jira was in place for tracking issues... I have posted the same content to an existing bug -- XERCESJ-525 available at: http://nagoya.apache.org/jira/browse/XERCESJ-525