The following query gives me no results:

for $city as xs:string in ("Paris", "Cambridge", "London", "Oxford")
return (
  $city, 
  count(/dictionary/letter/entry[.//p//text() contains text {$city}]),
  "
"
)

However, BaseX rewrites it to

for $city as xs:string in ("Paris", "Cambridge", "London", "Oxford", ...)
return ($city, fn:count(db:fulltext("with-sources", { $city 
})/ancestor::*:p/ancestor::*:entry), "
")

If I remove the braces around $city in the argument to db:fulltext() I
get the right answers (or at least plausible answers).

So this looks like a bug in the rewriting engine.

Liam


-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml

_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to