On Mon, 12 Jan 2015 04:23:14 -0800, Ashish Bhardwaj  
<[email protected]> wrote:
...
>
> let $query := <query>{cts:collection-query("test")}</query>
>
> let $x := <test>aa</test> (: any modification is allowed to run   
> collection query over it :)
> return
> cts:contains($query, cts:reverse-query($x))
>

You can't get there. A constructed node doesn't belong to any collection.

You'll have to put it in the database and assign it to the appropriate  
collection in order to have it match a collection query (as you did with  
your first query).  The collection is just some metadata stored in the  
database and associated with the document, similar to permissions or  
modification timestamps. It has no meaning outside of the database context.

//Mary
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to