transformer.getResultTreeHandler().endElement("", "",
DOMHelper dhelper = transformer.getXPathContext().getDOMHelper(); String ns = dhelper.getNamespaceOfNode(sourceNode); String localName = dhelper.getLocalNameOfNode(sourceNode); transformer.getResultTreeHandler().endElement(ns, localName,
  public void execute(          TransformerImpl transformer, Node sourceNode, QName mode)            throws TransformerException  {    try    {      short nodeType = sourceNode.getNodeType();      if ((Node.DOCUMENT_NODE != nodeType))      {        ResultTreeHandler rthandler = transformer.getResultTreeHandler();        // TODO: Process the use-attribute-sets stuff        rthandler.cloneToResultTree(sourceNode, false);        if (Node.ELEMENT_NODE == nodeType)        {          super.execute(transformer, sourceNode, mode);          rthandler.processNSDecls(sourceNode);          transformer.executeChildTemplates(this, sourceNode, mode);          transformer.getResultTreeHandler().endElement("", "",                                                        sourceNode.getNodeName());        }        else        {          if (TransformerImpl.S_DEBUG)            transformer.getTraceManager().fireTraceEvent(sourceNode, mode,                                                         this);        }      }      else      {        if (TransformerImpl.S_DEBUG)          transformer.getTraceManager().fireTraceEvent(sourceNode, mode, this);        super.execute(transformer, sourceNode, mode);        transformer.executeChildTemplates(this, sourceNode, mode);      }    }    catch(org.xml.sax.SAXException se)    {      throw new TransformerException(se);    }  }