XPath query to select parent based on its descendent nodeType

Hello ,

I have a content databse with several document types in them. Through an XPath query I want to select hippo:handle whose children are of a specific document type.
I did something like this and it doesnt seem to filter out the other docTypes inside my hippo:handle file.
/element(*, hippo:handle)[descendant::db:docType]

Would anyone have better suggestions ?

Thanks
Kiki

Hi,
How about just //element(*, yournamespace:yourdoctype)/.. ?
Jeroen

Alternatively, //element(*, hippo:handle)[*/@jcr:primaryType='yournamespace:yourdoctype']