Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

3 views
Skip to first unread message

Sylvain Spinelli

unread,
Dec 18, 2008, 5:09:16 AM12/18/08
to
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 ?

Jonas Sicking

unread,
Dec 18, 2008, 8:51:24 PM12/18/08
to

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

Sylvain Spinelli

unread,
Dec 19, 2008, 2:10:09 AM12/19/08
to
Ok, thanks for this reply.

Just one precision: my needs would be to add my own custom extension
functions, not only "standard" exlt.

Sylvain

0 new messages