code: public void compose(StylesheetRoot sroot) throws TransformerException
    {
      super.compose(sroot);
      
      // Register the function namespace (if not already registered).
      String namespace = getName().getNamespace();
      String handlerClass = sroot.getExtensionHandlerClass();
      Object[] args ={namespace, sroot};
      ExtensionNamespaceSupport extNsSpt = 
                           new ExtensionNamespaceSupport(namespace, handlerClass, args);
      sroot.getExtensionNamespacesManager().registerExtension(extNsSpt);
      // Make sure there is a handler for the EXSLT functions namespace
      // -- for isElementAvailable().    
      if (!(namespace.equals(Constants.S_EXSLT_FUNCTIONS_URL)))
      {
        namespace = Constants.S_EXSLT_FUNCTIONS_URL;
        args = new Object[]{namespace, sroot};
        extNsSpt = new ExtensionNamespaceSupport(namespace, handlerClass, args);
        sroot.getExtensionNamespacesManager().registerExtension(extNsSpt);
      }
    }
docs: Called after everything else has been
  recomposed, and allows the function to set remaining
  values that may be based on some other property that
  depends on recomposition.