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

RE: [EXI] N Bit encoding

From: Taki Kamiya <tkamiya@us.fujitsu.com>
Date: Fri, 11 Jul 2008 15:22:45 -0700
To: <santhana@huawei.com>, <public-exi@w3.org>
Message-ID: <7410E1C64BDC44CCB7BC3E027DFE3B71@catarojp>

Hi Santhanakrishnan,

The time component is hard-coded to be encoded as 17-bit Unsigned Integer
in the spec, not determined by 12 bits criteria as is done for values typed as
xsd:integer.

In general, the values of Time component span evenly across the range,
therefore n-bit unsigned integer should work well, as it does for event codes.

Hope it helps,

-taki

-----Original Message-----
From: public-exi-request@w3.org [mailto:public-exi-request@w3.org] On Behalf Of santhanakrishnan
Sent: Thursday, July 10, 2008 9:56 PM
To: 'Taki Kamiya'; public-exi@w3.org
Subject: RE: [EXI] N Bit encoding



Hi Taki
	Thank u very much for your response. In the Date-Time data type for
'time' it is mentioned that it has to be encoded as 17 bit unsigned integer.
How is it possible by definition of n-bit unsigned integer which has a
constraint of 12 bits maximum.

Regards
Santhanakrishnan

-----Original Message-----
From: public-exi-request@w3.org [mailto:public-exi-request@w3.org] On Behalf
Of Taki Kamiya
Sent: Thursday, July 10, 2008 10:54 PM
To: santhana@huawei.com; public-exi@w3.org
Subject: RE: [EXI] N Bit encoding


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.

Thanks!

-taki


________________________________

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.

regards
Santhanakrishnan
Received on Friday, 11 July 2008 22:23:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 October 2008 18:12:36 GMT