// create an instance of a synapse:get-property() function and set it to the xpath
GetPropertyFunction getPropertyFunc = new GetPropertyFunction();
getPropertyFunc.setSynCtx(synCtx);
// set function context into XPath
SimpleFunctionContext fc = new XPathFunctionContext();
fc.registerFunction(SynapseConstants.SYNAPSE_NAMESPACE, "get-property", getPropertyFunc);
fc.registerFunction(null, "get-property", getPropertyFunc);
xpath.setFunctionContext(fc);
// register namespace for XPath extension function
xpath.addNamespace("synapse", SynapseConstants.SYNAPSE_NAMESPACE);
xpath.addNamespace("syn", SynapseConstants.SYNAPSE_NAMESPACE);