0
<authors> {
for $a in fn:distinct-values(doc("data.xml")/books/book/author/text())
return <name> {$a} </name>
{
for $b in doc("data.xml")/books/book[author/text() = $a]
return <book> {$b/title/text()}</book>
}
}
</authors>
這是我的代碼,當我跑這個代碼,有語法錯誤:的Xquery語法錯誤
4,1: static error [err:XPST0003]: invalid expression: syntax error, unexpected expression (missing comma "," between expressions?)
什麼是錯的代碼?