Feature #6610
openAdd localization info in net.sf.saxon.s9api.XdmItem.
0%
Description
Hello,
Would you consider adding localization information in net.sf.saxon.s9api.XdmItem like in net.sf.saxon.s9api.XdmNode class ? We would like to offer XPath over JSON in Oxygen XML Editor. That will be highly appreciated.
Regards, Mircea
Updated by Michael Kay 5 days ago
Interesting idea, but it's not easy. Items other than nodes (for example integers or strings) don't have individual identity, so they aren't readily traceable back to a location in a JSON file.
We do however have a mechanism in XPath 4.0 (based on experimental features implemented as Saxon extensions) whereby any XDM item can be labelled to indicate its provenance. We could consider an option on json-doc() that causes items to be labelled with location information. We would also need to enhance the JSON parser to maintain such information but that is do-able in principle.
As it happens I'm working on the JSON parser at the moment, so it's a good time to be thinking about such requirements.
Please register to edit this issue