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&apos;', ' my function')"
                   scope="default"
                   type="STRING"/>

This got saved and changed to fn:concat(' This is&amp;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*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to