package org.madore.damlengine; import java.util.ArrayList; import org.w3c.dom.*; public final class TodoKillAElement extends TodoDefaultElement { public static class Factory extends TodoElement.Factory { @Override public TodoKillAElement newItem(Element node, Context ctx, TodoItem caller) { return new TodoKillAElement(node, ctx, caller); } } public TodoKillAElement(Element node, Context ctx, TodoItem caller) { super(node, ctx, caller); } @Override public void handleNodeOnly() { String explicitLang = LangHelper.getLangNorec(this.node); ArrayList childList = getChildList(node); ArrayList toProcess = new ArrayList(childList.size()); for ( Node child : childList ) { node.getParentNode().insertBefore(child, node); if ( child.getNodeType() == Node.ELEMENT_NODE ) { if ( explicitLang != null ) LangHelper.setWeakLangNorec((Element)child, explicitLang); TodoElement it = TodoElement.getTodoElement((Element)child, this.ctx, this); toProcess.add(it); } } node.getParentNode().removeChild(node); this.ownerDeque.registerAtStart(toProcess); } }