My question involves strange behavior when using the cts:query
constructors and range indexes/queries.

The following range query fails:

(: (1) :)
cts:search( collection(), cts:and-query((
    cts:element-range-query(fn:QName("http://my-namespace";,
"DateOfBirth"), ">", xs:date("1975-01-01") ),
    cts:query(())
)))

The error string is: "Invalid cast: xs:untypedAtomic("") cast as xs:date".
That sounds like there's an error with the FIRST nested query involving the
date cast.

However, merely adding a nested query makes the search successful.  Note that
the FIRST nested query does not change:

(: (2) :)
cts:search(collection(), cts:and-query((
    cts:element-range-query(fn:QName("http://my-namespace";,
"DateOfBirth"), ">", xs:date("1975-01-01") ),
    cts:query(()),
    cts:element-value-query(fn:QName("http://my-namespace";,
"PatientFirstName"), "*")
)))

Since (2) works, I must have properly created the range element index
and the range query must be correct.  What is wrong?
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to