Regarding your question:
The answer to the question is Yes. The query() method expects a string, so you may put everything between the brackets, which evaluates to a String.
However, I’m not sure if that is what you wanted to know. You did not explain, what you want to achieve with the given sample code. What is “str interect str1”?
#webMethods-Tamino-XML-Server-APIs#webMethods#API-Management