Posted by raoulb2000
on October 24, 2007 at 3:25 AM PDT
I'm writing my own XSLT extension which in the end should look like this : (that's an example). My problem is that I want the "xpath expression" to be evaluated in the current context. It could contain xsl function calls, reference to previously defined variables, etc .. to make it short, it should be evaluated the same way XSL actually evaluates .
I have no problem using xsl function. In my extension class, when it's time to evaluate de xpath expression I do :
..but It's not so easy for variables, because I don't know how to access to a XPathVariableResolver. Do I have to write one ? ... can I use the one currently used by the XSL processor (the one currently processing my xsl) ? I have access to a VariableStack objects ..I'm not sure about what to do and there may be something I don't understand (obvisouly ;).
So if anyone have an idea or maybe just send me a link to some piece of code I could use to understand better how this works, that would be great because right now (after a lot of search) I'm stuck.