Join two collections

I would like to join two collections in my java api code. From my understanding when using TQuery.newInstance(query), your query uses the X-Query language. I was hoping to join from two different collections but all I am finding is the capability to join to documents in one collection unfortunately using XQuery and not X-Query.

Any ideas how I can solve this?

Use TXQuery.newInstance(query) and the XQuery language.

Seriously, XQuery is the way to go for all new development. X-Query is a relic of the past development of Tamino, and its use should be deprecated.