Hi,
I'm writing a cleanup function that takes a base context to match to
find documents that should be deleted:
(: returns a sequence of URIs that should be deleted in the context of
$base_context (ie: /ra_document) that's older than $duration :)
declare function cleanup:find($duration as xs:dayTimeDuration,
$base_context as node()*)
{
let $query :=
cts:and-query((
cts:element-range-query(xs:QName('started_at'), '<=',
fn:current-dateTime() - $duration)
))
for $doc in cts:search($base_context, $query)
return (xdmp:node-uri($doc))
};
cleanup:find(xs:dayTimeDuration('P60D'), /some_document)
------------------8< snip --------------------------------------
When I run that, I get an error that the expression is unsearchable.
What I'd like to do is provide a base context to do the search on (ie: a
document node type).
Is there any way to do this?
...spike
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general