W3C home > Mailing lists > Public > public-exi@w3.org > September 2015

Comments on JSON Schema of XSLT working group

From: Peintner, Daniel (ext) <daniel.peintner.ext@siemens.com>
Date: Tue, 15 Sep 2015 13:41:04 +0000
To: "public-exi@w3.org" <public-exi@w3.org>
Message-ID: <D94F68A44EB1954A91DE4AE9659C5A980FD63208@DEFTHW99EH1MSX.ww902.siemens.net>
All,

let me be the first to move a technical discussion to the public mailing list.

In the recent past we have been analyzing various ways to support JSON data in EXI. One straight-forward approach is to map JSON data to XML [1] by making use of an XML Schema [2] just like XSLT 3.0 does.

In the ideal case we could just use this schema "as is". However, we have been studying the schema [2] and would like to propose an extension so that EXI can make use of its datatype representations (i.e., represent dateTime values like "2014-02-04T18:50:45" more appropriately [3] than just as String).

Attached a diffed version of my proposed changes (see diff.htm). The HTML shows in orange the changes. On the left hand side one can see the original and the right hand side there is the updated XSD.

Please let me walk through the proposed changes and/or comments.

(*) The three orange sections are about the element "other" and its type "otherType". This opens EXI the possibility to use specific type-codecs for certain values. e.g., one can use the hexBinary element to encode binary data instead of xs:string or integer values encoded as integers and not as xs:double et cetera.

(*) The attributes "escaped" and "escaped-key" are XSLT specific and not necessary for EXI but do not hurt either.

I personally think these changes are important to have an optimal and easy EXI encoding.

An alternative to the current changes is about changing the type of element string from "j:stringType" to "xs:anySimpleType". This allows one to use the <string> element and cast it to an alternative type. e.g., <string xsi:type="xs:dateTime">2014-02-04T18:50:45</string>.
That said, it is possible but less compact and also less simple to implement.

Let us discuss next what is the appropriate way to proceed and get in touch with the XSLT group.

Thanks,

-- Daniel


[1] http://www.w3.org/TR/xslt-30/#json
[2] http://www.w3.org/TR/xslt-30/schema-for-json.xsd
[3] http://www.w3.org/TR/exi/#encodingDateTime
Received on Tuesday, 15 September 2015 13:41:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 15 September 2015 13:41:32 UTC