@@ -49,6 +49,11 @@ public class XpathExtensionUtil {
4949 */
5050 private static final String SYNAPSE_XPATH_FUNCTION_EXTENSIONS = "synapse.xpath.func.extensions" ;
5151
52+ /**
53+ * The Synapse property for custom xpath function extensions.
54+ */
55+ private static final String SYNAPSE_CUSTOM_XPATH_FUNCTION_EXTENSIONS = "synapse.custom.xpath.func.extensions" ;
56+
5257 private static final Log log = LogFactory .getLog (XpathExtensionUtil .class );
5358
5459 /**
@@ -94,16 +99,22 @@ public static List<SynapseXpathVariableResolver> getRegisteredVariableExtensions
9499
95100 /**
96101 * Get all registered function context extensions. Synapse will look for synapse.properties
97- * property synapse.xpath.func.extensions
102+ * property synapse.xpath.func.extensions and synapse.custom.xpath.func.extensions.
98103 *
99104 * @return List of Synapse Xpath Function Context Providers
100105 */
101106 public static List <SynapseXpathFunctionContextProvider > getRegisteredFunctionExtensions () {
102107 Properties synapseProps = SynapsePropertiesLoader .loadSynapseProperties ();
103- String propValue = synapseProps .getProperty (SYNAPSE_XPATH_FUNCTION_EXTENSIONS );
104- List <SynapseXpathFunctionContextProvider > extProviders = new
105- ArrayList <SynapseXpathFunctionContextProvider >();
106- extractProviders (propValue , extProviders );
108+ List <SynapseXpathFunctionContextProvider > extProviders = new ArrayList <SynapseXpathFunctionContextProvider >();
109+
110+ // Load default function extensions
111+ String synapseXPathFunctionExtensionsPropValue = synapseProps .getProperty (SYNAPSE_XPATH_FUNCTION_EXTENSIONS );
112+ extractProviders (synapseXPathFunctionExtensionsPropValue , extProviders );
113+
114+ // Load custom function extensions
115+ String synapseCustomXPathFunctionExtensionsPropValue =
116+ synapseProps .getProperty (SYNAPSE_CUSTOM_XPATH_FUNCTION_EXTENSIONS );
117+ extractProviders (synapseCustomXPathFunctionExtensionsPropValue , extProviders );
107118 return extProviders ;
108119 }
109120
0 commit comments