The | (union operator) works... I must have gotten it slightly wrong when tried before. It was @Dimitre Novatchev's answer lead me down the right path!!
The following works:
It allows me to sort on attributes and nodes. Obviously, as long as they don't have the same name() but different values.