Completed ACTION A-613-04

Dear all,

The following action has now been completed:

ACTION A-613-04 O'Neil to ensure that the use cases in the XQuery 3.1
requirements and use cases document are added to the QT3 test suite.

I have committed a new test-set in the QT3 test suite under app/UseCaseR31.xml

It was not possible to port all the examples into QT3 I had to leave out some examples out that used external functions and some that were mixed with JSONIQ or Javascript. 

There were bugs in the examples, which some I have raised with Jonathan. I have corrected some in QT3, but I hope I have not changed the meaning of the examples. Especially where we use fn:collection on JSON documents.

I had some trouble with these examples that used fn:collection on JSON documents. The problem was some of these documents supplied as the argument have unfamiliar JSON syntax where the objects are separated by commas. See below.

Example 1:

{"name" : "Sarah”, "age" : 13, "gender" : "female”, "friends" : [ "Jim", "Mary", "Jennifer"]}
{"name" : "Jim","age" : 13, "gender" : "male",  "friends" : [ "Sarah” ] }

Example 2:

{ "name" : "broiler", "category" : "kitchen", "price" : 100, "cost" : 70 },
{ "name" : "toaster", "category" : "kitchen", "price" : 30, "cost" : 10 },
{ "name" : "blender", "category" : "kitchen", "price" : 50, "cost" : 25 },
{ "name" : "socks", "category" : "clothes", "price" : 5, "cost" : 2 },
{ "name" : "shirt", "category" : "clothes", "price" : 10, "cost" : 3 } 

I noticed that Mike raised the same issue on the 9th September on 'JSON in the wild':

https://lists.w3.org/Archives/Public/public-xsl-query/2015Sep/0009.html <https://lists.w3.org/Archives/Public/public-xsl-query/2015Sep/0009.html>

I followed the work around suggested in the replies. for example:

array {unparsed-text-lines($input) ! json-to-xml(.)}

This means that there are still remains no tests for fn:collection on JSON documents. Andy, please can you add fn:collection under the section J4.11.2 Status of 3.1 tests

kind regards,



-------------------------------
O'Neil Delpratt
Software Developer, Saxonica Limited 
Email: oneil@saxonica.com <mailto:oneil@saxonica.com>
Twitter: https://twitter.com/ond1 <https://twitter.com/ond1>
Tel: +44 118 946 5894
Web: http://www.saxonica.com <http://www.saxonica.com/>
Saxonica Community site: http://dev.saxonica.com <http://dev.saxonica.com/>
Bug tracking site: https://saxonica.plan.io/ <https://saxonica.plan.io/>

Received on Friday, 25 September 2015 14:10:14 UTC