Just using the right namespace or syntax or whatever isn't enough. You also need some software which can understand and process XQuery code. There is nothing in the standard
Java API which does that, so you will have to look elsewhere. Google keywords:
xquery processor.