Skip to content

XPath silently ignores erroneous evaluation where a nodeset is required #350

Description

@tompng

In XPath evaluation, some evaluated part is required to be a nodeset. If not, it should result in error.
#342 (comment)

Examples:

# Function argument that requires nodeset
local-name(1)
sum("string")
count(1 < 2)

# Path after function that doesn't return a nodeset
# id("a")/path id("a")[predicate] is valid
string(a/b)[predicate]
string(a/b)/path

# Path after non-nodeset variable
$x[predicate]
$x/path

# Path after literal
"string"[predicate]
42/path

# Path after neg
-number(a/b)[predicate]
-number(a/b)/path

# Path after parenthesized expression
(1)[predicate]
(1)/path

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions