Did you stumble on bigger numbers of binding sequences for which you would like to join some information?
Generally the pattern for that is:
1 process each XPath expression into a sequence of maps; ideally there's a common function you pass a sequence of nodes, but …
Where did you mention join conditions for selected record sets in your approach for an algorithm description?
Regards, Markus