code: public void replaceTemplate(ElemTemplate v, int i) throws TransformerException
    {
  
      if (null == m_templates)
        throw new ArrayIndexOutOfBoundsException();
  
      replaceChild(v, (ElemTemplateElement)m_templates.elementAt(i));
      m_templates.setElementAt(v, i);
      v.setStylesheet(this);
    }
docs: Replace an "xsl:template" property.
  This is a hook for CompilingStylesheetHandler, to allow
  us to access a template, compile it, instantiate it,
  and replace the original with the compiled instance.
  ADDED 9/5/2000 to support compilation experiment
  
  @param v Compiled template to replace with
  @param i Index of template to be replaced
  
  @throws TransformerException