Closed binarycow closed 4 years ago
Disregard! I figured it out!
public static object CustomFunction(XPath2Context context, IContextProvider provider, object[] args)
{
throw new NotImplementedException();
}
static void Main(string[] args)
{
FunctionTable.Inst.Add("urn:my:namespace", "customFunction", XPath2ResultType.Navigator, CustomFunction, false);
var expr = XPath2Expression.Compile("customFunction()", new YangContext());
}
@binarycow See also https://github.com/StefH/XPath2.Net/tree/master/src/XPath2.Extensions
Is there a way to compile custom functions during
XPath2Expression.Compile
?