Hi Amanda,
You are completely right, the returned base URI is wrong. Once again it turns out that URI handling in XQuery is an unrewarding topic.. I have added an issue in our bug tracker [1].
Until then, just add a trailing slash after WEB-INF, and your code will work again.
Best, Christian
[1] https://github.com/BaseXdb/basex/issues/1416
On Tue, Feb 14, 2017 at 8:01 PM, Amanda Galtman Amanda.Galtman@mathworks.com wrote:
Hi,
I’m seeing different results from base-uri() in BaseX 8.4 vs. 8.5.2. I believe the 8.4 answer is correct and the 8.5.2 answer is incorrect.
Here is an example, and there is nothing special about the particular folder or XML file I used.
base-uri(collection("file:///C:/Program%20Files%20(x86)/BaseX8.4/webapp/WEB-INF")/*[*:display-name])
BaseX 8.4 result:
file:///C:/Program%20Files%20(x86)/BaseX8.4/webapp/WEB-INF/web.xml
BaseX 8.5.2 and 8.6 result (notice “WEB-INF/” is missing):
file:///C:/Program%20Files%20(x86)/BaseX8.4/webapp/web.xml
Saxon agrees with BaseX 8.4.
Thanks,
Amanda