From: SourceForge.net <no...@so...> - 2010-11-24 14:59:32
|
Bugs item #3117614, was opened at 2010-11-24 05:59 Message generated for change (Tracker Item Submitted) made by martyp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=3117614&group_id=13153 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: DOM Support Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Marty Phelan (martyp) Assigned to: Nobody/Anonymous (nobody) Summary: DOM Attribute not cloned properly Initial Comment: When cloning a DOM element, the attribute(s) of the cloned element are left linked to the original element. The problem only occurs if you have first traversed the original DOM element and its attributes (forces lazy instantiation). The problem does not show itself in the jtidy.pprint method -- only in the traversal of the DOM after the clone process. When you run the attached example program, notice the attributes of the 2 h1 elements are the same objects. I was able to fix the problem by adding the following code to the org.w3c.tidy.AttVal.clone() method: if (this.adapter != null) { av.adapter = new DOMAttrImpl(av); } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=113153&aid=3117614&group_id=13153 |