I check again my examples. Surprisingly, most of them work finally, except for the ones with XML entities, i.e. "&" followed by "amp;" is not seen as "&" alone. Sorry for the wrong examples, the problem was probably somewhere else