W3C home > Mailing lists > Public > public-exi@w3.org > April 2012

Request for comments on the issue of enumerations in list datatype

From: Takuki Kamiya <tkamiya@us.fujitsu.com>
Date: Wed, 25 Apr 2012 11:10:33 -0700
To: "public-exi@w3.org" <public-exi@w3.org>
Message-ID: <23204FACB677D84EBD57175AB7B5A71C01176D05F116@FMSAMAIL.fmsa.local>
Hi,

The EXI WG would like to hear inputs from the community about its plan
to clarify the EXI 1.0 specification in order to ascertain interoperability.

The WG recently discovered a case where the spec is not very clear as to
what it expects implementations to behave under an extremely rare schema 
usage.

The point in question is the difference between implementations in handling 
enumerated values of a list datatype. An example is a datatype defined as
a list of IDs with enumerated values, which is shown below.

<xsd:simpleType name="listOfIDsEnum">
  <xsd:restriction>
    <xsd:simpleType>
      <xsd:list>
        <xsd:simpleType>
          <xsd:restriction base="xsd:ID"/>
        </xsd:simpleType>
      </xsd:list>
    </xsd:simpleType>
    <xsd:enumeration value="AB BC CD"/>
    <xsd:enumeration value="EF FG GH"/>
    <xsd:enumeration value="IJ JK KL"/>
  </xsd:restriction>
</xsd:simpleType>

We found that some implementations disregard enumerated values when their 
datatype is a list unconditionally. This behaviour leads to disregard the
enumerated values in the above example, and use list datatype representation 
instead of a N-bit unsigned integer.

Others selectively disregard enumerated values for a list datatype only when 
its item type is derived from others by union and their subtypes, QName or 
Notation and types derived therefrom by restriction. This behaviour, unlike
the other, actually use N-bit unsigned integer to encode values that
matched one of the enumerations.

The relevant section 7.2 Enumerations [1] does not currently provide any
definitive answer to conclude which of the two behaviour is more correct.
The WG is inclined to clarify it to legitimize only the first interpretation
and resulting behaviour given the extreme rarity of such schema usage 
in addition to the consideration of implementation simplicity that should
benefit all implementations.

Please let us know if there are any comments or questions as soon as
possible.

[1] http://www.w3.org/TR/2011/REC-exi-20110310/#encodingEnumerations


Sincerely,
Takuki Kamiya
for the EXI Working Group
Received on Wednesday, 25 April 2012 18:11:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:47:16 UTC