Also, the function declaration must go in the prolog.

Also, missing a closing quote mark after the parameter to xdmp:http-get.

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Jason Hunter
Sent: Wednesday, June 23, 2010 11:33 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] XQuery Function error..

What is wrong with this function?

xquery version '1.0-ml';
declare namespace xh='http://www.w3.org/1999/xhtml';
let $html := 
xdmp:tidy(xdmp:http-get('http://blogs.avalonconsult.com/)[2])[2]<http://blogs.avalonconsult.com/)%5b2%5d)%5b2%5d>
for $post in $html//xh:d...@class='post']
local:getblogs(fn:string($post//xh:h...@class='storytitle']//xh:a/@href))
return

Simple typo.  You need to put the "return" word before the thing to return.

-jh-

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to