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

AW: integer in EXI4JSON

From: Peintner, Daniel <daniel.peintner.ext@siemens.com>
Date: Wed, 8 Mar 2017 15:40:39 +0000
To: Takuki Kamiya <tkamiya@us.fujitsu.com>, "public-exi@w3.org" <public-exi@w3.org>
Message-ID: <D94F68A44EB1954A91DE4AE9659C5A980FFFD47D@DEFTHW99EH1MSX.ww902.siemens.net>
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
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 Wednesday, 8 March 2017 15:41:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 15:41:34 UTC