Hello,
I've been having an issue with MonetDB/XQuery using the JDBC driver.
Essentially, when I supply an XPath query such as the following:
pf:collection("collection_name")//stations[date/year>=2010]
... using the mclient utility, there's no problem. The result is an <XQueryResult> root node containing all the relevant 'stations' nodes as requested by the query.
However, if I issue the same query to the server from a Java application using the JDBC driver for MonetDB, the string result that is returned merely contains one 'stations' node (the first one that gets processed, I think).
My guess is that the resultset (of 'stations' nodes) is not being wrapped in a root node, as is the case when querying using the mclient utility.
But I'm unsure if this due to a bug, or if there's something that I'm not doing correctly.
I'm also aware that this issue can be resolved by modifying the query (when using JDBC) to something such as:
<result> {
pf:collection("collection_name")//stations[date/year>=2010]
} </result>
... but I have reasons for not wanting to do this.
Any help is much appreciated. If anyone needs more information, just let me know (and if it makes any difference, I'm running a local server instance).
Cheers,
-Rob