BaseXdb / basex

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

XQuery: Incorrect result for count after subsequence #2214

Closed Twilight-Shuxin closed 1 year ago

Twilight-Shuxin commented 1 year ago

Description of the Problem

Given this XML document:

<M id="8"/>

and XPath Query

/M/count(subsequence(. ! (., @id), 1, 2))

BaseX gives result 1.

Expected Behavior

Should return 2 as Saxon and eXist-DB.

Steps to Reproduce the Behavior

  1. Create database create database test <M id="8"/>
  2. Execute XPath query xquery /M/count(subsequence(. ! (., @id), 1, 2))

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