[Monetdb-developers] XQ n00b XQuery question

Fabian Groffen Fabian.Groffen at cwi.nl
Mon Aug 14 14:37:54 CEST 2006


While reading the JXQ draft specs, I stumbled upon the following query:

(pegasus:sql/src/jdbc) fabian% JdbcClient -lxquery Welcome to the
MonetDB interactive JDBC terminal! Type \q to quit, \h for a list of
available commands
auto commit mode: on
monetdb-> import schema namespace foo='http://www.foo.com'
monetdb=> at 'http://www.fooschema.com';
monetdb=> for $i in (foo:hatsize(1),foo:hatsize(4)) return $i
monetdb=>
Error: protocol violation, unexpected line: xquery_prepare: missing ';'
after module import.
monetdb->

Apart from the protocol violation (should be fixed, missing !) I was
wondering whether the "at 'http://www.fooschema.com';" part is not
supported by the compiler, or whether it may not reside on a new line.

monetdb-> import schema namespace foo='http://www.foo.com' at
'http://www.fooschema.com';
monetdb=> for $i in (foo:hatsize(1),foo:hatsize(4)) return $i
monetdb=>
Error: protocol violation, unexpected line: xquery_prepare: missing ';'
after module import.
monetdb->

It seems not to matter.  Not being an XQuery expert at all, I was
wondering if someone could enlighten me on the validity of this
statement.

(PS: not a simple example from the JXQ draft works in MonetDB/XQuery,
because we either don't support external variables, or their syntax is
wrong...  The notion of "prepared" xquery is quite central in JXQ, I was
wondering whether this is available in MonetDB/XQuery, already or not.)




More information about the developers-list mailing list