Hi Cameron, Some time ago, I submitted proposal that would allow using extension functions with XPath using org.apache.xpath.XPathAPI or org.apache.xpath.CachedXPathAPI as well as inside of Xalan. Please review this information here: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18684
As proposals are being considered and implemented in their priority order it would be helpfull if you would comment on these issues or place your vote for this proposal. Thanks, Dimitry -----Original Message----- From: Cameron McCormack [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 17, 2003 03:37 To: [EMAIL PROTECTED] Subject: Extending XPath with some functions Hi everyone. I'd like to use Xalan's XPath implementation with SVG documents loaded by Batik (which, I assume, uses Xerces). I would like, though, to have some extra functions available in the XPath expressions, which act just like the core XPath functions. I notice on this[1] page an example Java class called MyCounter. This is then used in the XSLT stylesheet with the xalan:component element. Now, since I don't have an XSLT document, just an SVG document (to which I don't want to add any extension function looking things (like xalan:component, a different namespace)) I don't know how to register a class which has extension XPath functions in it with the XPath implementation. I'm guessing it somehow needs to be given to the XPathContext that each XPath will use. But how exactly do I do that? Thanks, Cameron [1] http://xml.apache.org/xalan-j/extensions.html -- Cameron McCormack // [EMAIL PROTECTED] // http://www.csse.monash.edu.au/~clm/ // icq 26955922