Hi Shannon,

The probable reason is cts:element-word-query() does a shallow look, while cts:contains() does a deep look.

A cts:element-word-query() only looks at direct text node children. (Well, and any other text node children configured to be seen by something like element-word-query-through). A cts:contains() looks at all children at any depth.

-jh-

Shannon Shiflett wrote:
Hi,

I have two queries that (in theory?) should return the same thing but:

count(collection("PGWDE")//tei:div1[cts:contains(.//tei:note, cts:word-query("boston"))])

returns 953

however,

count(cts:search(collection("PGWDE")//tei:div1, cts:element-word-query(xs:QName("tei:note"), "boston")))

returns 0

Same database. Can anyone guess why? In Virginia it's too late in the day to figure this out....

Thanks!

Shannon
UVA Press
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

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

Reply via email to