The reason there's no way to install an external function in the C API is
that we assume you're using the C language.  Thus, there would be no way
for you to write an extension function, since that requires using C++.  If
you look at the APIs, you will see that there is no use of classes, or any
other C++ language features.

If you're using C++, you might want to just use the XalanTransformer class.
That's a bit more efficient than the C API, and much more flexible.

Dave



                                                                                       
                         
                      Nouguier Olivier                                                 
                         
                      <olivier.nouguier@         To:      [EMAIL PROTECTED]     
                         
                      wanadoo.fr>                cc:      [EMAIL PROTECTED], 
(bcc: David N            
                                                 Bertoni/Cambridge/IBM)                
                         
                      03/05/2002 05:31           Subject: InstallExternalFunction in 
XalanCAPI                  
                      PM                                                               
                         
                      Please respond to                                                
                         
                      xalan-dev                                                        
                         
                                                                                       
                         
                                                                                       
                         



hi all,
             I was disapointed to see that there was not way to Install an
external
function with XalanCAPI. So I try to add the "wrapper" in the header
file and implementation

## XalanTransformer/XalanCAPI.h
XALAN_TRANSFORMER_EXPORT_FUNCTION(void)
        XalanInstallExternalFunction(XalanHandle theXalanHandle, const
char*, const char *, const Function& );
## XalanTransformer/XalanCAPI.cpp
XALAN_TRANSFORMER_EXPORT_FUNCTION(void)
XalanInstallExternalFunction(XalanHandle theXalanHandle, const char
*theNameSpace, const char *theFunctionName, const Function& theFunction
)
{
        getTransformer(theXalanHandle)->installExternalFunction(
XalanDOMString(theNameSpace), XalanDOMString( theFunctionName ),
theFunction );
}
##
And now it works in my apache xslt module. So I was wondering was this
function was not in XalanCAPI ( idem for uninstall ).

Sorry for my bad english, many thanks for xalan.








Reply via email to