I am trying to find a way to search for a string within nodes, but excluding ythe content of some subelements of those nodes. Plain and simple, I want to search for a string in
//p[(.//text() except .//footnote//text())[contains(., 'text')]]