Search will work faster with a simpler search path and more complex query. I think this is the closest that you can use cts functions:
cts:search(
cts:and-query((
cts:element-attribute-value-query(xs:QName('foo'), xs:QName('class'), 'bar'),
cts:element-value-query(xs:QName('foo'), '')
))
)
NTN!
source
share