I suspect you dont want to include this in a directly executed CQ command module namespace local="http://marklogic.com/appservices/ArticleDB";
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Srinivas Mandadapu Sent: Wednesday, September 23, 2009 11:29 AM To: [email protected] Subject: [MarkLogic Dev General] newbie question Hi, I am a newbie to Marklogic and trying out basic stuff on cq.However I am running into a problem which I am not able to comprehend at all. I have an article DB setup for which I loaded some sample documents and trying to run the below code in cq: xquery version "1.0-ml"; module namespace local="http://marklogic.com/appservices/ArticleDB"; declare function local:sortArticles() as xs:string { for $v in fn:doc() order by $v/article/effectivedate return <test> <art>{$v/article/articleNum}</art> <dt>{$v/article/effectivedate}</dt> </test> }; ERROR: Cannot evaluate library module: in /cq/eval.xqy line 111: But if the run the same with out the module and function declarations, I see the results. Can someone help me understand where I am going wrong. I really appreciate your help. Thanks, Srini _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
