This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27997 - [fo31] Move JSON-to-and-from-XML functions from XSLT 3.0 to F+O 3.1
Summary: [fo31] Move JSON-to-and-from-XML functions from XSLT 3.0 to F+O 3.1
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: Macintosh All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-11 10:34 UTC by Joe Wicentowski
Modified: 2016-12-17 19:38 UTC (History)
1 user (show)

See Also:


Attachments

Description Joe Wicentowski 2015-02-11 10:34:27 UTC
Currently XSLT 3.0 has two functions for handling JSON:

1. http://www.w3.org/TR/xslt-30/#func-xml-to-json
2. http://www.w3.org/TR/xslt-30/#func-json-to-xml

These functions have broader applications beyond XSLT and deserve to be made available to all XPath-based languages, including XQuery. 

Please consider this request to move these two functions into XPath Functions and Operators 3.1.
Comment 1 Michael Kay 2015-02-19 17:53:31 UTC
The XQuery WG looked briefly at this in the XML Prague meeting and was broadly sympathetic, but decided to "sleep on it" before making a final decision.

Although adding new functions at this stage of specification development would not normally be countenanced, there was a feeling that moving them from one spec to another, when the specs have a similar level of maturity, would be considered acceptable.

We have already started work on converting the existing test material for these functions, in the hope of a positive decision.
Comment 2 Joe Wicentowski 2015-02-19 18:20:34 UTC
Thank you, Michael and WG!
Comment 3 Andrew Coleman 2015-03-04 14:41:18 UTC
At the teleconference on 2015-03-03, the joint Working Group agreed to fix this bug by including the functions xml-to-json and json-to-xml in F and O, at the same time changing the namespace used by the XML representation to the new namespace:
http://www.w3.org/2005/xpath-functions/json.

Joe, many thanks for bringing this to our attention. Please could you acknowledge your acceptance of the resolution by closing this bug.
Comment 4 Michael Kay 2015-03-05 22:10:23 UTC
For the record, I also changed the error codes returned by these two functions to align with F+O conventions, and I made editorial changes to describe the relationship of these functions to the existing JSON functions in F+O (for example, deleting the text that denied the existence of JSON-to-XML mapping functions...)

The schema for the new namespace will appear in an appendix and in a free-standing document. I will also move the schema for fn:analyze-string to the same appendix.
Comment 5 Joe Wicentowski 2016-12-17 19:38:53 UTC
Belatedly, many thanks to Michael, Andrew, and the WG. Somehow, regrettably, I missed your replies when they came. I'm grateful that you considered and accepted this request.