benibela/internettools

Xpath 3.1 update

thierrydev opened this issue · 2 comments

Hello
I use this tool to learn xpath and python web scraping and I was wondering how much effort is required to update this to Xpath 3.1 please

Here are the 3.1. test results: xpath31.txt xquery31.txt

The biggest issue is the map data type. It requires a complete redesign/rewrite of the current JSONiq based map type, because currently it only supports strings as keys, while in 3.1 it should allow keys of any type, e.g. numbers and datetimes. And it is too slow

And for arrays there is the issue that [(1, 2)] has been evaluated as [1,2] in JSONiq, but becomes [[1,2]] in XPath 3.1 (when serializing). That somehow needs to be changed without breaking everyone's code using the old syntax

I see thank you for the quick reply - the web tool is very useful.