The sample xml -
<book>
<Title type="fiction">XYZ</Title>
<Title type="horror">XYZ</Title>
<Title type="comedy">ABC</Title>
</book>
I want to pull all the docs which has type =fiction(XYZ title) and type=comedy(ABC title). Below query does not give expected result -
cts:and-query((
cts:element-attribute-range-query(xs:QName('Title'),xs:QName('type'),'=','fiction'),
cts:element-attribute-range-query(xs:QName('Title'),xs:QName('type'),'=','comedy'),
cts:element-range-query(xs:QName('Title'),'=','ABC'),
cts:element-range-query(xs:QName('Title'),'=','XYZ')
)