code: public void startElement(
            StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes)
              throws org.xml.sax.SAXException
    {
  
      super.startElement(handler, uri, localName, rawName, attributes);
      try
      {
        // ElemTemplateElement parent = handler.getElemTemplateElement();
        XSLTElementDef def = getElemDef();
        Class classObject = def.getClassObject();
        ElemTemplateElement elem = null;
  
        try
        {
          elem = (ElemTemplateElement) classObject.newInstance();
  
          elem.setDOMBackPointer(handler.getOriginatingNode());
          elem.setLocaterInfo(handler.getLocator());
          elem.setPrefixes(handler.getNamespaceSupport());
        }
        catch (InstantiationException ie)
        {
          handler.error(XSLTErrorResources.ER_FAILED_CREATING_ELEMTMPL, null, ie);//"Failed creating ElemTemplateElement instance!", ie);
        }
        catch (IllegalAccessException iae)
        {
          handler.error(XSLTErrorResources.ER_FAILED_CREATING_ELEMTMPL, null, iae);//"Failed creating ElemTemplateElement instance!", iae);
        }
  
        setPropertiesFromAttributes(handler, rawName, attributes, elem);
        appendAndPush(handler, elem);
      }
      catch(TransformerException te)
      {
        throw new org.xml.sax.SAXException(te);
      }
    }
docs: Receive notification of the start of an element.
  
  @param handler non-null reference to current StylesheetHandler that is constructing the Templates.
  @param uri The Namespace URI, or an empty string.
  @param localName The local name (without prefix), or empty string if not namespace processing.
  @param rawName The qualified name (with prefix).
  @param attributes The specified or defaulted attributes.