Marco S.
Marco S.

Reputation: 551

How to escape apostrophe in WSO2 property XPath expression

My problem is to quote the values obtained from get-property('cf') in <property expression="fn:concat(get-property('whereConcat'),' AND PA_INATO=', get-property('cf'))" name="whereConcat" scope="default" type="STRING"/>

I have tried in different ways(character encoding:&apos;, character escape: \') but without success.

Upvotes: 2

Views: 2206

Answers (1)

P. Buccigrossi
P. Buccigrossi

Reputation: 121

the cleanest way is to define a constant:

<property name="apos" scope="default" type="STRING" value="'"/>

and then use it as follow:

<property expression="fn:concat(get-property('whereConcat'),' AND PA_INATO=',get-property('apos'), get-property('cf'),get-property('apos'))" name="whereConcat" scope="default" type="STRING"/>

Upvotes: 5

Related Questions