This was once posted on a Oracle OTN XMLDB forum; and though I thought it was easy, it wasn’t at all. It took me some sweat and I learned more about XPath than I had done so far and the (in)possibilities of using XPath within an Oracle database… All in all it was a good exercise.
Also see: http://forums.oracle.com/forums/thread.jspa?threadID=495729&tstart=0