ungent: TXQuery java problem using include namespace

Hi,

I’m programming a Java application and I want to query Tamino throughout this Java application.
This was my first query and it works
String query = “for $b in input()/DVD/Media return $b”
TXQuery querysome = TXQuery.newInstance( query );

The problem is now because in this new query I need to include a namespace declaration in the XQuery prolog.

The new XQuery is: “declare namespace rp210Elements=“urn:SMPTE:Dictionary” for $b in input()//rp210Elements:FrameworkTitle return $b”

This query really works on “Tamino XQuery tool” but not as Java code.

The ERROR is:–>INOXQE6352, XQuery parsing error, Syntax Error at line 1, column 15.
I don’t know how could I solve it.
Can anyone help me? I will be very grateful for it.
Regards,
Diego

you may try a semicolon after the namespace declaration:

declare namespace rp210Elements=“urn:SMPTE:Dictionary”; for $b in input()//rp210Elements:FrameworkTitle return $b