The only characters that should need special treatment inside a string literal are the quote mark used as the string delimiter, and ampersand. These characters must be escaped. There's nothing special about backslash, *, etc, so I suspect that the problem is on the Java side and not the XQuery side.
Michael Kay

From: [] On Behalf Of Kofman, Irena
Sent: 05 October 2004 15:41
Subject: [saxon] spesial characters in query


If I try to compile a query that looks like:



      Query = “for $e in /*/*[string(.)='"+searchString+"'] order by string($e) return $e”;

      XQueryExpression exp = xquery.compileQuery(Query);


And searchString contains characters like ‘,\,* and some more, I get exceptions.

What can I do about it?

      Thank you