Am 20.08.2010 um 11:43 schrieb Leonard Wörteler:

Hi Godmar,

Am 19.08.2010 14:13, schrieb Godmar Back:

   Most probably the XQJ binding handled this escaping automatically,
   perhaps a team member with more expertise in XQJ could address this.


Alright, I suppose I have to consult your XQJ code because in order to
avoid it I have to reimplement it.

Wouldn't be the simplest solution to your problem to replace the
characters '{' and '}' in the serialized XML string with their character
entities ("{" and "}" respectively)? I can't think of
situations when it would destroy the markup and the parsing process
converts them back either way.
Small addendum to my last mail, Christian pointed me on setting serialization parameters on the fly:
 declare option output:cdata-section-elements "c-code";
<c-code>abc</c-code>
returns 
<c-code><![CDATA[abc]]></c-code>
this might help your case if you know in advance which tags' contents contain {}

Hope this helps.

Michael