W3C home > Mailing lists > Public > public-exi@w3.org > July 2008

RE: [EXI] N Bit encoding

From: Taki Kamiya <tkamiya@us.fujitsu.com>
Date: Thu, 10 Jul 2008 10:24:24 -0700
To: <santhana@huawei.com>, <public-exi@w3.org>
Message-ID: <D1FE347B619945AC81BB315E647A8B28@catarojp>

Hi Santhana,

The way values of type xsd:integer are assigned to an EXI built-in type
is not described very well in the 3rd working draft spec.

The case 2 that you described is close to what's expected.

The way it should be is as follows:

- When the bounded range of integer is 4095 or smaller as determined by the
  values of minInclusive, minExclusive, maxInclusive and maxExclusive
  facets, use n-bit Unsigned Integer representation.

- Otherwise, when the integer satisfies one of the followings, use Unsigned
  Integer representation.

  * It is nonNegativeInteger.
  * Either minInclusive facet is specified with a value equal to or greater
    than 0, or minExclusive facet is specified with a value equal to or
    greater than -1.

- Otherwise, use Integer representation.

It will be clarified in the next public working draft of the specification, which
should be published soon.




From: public-exi-request@w3.org [mailto:public-exi-request@w3.org] On Behalf Of santhanakrishnan
Sent: Tuesday, July 08, 2008 8:43 PM
To: public-exi@w3.org
Subject: [EXI] N Bit encoding

Hi EXI Experts
        For the encoding of N-Bit Unsigned integer I feel the EXI specification has some contradictions. Especially when it is used
for representing the Bounded Integer type from Schema.
Perception 1:
        When in the bounded integer the range is within 4095 then the offset from mininclusive is encoded. When the range is greater
than 4095 then Integer encoding is suggested for the same.
        For Integer encoding of positive number - 0(boolean) number(unsigned int) would be encoded
        For Integer encoding of negative number - 1(boolean) number(unsigned int) would be encoded

Perception 2:
        This is from the Table 7-1. Built-in EXI Datatypes. Here it says
* For integer without minInclusive or minExclusive facets, or with minInclusive or minExclusive facet of negative value(-ve Number)
- Integer
* For nonNegativeInteger or integer with minInclusive or minExclusive facet value of 0 or above(+ve number) - Unsigned Integer

There is a contradiction for the encoding of positive number when the range is greater than 4095 in the above cases.  The sign bit
0(boolean) is extra in case 1. Which approach has to be followed ? I observed that the prevalent EXI implementation Agile Delta is
following case 2 for bounded integers when they are out of bounds and positive. Please clarify in this regard.

Received on Thursday, 10 July 2008 17:25:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:43 UTC