Re: a small document about XML Schema <sequence> vs <all> constructs

As usual Mike, your views are nice to know. My replies are inline please.

On 27 July 2016 at 13:07, Michael Kay <mike@saxonica.com> wrote:

> There are some cases where there clearly should be an order: in a table,
> the head comes before the body. (But why? Only because we are used to
> thinking of it that way. We could argue that this is purely a conventional
> way of presenting the table, and nothing to do with its semantics.)
>

I agree.


> So from a usability perspective, it's a tough call, but one could probably
> say that imposing order makes things a little harder for authors and a
> little easier for readers.
>

I agree. This is a good point.


> Note also that the human authors of this document have tended to be very
> consistent in the way attributes are ordered, even though the schema
> imposes no constraints. When, after a transformation, the dependency
> element reads  <dependency value="XQ31+" type="spec"/>, that really
> upsets the human reader.
>

This is a good point too. I think, as you said the schema imposes no
constraints on attribute ordering (it cannot, because XML itself says that
attribute ordering is not predictable).



> In fact, that's why I added a serialization property to Saxon to allow you
> to control attribute order on output.
>

I think, this is something nice you've done with Saxon's XSLT processor.


>
> If you're dealing with a vocabulary like GML that is never authored or
> read by humans, then these usability factors play no role, and it's even
> harder to find any good reason for deciding between sequence and all.
>

Thanks for telling about this, and I agree.


> There is certainly a good argument for saying that if the ordering carries
> no semantic information, there is no case for the schema to impose an order.
>

Found it little harder to grasp meaning of this. But it is correct.



-- 
Regards,
Mukul Gandhi

Received on Wednesday, 27 July 2016 11:54:00 UTC