W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2001

Re: Sequence fixed attributes

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 20 Dec 2001 16:15:29 +0000
Message-ID: <8515623605.20011220161529@jenitennison.com>
To: "Gerson Mizuta Weiss" <weiss@cpqd.com.br>
CC: xmlschema-dev@w3.org
Hi Gerson,

> I would like to know if there is some way to define a xml schema
> where the attributes of an element must appear always in the same
> sequence at the xml instance. If some attribute appear in a diferent
> position, the parser should throw an error.

I'm afraid not. One of the basic XML 1.0 rules is that the order of
attributes is not significant, so there's no way that an XML processor
(or at least one that works on the infoset) can know what order
attributes were originally specified in.

If the order of some information is significant, then you need to
store that information in elements instead.



Jeni Tennison
Received on Thursday, 20 December 2001 11:15:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:56 UTC