Project

Profile

Help

Feature #6610

open

Add localization info in net.sf.saxon.s9api.XdmItem.

Added by Mircea Enachescu 6 days ago. Updated 6 days ago.

Status:
New
Priority:
High
Assignee:
Category:
Localization
Sprint/Milestone:
-
Start date:
2024-12-16
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

Actions #1

Updated by Michael Kay 6 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

Also available in: Atom PDF