Hi Pradeep,

You can only invoke main modules (so without the module declaration line), as 
opposed to import module which only accepts library modules (with the module 
declaration).

You can declare a namespace and use it, just replace the term 'module' with 
'declare'.

When a main module has external variables, they *must* be supplied, they are 
not optional. Look at the help of xdmp:invoke to see how to pass them..

Kind regards,
Geert

>


drs. G.P.H. (Geert) Josten
Consultant


Daidalos BV
Hoekeindsehof 1-4
2665 JZ Bleiswijk

T +31 (0)10 850 1200
F +31 (0)10 850 1199

mailto:[email protected]
http://www.daidalos.nl/

KvK 27164984

P Please consider the environment before printing this mail.
De informatie - verzonden in of met dit e-mailbericht - is afkomstig van 
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit 
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit 
bericht kunnen geen rechten worden ontleend.

> From: [email protected]
> [mailto:[email protected]] On Behalf Of
> Pradeep Maddireddy
> Sent: dinsdag 20 april 2010 18:02
> To: General
> Subject: [MarkLogic Dev General] xdmp:invoke xqy file
>
> Hi ..!
>
> I created search.xqy file which can be invoked using
> xdmp:invoke. When I add the stmt
>
> module namespace loc = "http://htcinc.com/loc";;
>
> I get the following error
>
> XDMP-EVALLIBMOD: xdmp:invoke("search.xqy", (fn:QName("",
> "input_parm"),
> "<root><file><path>C:\Pradeep\xml\a_and_c_wcpub_wip.xml</path>
<ur..."))
> -- Cannot evaluate library module: /search.xqy
>
> It works fine when I remove the module namespace stmt.
> Can we not add namespace for this kind of xquery files?
>
> One more problem I encountered is when I have an import
> module statement and an external variable in this xqy file
> xdmp:invoke fails.
> If I remove the external variable it works fine. Is this is a bug
>
> Thanks
> Pradeep Maddireddy
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to