DeltaXML / vscode-xslt-tokenizer

VSCode extension for highlighting XSLT and XPath (upto 3.0/3.1)
MIT License
46 stars 4 forks source link

Some issues with XSLT parser #97

Closed softinn72 closed 2 years ago

softinn72 commented 2 years ago

Hello, first of all thanks a lot for the great VSCode extension, it's very useful and much appreciated!

While working on a quite complex XSLT stylesheet, I have found a couple of weird errors raised by the static analysis parser which I do not understand.

For example, it seems that the fn:concat() function is marked as error whenever it's called only with 2 parameters: immagine The error in the popup is "'fn:concat' with 2 arguments not found". If I add an empty string as the 3rd parameter the error disappears.

Another weird error is raised whenever in a select expression I use the encoded <= symbol: immagine The error here is "Expression context - unexpected token here: =". As a workaround I could invert the order of the compared items, but in this specific case I find the logic more legible when <= is used.

I'd like to add that Saxon processes the XSLT correctly without raising any errors, so I think these 2 errors are just a problem of the plugin. Could you please have a look and let me know how if it's possible to fix them?

Thanks a lot for the attention, Paolo

softinn72 commented 2 years ago

As an addition, I'd like to add that the fn:concat() function is also marked as error whenever it's called with 4 and 5 parameters.

pgfearo commented 2 years ago

Thanks for reporting these problems. I will provide an update as soon as I can.

pgfearo commented 2 years ago
  1. The fn:concat function call is now valid for 1 or more arguments (the same as a concat function call
  2. Errors are no longer reported for operator &lt;= and also &gt;=

These fixes are included in Release 1.2.2