[MarkLogic Dev General] XQuery evaluation

Tyagi, Devesh DTyagi at INNODATA.COM
Mon Jul 27 00:55:55 PDT 2015


Hi,


I have the following piece of code in XQuery:


declare variable $triple-predicate-prefix := "http://www.bsi.org/predicates/";

declare variable $triple-predicate-suffix-hasTaxonomyName := "hasTaxonomyName";


declare variable $triple-predicates-map := map:map();

declare variable $initialize-variables-caller := local:initialize-variables();


declare function local:initialize-variables(){

let $_ := map:put($triple-predicates-map,$triple-predicate-suffix-hasTaxonomyName,fn:concat($triple-predicate-prefix,$triple-predicate-suffix-hasTaxonomyName))

return ()

};


declare local:test(){

map:get($triple-predicates-map,$triple-predicate-suffix-hasTaxonomyName)

};


local:test()


This returns me and empty sequence. The map doesn't get initialized. It would be helpful if someone could point me towards the reason and solution behind it.


Thanks and regards,

Devesh

"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."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20150727/8ea38ae1/attachment.html 


More information about the General mailing list