Skip to content

fontoxpath:evaluate can't see functions defined in XQuery, but can see those defined with registerCustomXPathFunction #513

Description

@rrthomas

Calling fontoxpath:evaluate, I am getting errors like this:

Error: XPST0017: Function Q{https://github.com/rrthomas/ruth/raw/main/ruth.dtd}r
elative-path with arity of 1 not registered. Did you mean "Q{https://github.com/
rrthomas/ruth/raw/main/ruth.dtd}real-path (xs:string)"?

Here, ruth:real-path (the function suggested) is defined with registerCustomXPathFunction, while ruth:relative-path (the function that the evaluation can't find) is defined in XQuery that has been loaded with registerXQueryModule. I don't understand why one is visible to fontoxpath:evaluate but not the other.

I pushed a branch of my project that illustrates the problem when you run npm test, but I quite understand if that is too much code to go through—I can try to prepare a MWE if that's necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions