I tried:
statement.execute(
"SELECT ID, " +
"XMLSERIALIZE( " +
"XMLQUERY('
xmlns:myns=\"http://www.myproject.ox.ac.uk/MyProject\" //myns:Name' PASSING
BY REF Definition EMPTY ON EMPTY) " +
"AS VARCHAR(10000)) " +
"FROM My_Schema.My_Table");Same error: Caused by: org.apache.derby.client.am.SqlException: Encountered error while evaluating XML query expression for XMLQUERY operator: Prefix must resolve to a namespace: myns SQLSTATE: XJ001: Java exception: 'Prefix must resolve to a namespace: myns: org.apache.xpath.domapi.XPathStylesheetDOM3Exception'. Cheers On Thursday 21 Jun 2007, Bryan Pendleton wrote: > > I've tried: > > '//myns:Name' and that would seem to be correct, but I can find no way of > > setting myns to resolve to "http://www.myproject.ox.ac.uk/MyProject" in > > Did you try including > > xmlns:myns="http://www.myproject.ox.ac.uk/MyProject" > > in your XQuery expression? > > I don't know if it will work, but it's worth a try. > > thanks, > > bryan -- Douglas PW Russell Research Officer - GIMI/NeuroGrid Oxford University Computing Laboratory Tel: +44 (0)1865 283519 email: [EMAIL PROTECTED]
pgpwe9aNii4z3.pgp
Description: PGP signature
