Hi All,

I have the following "test.xml" document which I insert in "test"
collection:
<test>aa</test>

When I run the follwing query, it works as expected and returns true:
let $query := <query>{cts:collection-query("test")}</query>
let $x := fn:doc("test.xml")
return
cts:contains($query, cts:reverse-query($x))

Now I am trying to pass the content of "test.xml" directly in $x and it
fails(which it should obviously), but I need someway by which I can acheive
it by passing a xml. I want to find a way which can tell the collection
query that this xml belongs to a certain collection when reverse-query is
run over it. Here is xquery for more clarity:

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))

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

Reply via email to