Re: New feature : extensions functions in Xpath (not only xslt)

Jonas Sicking <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <PY-dnRDeOpe8Y9fUnZ2dnUVZ_u-dnZ2d__7675.71513210914$1229651830$gmane$org@mozilla.org>
Sylvain Spinelli wrote:
> Hi,
> 
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.