>>315

(descendant::c[. = 'foo0']/ancestor::*[./descendant::c[. = 'bar1']])[last()]/@id