Hi All,

I am validating the Xpath 2.0 functions support in ESB ( please refer [1])
and I am using below configuration in defining 'avg' function (Referred
[2]), but it seems I am using the wrong syntax.

  <property xmlns:fn="http://www.w3.org/2005/xpath-functions";
                      xmlns:test="http://test";
                      xmlns:ns="http://org.apache.synapse/xsd";
                      name="testValue"
                    *  expression="fn:avg((3,4,5))"/>*

Can someone please point the correct syntax?

Since avg function requires a single parameter, is there a way to define
the integer values externally ( may be using a property mediator ) and use
it inside the function ?

If this syntax is correct, is this function not supported in ESB?

Really appreciate your input on this

FYI: When saving the proxy, I'm getting below exception:

[2016-08-01 11:41:11,718] ERROR - ProxyServiceAdmin Unable to save changes
made for the proxy service : testProxy. Restored the existing proxy... ::
Invalid XPapth expression : fn:avg((3,4,5))
org.apache.synapse.SynapseException: Invalid XPapth expression :
fn:avg((3,4,5))
at
org.apache.synapse.config.xml.MediatorPropertyFactory.getMediatorProperties(MediatorPropertyFactory.java:106)
at
org.apache.synapse.config.xml.LogMediatorFactory.createSpecificMediator(LogMediatorFactory.java:111)
.......



[1] Xpath 2.0.0 functions supported by ESB
[2] https://www.w3.org/TR/xpath-functions/#func-avg
Sohani Weerasinghe
Senior Software Engineer
WSO2, Inc: http://wso2.com

Mobile  : +94 716439774
Blog     :http://christinetechtips.blogspot.com/
Twitter  : https://twitter.com/sohanichristine
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to