( FOR $s IN document("census.xml")//person[name = "Dave"]/@spouse-> , $sp IN $s/.. | $s/../@spouse-> RETURN shallow($sp) )