qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Function return value,create library module


From: Per Bothner
Subject: Re: [Qexo-general] Function return value,create library module
Date: Tue, 09 Mar 2004 16:55:41 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113

Jun Yu wrote:

So I create a file named "authenticate.xq" as my library module:
/////////////////
module "myAuthenticate";

That syntax is not in the latest XQuery draft.  It should be:

module namespace auth = "myAuthenticate";

define function authenticate($username as string, $password as string) as

You should change "define" to declare" - even though Qexo for now
accepts either.


   {
   import module "myAuthenticate" at "authenticate.xq";

"import" must be in the query prolog - i.e. at top level.

Is it possible to implement library module in Servlets ?

Possibly, but I haven't tested it.  Modules in general are
"in progress" - both in my implementation and in the standard.
(There is some sentiment for delaying them until XQuery 2.0,
as the current specification has some major problems.)

./authenticate.xq:1:8: node test when focus is undefined

Probably because you'r using the wrong syntax for the module
declaration.
--
        --Per Bothner
address@hidden   http://per.bothner.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]