Isn't there a contains() function in XPath 2.0?
There may be - to my shame I haven't read the spec in detail.
In Tamino's xpath-1.0-like query language they use ~= for a fulltext "contains", as in /document/section[objective~="develop"] (find all document sections whose objective contains the word "develop"). I'm not suggesting you copy Tamino extensions to xpath, but FWIW theirs works quite well in practice.
That's the sort of thing I'm after I think. I'll have a proper read of the XPath 2.0 spec and come back with suggestions, thanks.
-- Andy Armstrong, Tagish