Skip to content

Unary (map) lookup in function call in predicate fails #2364

Description

@adamretter

The following query should return the second map, instead we get an error XPST0003. This does work in BaseX and Saxon, but not in eXist-db. Appears to be a parser error.

Tested on eXist-db 5.0.0-RC6

let $ms := (
    map {
        "headers": (
            map {
                "name": "Content-Disposition",
                "value": 'filename="bob"'
            }
        )
    },
    map {
        "headers": (
            map {
                "name": "Content-Disposition",
                "value": 'filename="fred"'
            },
            map {
                "name": "Content-Type",
                "value": 'application/xml'
            }
        )
    }
)
return
    
$ms[not(empty(?headers[fn:matches(?value, 'filename="fred"')]))]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissue confirmed as bugparserxqueryissue is related to xquery implementation

    Type

    Projects

    Status
    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions