code: public void endElement(
            StylesheetHandler handler, String uri, String localName, String rawName)
              throws SAXException
    {
     ElemTemplateElement function = handler.getElemTemplateElement();
     validate(function, handler); // may throw exception
     super.endElement(handler, uri, localName, rawName);   
    }
docs: End an ElemExsltFunction, and verify its validity.