File: Data.xml
0001
name 1
0002
name 2
0003
name 3
File: Query.xquery
for $prod in doc("Data.xml")//car[@model = ("B", "A")]
return {$prod/position()}. {data($prod/name)}
Output:
1. name 1
1. name 2
1. name 3