[MarkLogic Dev General] xdmp:invoke use-case

Michael Blakeley mike at blakeley.com
Thu Mar 1 07:11:59 PST 2012

xdmp:eval has the static-check option too. You could send the module to it as a string.

Beyond that, the Modules database makes a dandy persistent uri->content repository. You could have a hierarchy of temp files, perhaps something like /sync.ro/.sessions/{$SESSION}/{$RELATIVE-PATH}. Use a scheduled task to clean out anything older than N hours or days.

-- Mike

On 1 Mar 2012, at 00:19 , Alex Jitianu wrote:

> Hi,
> In MarkLogic 5 the function xdmp:invoke has received an option named 
> "static-check" that will perform a validation instead of an actual 
> evaluation. My use case is that I'm editing such an XQuery module opened 
> from the server and I want to validate it but without having to save it 
> first. I'm thinking of a sort of content resolver that I can pass to the 
> xdmp:invoke. Basically a mapping URI->content. So when the server will 
> need to access a module with a given URI will prefer the content from 
> the mapping.
> Another flexibility that this URI->content mapping gives is that I can 
> edit a module but I can validate the main module and I just pass the 
> URI->content for the edited module.
> So this is my use case. Does anyone know how I can achieve this using 
> either XQuery or XCC? Or if currently there is no solution for it, will 
> MarkLogic think about adding one?
> Thanks,
> Alex
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general

More information about the General mailing list