BaseXdb / basex

BaseX Main Repository.
http://basex.org
BSD 3-Clause "New" or "Revised" License
661 stars 267 forks source link

XQuery: Bug on consecutive map with distinct-values #2217

Closed Twilight-Shuxin closed 1 year ago

Twilight-Shuxin commented 1 year ago

Description of the Problem

Given this XML document:

<F/>

and XPath Query

/F[(distinct-values(. ! (boolean(.), . = <A/>)) ! count(.)) castable as xs:boolean]

BaseX throws exception: java.io.IOException: Stopped at C:/BaseX/BaseXSource/basex/, 1/42: [FORG0001] Cannot convert element() to xs:boolean: .

Expected Behavior

Should execute successfully,

Steps to Reproduce the Behavior

  1. Create database create database test <F/>
  2. Execute XPath query xquery /F[(distinct-values(. ! (boolean(.), . = <A/>)) ! count(.)) castable as xs:boolean]

Do you have an idea how to solve the issue?

No response

What is your configuration?

BaseX version: BaseX 10.7 beta latest commit 081fb4d on Windows

ChristianGruen commented 1 year ago

@Twilight-Shuxin All bugs have been fixed. Thanks again for providing us with such valuable feedback!

Twilight-Shuxin commented 1 year ago

Thank you too for such a quick fix!