Re: EXI LC Comments

Hello Youenn,

FABLET Youenn <Youenn.Fablet@crf.canon.fr> writes:

> 6) Is it conformant to not follow the attribute order in the case of a
> schema-informed grammar encoded element in deviation mode? As stated
> in section 6, it seems not conformant. In some cases, grammars can
> support attributes in no particular order, such as the example below
> (correct me if I got something wrong).
> <xs:complexType name="test">
>                 <xs:attribute name="name" type="xs:string"/>
>                 <xs:anyAttribute namespace="#any"/>
> </xs:complexType>
> <xs:element name="test" type="test"/>
>
> While the benefit of ordering the attributes at the grammar level and
> the general compression benefit for encoders to follow the given order
> are obvious, I do not see compelling reasons of including this
> constraint in the format itself. At the encoder side, the encoder may
> decide to order attributes or not. If encoding fails due to bad
> ordering (in strict mode) or if the compression ratio is bad, the
> encoder can always decide to order the attributes. At the decoder
> side, the decoder is only following the grammars so it does not really
> care about the ordering. There is even a drawback as this is one
> (major ?) difference between schema-informed and schema-less
> processing. Am I missing something obvious?

Thanks for your comment.

You are not missing anything. There is indeed no reason, when seen
purely from the interoperability point of view, to require a specific
ordering of the attributes when strict is false. When the encoder does
not order the attributes, the out-of-place attributes will just get
encoded as deviations, which is understandable by the decoder, as you
say.

We will change the specification so that it no longer requires the
attributes to be sorted in either kind of stream, excepting naturally
the case when strict is true. Also, the xsi:type and xsi:nil
attributes still have to come first, since their presence affects the
grammar used for the rest of the element content.

The specification will still strongly recommend the attributes to be
ordered for any element that is encoded with a schema-informed
grammar, as not ordering them will hurt compactness. In particular,
when there are multiple mandatory attributes, not ordering them may
cause also the content of that element, not just the attribute list,
to be encoded as deviations.

-- 
Jaakko Kangasharju, Helsinki University of Technology
Kokoo kokoon koko kokko! Koko kokkoko? Koko kokko!

Received on Thursday, 14 May 2009 06:35:04 UTC