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>

	Hi,
	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.
	
	Example:
	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=" "/>
	</xs:attributeGroup>
	....

	Instances
	<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


	Thanks,
		Gerson
Received on Thursday, 20 December 2001 10:25:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:25 GMT