Nesting predicates

//section[.//h1[@id='hi']]

This returns <section> if it has an <h1> descendant with id='hi'.

Comments