Hi Greet and All, The below fix xdmp:spawn was working fine last week for me and amit. This weekend all dictionaries has been updated by weekly load. Now the spawn takes more time, but it was last week. What will be the issue?
Best Regards, Selva On Wed, Apr 4, 2012 at 2:35 AM, Geert Josten <[email protected]> wrote: > Hi Amit, > > > > I notice a few things about your call: > > > > First, you pass in a modules option with a dynamic value derived from the > expression ‘/spell’. That either results in an empty value, or in a lot of > xml. I’m not sure that is your purpose. It makes most sense I guess to just > omit the option, which causes things to run against the current > modules-database (the one used to execute the code that contained your > xdmp:spawn). > > > > Second, you specify an http uri as modules root. So, MarkLogic will look > for http://example.com/application/yash/hello.xqy within the modules > database. It is not so common to use full http uri’s as modules names, but > it is allowed. Just be aware that they are not resolved to the actual > address. > > > > Third, you pass one argument with a quoted piece of XML. You are aware you > can pass it as unquoted XML just as well? > > > > Now, about the hello1 being in a different root: have you considered > simply declaring a different root, e.g. of one ‘folder’ higher, and calling > the first with /yash/hello.xqy. You can call the second simply with > /yash1/hello1.xqy that way. > > > > Kind regards, > > Geert > > > > *Van:* [email protected] [mailto: > [email protected]] *Namens *Amit Kumar113 > *Verzonden:* woensdag 4 april 2012 8:11 > *Aan:* [email protected] > *Onderwerp:* [MarkLogic Dev General] xdmp:spawn > > > > Hi, > > > > I had a query regarding xdmp:spawn(). > > > > *xdmp:spawn*( $path as xs:string, [$vars as item()*], [$options as > node()?] ) > > > > Now I path I gave my file name I wanted to execute and passed all the > necessary variables. In options I gave the root from where to pick up my > file. But the issue I am facing now is that my file is internally calling > another file which is present in another folder that is outside my root > folder. And because of that my spawn query does not work. > > > > Query- xdmp:spawn("/hello.xqy", > > (xs:QName('search'),"<SearchFields><field><name>inputtext1</name><dictionaries>1234 > </dictionaries><spelldictionaries>Yash_Spell</spelldictionaries><search>the</search></field></SearchFields>"),<options > xmlns="xdmp:eval"> > > <modules>{/spell}</modules> > > <root>http://example.com/application/yash/</root> > > </options>) > > > > Now my hello.xqy file is calling another file hello1.xqy that is kept in > http://example.com/application/yash1. So the query gives me an error > saying hello1.xqy not found. Is there anything that can be done for this? > > > > Thanks > > Amit > > > > **************** CAUTION - Disclaimer ***************** > > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely > > for the use of the addressee(s). If you are not the intended recipient, please > > notify the sender by e-mail and delete the original message. Further, you are > not > > to copy, disclose, or distribute this e-mail or its contents to any other > person and > > any such actions are unlawful. This e-mail may contain viruses. Infosys has > taken > > every reasonable precaution to minimize this risk, but is not liable for any > damage > > you may sustain as a result of any virus in this e-mail. You should carry out > your > > own virus checks before opening the e-mail or attachment. Infosys reserves the > > right to monitor and review the content of all messages sent to or from this > e-mail > > address. Messages sent to or from this e-mail address may be stored on the > > Infosys e-mail system. > > ***INFOSYS******** End of Disclaimer ********INFOSYS*** > > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
