I need the title and position of the books whose title begins between "M" and "Y".
XML document:
<books>
<book release="2003" edition="1">
<title>XML Advanced</title>
<author>
<lastname>Smith</lastname>
<name>Rosa</name>
</author>
</book>
<book release="2002" edition="1">
<title>Learning XPath</title>
<author>
<lastname>Taylor</lastname>
<name>Claudia</name>
</author>
</book>
<book release="2022" edition="2">
<title>DTD</title>
<author>
<lastname>Jones</lastname>
<name>Robert M.</name>
</author>
</book>
<book release="2020" edition="2">
<title>XSLT Professional</title>
<author>
<lastname>Jones</lastname>
<name>David</name>
</author>
</book>
<book release="2021" edition="2">
<title>Xquery</title>
<author>
<lastname>Lewis</lastname>
<name>Martha</name>
</author>
</book>
</books>
XQuery. I tried something like this, but I don't know yet how to filter it.
for $tit at $posit in doc("books.xml")/books/book/title
return concat($posit, ".- ", $tit)