code: public Object extFunction(FuncExtFunction extFunction,
                                Vector argVec)
          throws javax.xml.transform.TransformerException {
          try {
              String namespace = extFunction.getNamespace();
              String functionName = extFunction.getFunctionName();
              int arity = extFunction.getArgCount();
              javax.xml.namespace.QName myQName = 
                  new javax.xml.namespace.QName( namespace, functionName );
  
              // JAXP 1.3 spec says  When XMLConstants.FEATURE_SECURE_PROCESSING
              // feature is set then invocation of extension functions need to
              // throw XPathFunctionException
              if ( extensionInvocationDisabled ) {
                  String fmsg = XSLMessages.createXPATHMessage(
                      XPATHErrorResources.ER_EXTENSION_FUNCTION_CANNOT_BE_INVOKED,                    new Object[] { myQName.toString() } );
                  throw new XPathFunctionException ( fmsg );
              }
  
              XPathFunction xpathFunction = 
                  resolver.resolveFunction( myQName, arity );
  
              ArrayList argList = new ArrayList( arity);
              for ( int i=0; i<arity; i++ ) {
                  Object argument = argVec.elementAt( i );
                  // XNodeSet object() returns NodeVector and not NodeList
                  // Explicitly getting NodeList by using nodelist()
                  if ( argument instanceof XNodeSet ) {
                      argList.add ( i, ((XNodeSet)argument).nodelist() );
                  } else if ( argument instanceof XObject ) {
                      Object passedArgument = ((XObject)argument).object();
                      argList.add ( i, passedArgument );
                  } else {
                      argList.add ( i, argument );
                  }
              }
         
              return ( xpathFunction.evaluate ( argList ));
  
          } catch ( XPathFunctionException xfe ) {
              // If we get XPathFunctionException then we want to terminate 
              // further execution by throwing WrappedRuntimeException
              throw new org.apache.xml.utils.WrappedRuntimeException ( xfe );
          } catch ( Exception e ) {
              throw new javax.xml.transform.TransformerException ( e );
          }
      }
docs: Execute the extension function.