Hi,
I need to pass an empty value to util function, which is not working.
declare function xutils:validateSession($sessionId as xs:string) {
if($sessionId ne "" ) then
let $document := fn:doc($config:USER_SESSIONS)
<errorCode>
<code>500</code>
<description>server error</description>
</errorCode>
else
<errorCode>
<code>517</code>
<description>Session Id can't be empty</description>
</errorCode>
};
I am calling this function from some other file and it is returing an empty
sequence.But if I make this function local:validateSession($sessionId as
xs:string) then its working.
Calling file:
import module namespace config = "config"
at "/rest-apis/utils/config.xqy";
let $node := '<inputString>
<sessionId></sessionId>
</inputString>'
let $node := xdmp:unquote($node)
let $sessionId := $node//sessionId/text()
?return
let $validateFlag := xutils:validateSession($sessionId)
return
$validateFlag
Please advice.
Thanks
Pragya
"This e-mail and any attachments transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential , proprietary or
privileged information. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original message. Any
unauthorized review, use, disclosure, dissemination, forwarding, printing or
copying of this e-mail or any action taken in reliance on this e-mail is
strictly prohibited and may be unlawful."
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general