From: Martin H. <mh...@uv...> - 2007-11-06 00:22:30
|
Tentatively answering my own question: this version SEEMS to work OK: import module namespace su="http://hcmc.uvic.ca/namespaces/xqsearchparser" at "java:ca.uvic.hcmc.xqsearchutils.SearchParserModule"; so perhaps the example documentation should show this: -------- xquery version "1.0"; import module namespace example="http://exist-db.org/xquery/examples" at "java:org.exist.examples.xquery.ExampleModule"; example:echo(("Hello", "World!")) -------- Please correct me if I'm wrong! Cheers, Martin Martin Holmes wrote: > HI folks, > > I've written an external Java module and wrapped with with a driver as > explained in the docs here: > > <http://www.exist-db.org/xquery.html#N105FB> > > My code compiles happily against the eXist jars in the version of eXist > I'm using (1.1.1 4311). > > Now I'm trying to call the module from XQuery, following what the > instructions say. The example looks like this: > > ------- > xquery version "1.0"; > > import module namespace "http://exist-db.org/xquery/examples" > at "java:org.exist.examples.xquery.ExampleModule"; > > example:echo(("Hello", "World!")) > -------- > > so I'm substituting the relevant namespace and qualified class name from > my Java module: > > import module namespace "http://hcmc.uvic.ca/namespaces/xqsearchparser" > at "java:ca.uvic.hcmc.xqsearchutils.SearchParserModule"; > > However, I get this error: > > org.exist.xquery.StaticXQueryException: unexpected token: > http://hcmc.uvic.ca/namespaces/xqsearchparser [at line 22, column 25] > > Is the syntax in the example wrong? Should the namespace prefix be > included somehow? > > Cheers, > Martin > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ |