I tried for a while to do both with a single xpath but kept getting 'invalid predicate' errors