Hello Vyom,
this is quite straightforward: use the “collection” function to return documents from another collection.
You have probably seen a lot of example queries which use the “input” function to specify a set of documents in Tamino… The “collection” function can be used in the same way - the only difference is that “collection” takes a parameter: the name of the collection to read the documents from.
So, if you have established a connection to “MyColl_A” in your program, the following XQuery would return [all of the] documents from “MyColl_Z”:
for $others in collection("MyColl_Z")
return $others
You can filter the set of documents in the same ways as with the “input” function: putting a path expression after the function, e.g. collection(“MyColl_Z”)/MyDoc[@id=“007”], or with a WHERE clause.
I hope that helps.
Trevor.
#webMethods#API-Management#webMethods-Tamino-XML-Server-APIs