[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qexo-general] function return value
From: |
Jun Yu |
Subject: |
[Qexo-general] function return value |
Date: |
Mon, 8 Mar 2004 11:37:57 +0100 (MET) |
Hello everybody,
I met a problem about Function which can return value. here is my XML
document "session.xml".
<login>
<username>administrator</username>
<password>12345</password>
</login>
My XQuery program "test.xql" is like this:
define function authenticate($username,$password) as boolean {
let $s:=document("session.xml")/login
return
if ($s/username=$username and $s/password=$password) then
true
else
false
}
<html>
<body>
{
let $login_user:=request-parameter("username"),
$login_password:=request-parameter("password")
return
if (authenticate($login_user,$login_password)=true) then (...)
else ()
}
</body></html>
Why I always get such result:
test.xql:6:3: node test when focus is undefined
test.xql:8:1: node test when focus is undefined
This is just a small problem. I do not know what is its problem. Thanks
for your idea.
Regards,
Jun Yu
- [Qexo-general] function return value, Jun Yu, 2004/03/10
- [Qexo-general] function return value,
Jun Yu <=
- [Qexo-general] Function return value, Jun Yu, 2004/03/10
- Re: [Qexo-general] Function return value, Per Bothner, 2004/03/10
- Re:[Qexo-general] Function return value,create library module, Jun Yu, 2004/03/11
- Re: [Qexo-general] Function return value,create library module, Per Bothner, 2004/03/11
- Re: [Qexo-general] Function return value,create library module, Jun Yu, 2004/03/11
- Re: [Qexo-general] Function return value,create library module, Per Bothner, 2004/03/11
- Re: [Qexo-general] Function return value,create library module, Jun Yu, 2004/03/13