ExtensionNSHandler nsh = null; if(null == m_extns) { m_extns = this.getNamespace(); nsh = new ExtensionNSHandler (m_extns); m_lang = nsh.scriptLang; m_srcURL = nsh.scriptSrcURL; m_scriptSrc = nsh.scriptSrc;        }
  public void execute(TransformerImpl transformer,                       Node sourceNode,                      QName mode)    throws SAXException  {    try    {      transformer.getResultTreeHandler().flushPending();            ExtensionNSHandler nsh = null;      if(null == m_extns)      {        m_extns = this.getNamespace();        nsh = new ExtensionNSHandler (m_extns);        m_lang = nsh.scriptLang;        m_srcURL = nsh.scriptSrcURL;        m_scriptSrc = nsh.scriptSrc;                // System.out.println("localName: "+this.getLocalName());        // System.out.println("m_lang: "+m_lang);        // System.out.println("m_javaClass: "+m_javaClass);        // System.out.println("m_srcURL: "+m_srcURL);        // System.out.println("m_scriptSrc: "+m_scriptSrc);        // System.out.println("m_extns: "+m_extns);      }      XPathContext liaison = ((XPathContext)transformer.getXPathContext());      ExtensionsTable etable = liaison.getExtensionsTable();      nsh = etable.get(m_extns);      if(null == nsh)      {        nsh = new ExtensionNSHandler (m_extns);        nsh.setScript (m_lang, m_srcURL, m_scriptSrc);        etable.addExtensionElementNamespace(m_extns, nsh);      }      nsh.processElement (this.getLocalName(), this,                          transformer,                           getStylesheet(),                          sourceNode.getOwnerDocument(),                           sourceNode, mode, m_javaClass, this);    }    catch(Exception e)    {      // System.out.println(e);      // e.printStackTrace();      String msg = e.getMessage();      if(null != msg)      {        if(msg.startsWith("Stopping after fatal error:"))        {          msg = msg.substring("Stopping after fatal error:".length());        }        transformer.getMsgMgr().message(XSLMessages.createMessage(XSLTErrorResources.ER_CALL_TO_EXT_FAILED, new Object[]{msg}), false); //"Call to extension element failed: "+msg);        // e.printStackTrace();        // System.exit(-1);      }      // transformer.message(msg);      isAvailable = false;       for (ElemTemplateElement child = m_firstChild; child != null; child = child.m_nextSibling)       {        if(child.getXSLToken() == Constants.ELEMNAME_FALLBACK)        {          try          {            transformer.pushElemTemplateElement(child, sourceNode);            child.execute(transformer, sourceNode, mode);          }          finally          {            transformer.popElemTemplateElement();          }        }      }    }  }