Hi Rob,

Yes, you can install functions globally and make them available.  See:

   XPathEnvSupportDefault::installExternalFunctionGlobal()

You should be careful doing this if you are also using the XSLT subsystem.
Another way to make the standard Xalan and EXSLT extension functions
available is to also call XalanTransformer::initialize().  This will
initialize more than you really need, but the overhead is not that great.

You will need to implement an appropriate PrefixResolver derivative that
knows how to map the prefix "xalan" to the correct namespace.

We could consider an enhancement to make some of the Xalan and EXSLT
extension functions available in XPathEvaluator.  If you want, file a
Bugzilla request.

Dave



                                                                                
                                                  
                      "Bielik, Robert"                                          
                                                  
                      <[EMAIL PROTECTED]         To:      
<[email protected]>                                            
                      yros.com>                cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                      
                                               Subject: Functions in 
XPathEvaluator                                               
                      05/11/2003 10:58                                          
                                                  
                      PM                                                        
                                                  
                                                                                
                                                  



Is there a simple way to make use of the Xalan extension functions within
XPath
evaluations (i.e. not in XSL transformation) ?

That is, something like:

XPathEvaluator evaluator;
const XObjectPtr result = evaluator.evaluate(DOMSupport, contextNode,
L"xalan:distinct('elements/@value')");

Or is it necessary to run in by XalanTransformer ??

TIA
/Rob


Reply via email to