Join
(a:child(/DB1/Customer)) ?[value(a/@cid)=value(b/@customerid)] (b: child(/DB2/Customer))
returns collection of reference edges from customer elements of DB1 to customer elements of DB2 for which cid attribute value is equal to customerid attribute
(a:collection)?[condition(a,b)](b:collection)
introduces virtual reference edges between element vertices