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

Sequence fixed attributes

From: Gerson Mizuta Weiss <weiss@cpqd.com.br>
Date: Wed, 19 Dec 2001 16:15:24 -0500 (EST)
Message-ID: <7B3538F053C06142BF0AA9DF2D764AC6076974@MAILSRV1.aquarius.cpqd.com.br>
To: <xmlschema-dev@w3.org>

	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.
	Some Schema 
	<xs:attributeGroup name="Attributes">
		<xs:attribute name="A" use="required"/>
		<xs:attribute name="B" type="xs:boolean" use="required"/>
		<xs:attribute name="C" type="xs:string" default=" "/>

	<element  A="blabla" B="true" C="bla" />   !-- this should not throw an error

	<element  B="true" A="blabla" C="bla" />   !-- this should throw an error because A should come before B

Received on Thursday, 20 December 2001 10:25:25 UTC

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