added a function lookup framework
* xpath.c include/libxml/xpath{,Internals}.h: added a function
lookup framework
diff --git a/include/libxml/xpath.h b/include/libxml/xpath.h
index a3c925a..8d921f8 100644
--- a/include/libxml/xpath.h
+++ b/include/libxml/xpath.h
@@ -231,6 +231,10 @@
/* The function name and URI when calling a function */
const xmlChar *function;
const xmlChar *functionURI;
+
+ /* function lookup function and data */
+ void *funcLookupFunc; /* function lookup func */
+ void *funcLookupData; /* function lookup data */
};
/*
diff --git a/include/libxml/xpathInternals.h b/include/libxml/xpathInternals.h
index ca3943f..63f3609 100644
--- a/include/libxml/xpathInternals.h
+++ b/include/libxml/xpathInternals.h
@@ -320,6 +320,18 @@
void *varCtxt);
/*
+ * Function Lookup forwarding
+ */
+typedef xmlXPathFunction
+ (*xmlXPathFuncLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+void xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
+ xmlXPathFuncLookupFunc f,
+ void *funcCtxt);
+
+/*
* Error reporting
*/
void xmlXPatherror (xmlXPathParserContextPtr ctxt,