Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPath: Error in arithemetic calculation result comparison #2188

Closed
Twilight-Shuxin opened this issue Mar 16, 2023 · 2 comments
Closed

XPath: Error in arithemetic calculation result comparison #2188

Twilight-Shuxin opened this issue Mar 16, 2023 · 2 comments
Labels

Comments

@Twilight-Shuxin
Copy link

Twilight-Shuxin commented Mar 16, 2023

Description of the Problem

Given this XML document:

<T1 id="1">1</T1>

and this XPath query:

//*[not((@id * (-1)) > (-2))]

BaseX gives result

<T1 id="1">1</T1>

Expected Behavior

Should return empty result set as Saxon & ExistDB.

Steps to Reproduce the Behavior

Using BaseX Client:

  1. Create database create database test
  2. Insert XML file into database put test.xml path/to/file
  3. Execute XPath query xquery //*[not((@id * (-1)) > (-2))])
    (Note: Directly executing <T1 id="1">1</T1>//*[not((@id * (-1)) > (-2))]) does not trigger the bug

Do you have an idea how to solve the issue?

No response

What is your configuration?

BaseX version: 10.4 on Windows
(Also reproduced on the latest stable snapshot 10.5 provided in https://files.basex.org/releases/latest/)

@ChristianGruen
Copy link
Member

Thanks for the observation. A new stable snapshot with the bug fix has been uploaded.

@Twilight-Shuxin
Copy link
Author

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants