W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2002

xml attributes

From: Wood, Marcus <Marcus.Wood@egg.com>
Date: Tue, 29 Oct 2002 13:33:07 -0700
Message-Id: <>
To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>


I'm trying to implement a solution using xml schemas.  The problem I am
having is one concerend with xsd:attributes.  I would like to know how, if
possible you can declare two attributes but only require one or other but
not both.

An example would be as follows:

			<element refs>
only one of these attributes is needed!
	<attribute att1 type="xsd:string"/>	
	<attribute att2 type="xsd:string"/>

If i enter a choice around the two attributes its not allowed.  If i make
both attributes optional then neither can be present and I need one and only
I've tried attribute groups but choice is not allowed in their either.

All the exmaples Ive happened upon show multiple attributes but they are all
either optional or required their never seems to be a description of my

Any ideas?

Comments are greatly appreciated

Kind Regards

Marcus Wood

This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
Received on Tuesday, 29 October 2002 15:35:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:59 UTC