Let we have XML looks like that
<bookshelf>
<cathegory name = "Programming" />
<book name = "Tille 1" >
<author>....</author>
</book>
<book name = "Tille 2" >
<author>....</author>
<translator></translator>
</book>
<book name = "Tille 3" >
<author>....</author>
<translator>John D.</translator> <!-- non-empty nodes are acceptred! -->
</book>
</bookshelf>
How can we select bookshelves which have cathegory node with name attribute and at least one book with non-empty translator node?
Basic XPath tutorials do not provide so complicated examples.