Hi Tim,
Thanks for your observation. We need more help to reproduce this: Could you describe in detail, and step by step, how to trigger this issue?
In addition, you could… • tell us more about your OS and JDK version • start BaseX on command line and share a possible stack trace with us • verify if the error also occurs with other XML input (such as <x/>) and other queries (such as .)
The simpler the use case, the better…
Thanks Christian
On Fri, Mar 1, 2024 at 6:11 PM Thompson, Timothy timothy.thompson@yale.edu wrote:
I’ve been noticing an inconsistent behavior in the GUI with BaseX 11 beta (build 17d8426).
I have a simple query on a database created from a CSV file. Sometimes it works, but sometimes the root context is evaluated as an empty sequence:
rewrite context value: . -> ()
rewrite util:root(nodes): util:root(()) -> ()
I notice this when I open the database as context and try to execute the query. After the query fails, if I try to click on the “home” icon in the result panel, it also returns an empty sequence, even though the database is open.
If I reopen the database and run the query, it works again.
Sample data:
<csv>
<record>
<entry>http://id.loc.gov/authorities/names/n00000121</entry> <entry>http://id.loc.gov/rwo/agents/n00000121</entry> <entry>0.11861849</entry>
</record>
<record>
<entry>http://id.loc.gov/authorities/names/n00000122</entry> <entry>http://id.loc.gov/rwo/agents/n00000122</entry> <entry>0.11699477</entry>
</record>
<record>
<entry>http://id.loc.gov/authorities/names/n00000267</entry> <entry>http://id.loc.gov/rwo/agents/n00000267</entry> <entry>0.10811427</entry>
</record>
</csv>
Query (with DB open as context):
count(distinct-values(
for $rec in /csv/record
where contains($rec/entry[1], "id.loc.gov")
return $rec/entry[1]
))
Thanks in advance,
Tim