Skip to content

XQuery: Bug on child node selection with count() #2193

@Twilight-Shuxin

Description

@Twilight-Shuxin

Description of the Problem

Given this XML document:

<A1 id="1">
    <B1 id="2">
        <C1 id="3">1</C1>
    </B1>
    <D1 id="4">2</D1>
</A1>

and XPath Query

//*[count(./*/*) >= 1]/*

BaseX give result

<B1 id="2">
        <C1 id="3">1</C1>
    </B1>

Expected Behavior

Should return both node 2 and 4 as Saxon & Exist db.

Steps to Reproduce the Behavior

  1. Create database create database test
  2. Insert XML file into database put test.xml path/to/file
  3. Execute XPath query //*[count(./*/*) >= 1]/*

Do you have an idea how to solve the issue?

No response

What is your configuration?

BaseX version: BaseX 10.6 beta latest commit 816b386 on Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions