Is there a way to get the current xml data when we create our own XPath function (see here).
I know that you have access to XPathContext , but is that enough?
Example:
Our XML:
<foo> <bar>smang</bar> <fizz>buzz</fizz> </foo>
Our XSL:
<xsl:template match="/"> <xsl:value-of select="ourFunction()" /> </xsl:template>
How to get the whole XML tree?
Edit: To clarify: I am creating a custom function that finishes executing static Java code (this is a Saxon function). So in this Java code, I want to be able to get elements from an XML tree, such as bar and fizz, and their CDATA, for example smang and buzz.
source share