Hi Ishara, This worked for me, expression="fn:concat(*"*This is*'"*, *"*my function *"*)"
First, we are surrounding the strings with double quotes and then insert the apostrophe (not sure if this is same as the single quote mark). Thanks, Ishan. On Wed, Jun 25, 2014 at 9:35 AM, Ishara Premadasa <[email protected]> wrote: > Hi all, > > I need to use a string which contains apostrophe character ( ' ) with > fn:concat function. Tried with the below ways and none seems to be working. > > 1. <property name="myProp" > expression="fn:concat(' This is'', ' my function')" > scope="default" > type="STRING"/> > > This got saved and changed to fn:concat(' This is&apos;', ' my > function') internally however when the output is logged it is like ' this > is &apos my function'. > > 2. I then enabled XPath 2.0 in synapse.properties and tried with below as > per 2.0 spec [1]. > <property name="myProp" > expression="fn:concat('this is''', ' name')" > scope="default" > type="STRING"/> > > This didn't get saved and throws invalid xpath expression error. Tried in > both admin console and Dev studio but any method was not able to get the > apostrophe character appear. I am using ESB 4.8.1 in Windows 7, JDK 1.7_60. > > Thanks! > Ishara > > [1] http://www.w3.org/TR/xpath20/#doc-xpath-EscapeApos > > -- > Ishara Premasada > Software Engineer, > WSO2 Inc. http://wso2.com/ > > > *Blog : http://isharapremadasa.blogspot.com/ > <http://isharapremadasa.blogspot.com/> Twitter : > https://twitter.com/ishadil <https://twitter.com/ishadil>Mobile : +94 > 714445832 <%2B94%20714445832>* > > > -- Ishan Jayawardena Senior Software Engineer Mobile: +94 (77) 408 2330
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
