I have the following code:
let $fName := "C:\Users\user\Documents\Sitemaps\Updated Pages\Books.xml"
file:write($fName,
element titles{
for $x in doc("http://www.w3schools.com/xsl/books.xml")/bookstore/book
where $x/price>0
order by $x/title
return $x/title
})
BaseX is giving me an error - "Incomplete FLWOR expression: expecting 'return'."
It is specifically highlighting the file:write
line, underlining file
in red.
I'm not sure why this is happening. How do I structure this to avoid syntax errors?