Hi Pradeep,

Can you create a small test case to share with us? It might be easier to 
pinpoint the problem with actual code..

Kind regards,
Geert 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Pradeep Maddireddy
> Sent: dinsdag 20 april 2010 18:24
> To: General Mark Logic Developer Discussion
> Subject: Re: [MarkLogic Dev General] xdmp:invoke xqy file
> 
> Hi Geert,
> 
> In my main module when I import say
> import module namespace search = 
> "http://marklogic.com/appservices/search";
>     at "/MarkLogic/appservices/search/search.xqy";
> and have external variable declared and a flowr stmt.
> 
> I am using xdmp:invoke to invoke the above module and I am 
> also passing the external variable but it fails, if I remove 
> the above import statement it works fine.
> 
> Thanks
> Pradeep Maddireddy
> 
> On 4/20/10, Geert Josten <[email protected]> wrote:
> > 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
> >
> _______________________________________________
> 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