code: public boolean functionAvailable(String ns, String funcName)
            throws javax.xml.transform.TransformerException {
        try {
          if ( funcName == null ) {
              String fmsg = XSLMessages.createXPATHMessage( 
                  XPATHErrorResources.ER_ARG_CANNOT_BE_NULL,
                  new Object[] {"Function Name"} );
              throw new NullPointerException ( fmsg ); 
          }
          //Find the XPathFunction corresponding to namespace and funcName
          javax.xml.namespace.QName myQName = new QName( ns, funcName );
          javax.xml.xpath.XPathFunction xpathFunction = 
              resolver.resolveFunction ( myQName, 0 );
          if (  xpathFunction == null ) {
              return false;
          }
          return true;
        } catch ( Exception e ) {
          return false;
        }
         
  
      }
docs: Is the extension function available?