DotJoshJohnson / vscode-xml

XML Tools for Visual Studio Code
MIT License
320 stars 87 forks source link

XPath function current() is unknown #373

Closed freddythetrout closed 2 years ago

freddythetrout commented 2 years ago

Description What seems to be the problem? XPath function current() is unknown. It is specified since XSLT 1.0

Error message in visual studio code: "Something went wrong while evaluating the XPath: Error: Unknown function current"

Specification of XSLT 1.0 as context: https://www.w3.org/TR/xslt-10/ Chapter of the specification: "...12.4 Miscellaneous Additional Functions Function: node-set current()..."

Extension Version What version of the XML Tools extension are you using? 3.179.562

VS Code Version What version of VS Code are you using? 1.62.3

Operating System What OS (and version) are you using? ubuntu 20.04

bmix commented 2 years ago

As far as I know, current() is a function special to XSLT.

From the document and chapter you reference:

12 Additional Functions This section describes XSLT-specific additions to the core XPath function library.

And while it is true, that it's named an "addition to the [...] XPath [...] library", I don't know about any implementation outside of an XSLT processor.

See, for example, https://maxtoroq.github.io/xpath-ref/ for all official XPath functions as defined in the XPath spec.

freddythetrout commented 2 years ago

Oh, you are right. I close this issue.