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

Sylvain Spinelli <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Organization http://groups.google.com
Message-ID <aab9d6de-b0b6-4bfe-b282-4f4a5c2ac251__4083.90965681082$1229595108$gmane$org@a37g2000pre.googlegroups.com>
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 ?
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.