Since extension-element-prefixes="..." is not needed in the stylesheet
root element for using xpath extensions functions in a xslt, it should
be a very nice feature to make available extensions functions in Xpath
compiler too.
Simple example that should work :
var vResolver = {
lookupNamespaceURI : function(pPrefix) {
if(pPrefix=="regexp") return "http://exslt.org/regular-
expressions";
return null;
}
}
var vXpath = document.createExpression("regexp:replace('test', 't',
'g', 'X')", vResolver);
What do you think ?
Indeed, it would be great to make exslt functions available to DOM-XPath
as well. The only reason that hasn't happened has been lack of time.
/ Jonas
Just one precision: my needs would be to add my own custom extension
functions, not only "standard" exlt.
Sylvain