x-query with join from different collections

Hi
I wanted to make a tamino x-query with a join with data from different collections.
how and where i can set the collection?
or isnt it possible to do so?

example:
for $x in input()/Order[OrderNo=“0000000994”],
$y in input()/Branch
where $x/BuyerBranchGID = $y/@GID
return

{ $b/@GID }
{ $b/BranchILN }

Order is in collection: MLSSyncSupplier
Branch is in collection: MLSSyncGlobal

you can use the collection() function:


for $x in collection("MLSSyncSupplier")/Order[OrderNo="0000000994"],
$y in collection("MLSSyncGlobal")/Branch
where $x/BuyerBranchGID = $y/@GID
return
<Result>
{ $b/@GID }
{ $b/BranchILN }
</Result>

Best regards

Harald