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: <5.1.0.14.1.20021029133304.036c1a30@localhost>
To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>




All,

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:

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

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
one.
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
case.

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
mailbox. 
Received on Tuesday, 29 October 2002 15:35:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:01 GMT