In MarkLogic how can I find a document URI where an element is
<sample-ref type="dated">
and value to match is 1742
Here is sample XML document:
<samples>
<sample>
<sample-ref type="dated">1742</sample-ref>
<sample-ref type="undated">1742</sample-ref>
<sample-xref type="sub">
<sample-ref type="dated">TT 1742</sample-ref>
</sample-xref>
<sample-xref type="din">
<sample-ref type="dated">
</sample-ref>
</sample-xref>
<sample-xref type="sup">
<sample-ref type="dated">XX 1742</sample-ref>
</sample-xref>
</sample>
</samples>
I only want to query this element where value matches 1742
<sample-ref type="dated">1742</sample-ref>
I have tried this query but it returns more then one uri:
cts.uris("", null, cts.elementValueQuery(xs.QName("sample-ref"), "1742", "exact"))
How can I refine this query
Thanks for your help