-
-
Notifications
You must be signed in to change notification settings - Fork 273
Closed
Labels
Description
Description of the Problem
Given this XML document:
<A1 id="1">
<B1 id="2"></B1>
<C1 id="3"></C1>
</A1>
and XPath Query
//*[head(./*/last()) <= 1]
BaseX gives result
<A1 id="1"><B1 id="2"/><C1 id="3"/></A1>
Expected Behavior
Should return empty result set as Saxon & Exist.
When executing //A1/*/last(), BaseX returns 2, 2; Therefore the condition is false and node A1 should not be selected.
Steps to Reproduce the Behavior
- Create database
create database test - Insert XML file into database
put test.xml path/to/file - Execute XPath query
xquery //*[head(./*/last()) <= 1]
Do you have an idea how to solve the issue?
No response
What is your configuration?
BaseX version: Newest development version from Github, commit 95e6aaa