W3C home > Mailing lists > Public > public-exi@w3.org > March 2017

RE: integer in EXI4JSON

From: Takuki Kamiya <tkamiya@us.fujitsu.com>
Date: Mon, 20 Mar 2017 14:38:16 -0700
To: "Peintner, Daniel" <daniel.peintner.ext@siemens.com>, "public-exi@w3.org" <public-exi@w3.org>
Message-ID: <23204FACB677D84EBD57175AB7B5A71C0444EA03444B@FMSAMAIL.fmsa.local>
Hi Daniel,

Making "integer" as prominent as "float" makes sense to me.

I agree to your proposal to have numberTypeNew to wrap both
floatNumber and integerNumber.

Thank you,

Takuki Kamiya
Fujitsu Laboratories of America


From: Peintner, Daniel [mailto:daniel.peintner.ext@siemens.com]
Sent: Wednesday, March 08, 2017 7:41 AM
To: Takuki Kamiya <tkamiya@us.fujitsu.com>; public-exi@w3.org
Subject: AW: integer in EXI4JSON


Hi,

I would like to give integer more "visibility" but this would increase event-code length in two places

* DocContent grammar
  from 8 productions (3 bits) to 9 productions (4 bits).

* array grammar
  from 8 productions (3 bits) to 9 productions (4 bits).

An alternative might be to define number differently.

Currently it is defined as follows

    <xs:simpleType name="numberType">
        <xs:restriction base="xs:double">
            <!-- exclude positive and negative infinity, and NaN -->
            <!-- Note: No real effect for EXI Float datatype -->
            <xs:minExclusive value="-INF"/>
            <xs:maxExclusive value="INF"/>
        </xs:restriction>
    </xs:simpleType>

We could create a complex type with a choice

    <xs:complexType name="numberTypeNew">
        <xs:choice>
            <xs:element name="floatNumber" type="xs:double"/>
            <xs:element name="integerNumber" type="xs:integer"/>
        </xs:choice>
    </xs:complexType>

Doing so would increase the event-code only for numbers and not all types.

What do you think?

-- Daniel





________________________________
Von: Takuki Kamiya [tkamiya@us.fujitsu.com]
Gesendet: Montag, 6. März 2017 23:45
An: public-exi@w3.org<mailto:public-exi@w3.org>
Betreff: integer in EXI4JSON
Hi,

In EXI4JSON [1], "integer" needs to be represented as a child of "other" element.
Please see appendix B "XML Schema for EXI4JSON".

It would be nice if "integer" is defined as belonging to substitution group of "number"
element.

When one creates a dedicated schema instead of the generic schema provided
in the spec, this makes more sense, I think.

With the change, a schema will be able to expect "number", and the instance document
still can use "integer" in the same context.

Thank you,

[1] http://www.w3.org/TR/2016/WD-exi-for-json-20160823/#schema-exi4json

Taki Kamiya
Fujitsu Laboratories of America
Received on Monday, 20 March 2017 21:39:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 20 March 2017 21:39:03 UTC