Hi List,

I have a problem with escaping a velocity expression inside a xml
declaration. The velocity expression is a method call with an sql string
as parameter. The sql (postgresql) query string contains concatenation. If I do it the following way:

<param possibleValues="$sdb.getCSV(&quot;select &quot;id&quot; || '|' ||
&quot;Vorname&quot; from lq_master_data&quot;)"/>

I get an exception from the velocity parser because of the multiple
double quotes inside the method parameter.


If I try now to escape the double quotes inside the sql query:

<param possibleValues="$sdb.getCSV(&quot;select \&quot;id\&quot; || '|'
|| \&quot;Vorname\&quot; from lq_master_data&quot;)"/>

I get an sql exception because of the backslash directly before the
quote:

select \"id\"||'|'||\"Vorname\" from lq_master_data

So, velocity understood the escaping of the double quote, but the backslash is not removed. I have no more idea, what to do else.

Can anybody help me out?

Kind regards
Hans


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to