Bugs item #1077692, was opened at 2004-12-02 17:20 Message generated for change (Comment added) made by maartenc You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1077692&group_id=16035
Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Nobody/Anonymous (nobody) >Assigned to: Maarten Coene (maartenc) Summary: No fireRule() for Node Initial Comment: The last change to support the attribute mode for applyTemplates, breaks the recursion of fire rule. Solution: public void applyTemplates(Object input, String mode) throws Exception { // iterate through all children Mode mod = ruleManager.getMode(mode); if ( input instanceof Element ) { mod.applyTemplates( (Element) input ); } else if ( input instanceof Document ) { mod.applyTemplates( (Document) input ); } else if ( input instanceof List ) { List list = (List) input; for ( int i = 0, size = list.size(); i < size; i++ ) { Object object = list.get(i); if ( object != input ) { // FIX: if(object instanceof Node) { run((Node) object); } if ( object instanceof Element ) { mod.applyTemplates( (Element) object ); } else if ( object instanceof Document ) { mod.applyTemplates( (Document) object ); } } } } } ---------------------------------------------------------------------- >Comment By: Maarten Coene (maartenc) Date: 2005-01-30 12:49 Message: Logged In: YES user_id=178745 Hi, I don't think the problem was the applyTemplates(Object, String) method. There was a bug however in the other applyTemplates methods which has been corrected now. If you still have problems, please reopen this bug or create a new one... thanks, Maarten ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-12-07 12:13 Message: Logged In: NO We need to work out a junit test for this... Maarten ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2004-12-03 09:37 Message: Logged In: NO Sorry for my bad english ;-). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=1077692&group_id=16035 ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev