constraining an element to be either simple or complex content

Hi
 
Is there any way in XML schema to specify that an element contains either
simple content or complex content but not both?. For example:
<X>23</X> is valid and <X><Y>45</Y></X> is also valid but  not
<X>23<Y>45</Y></X>. Use of a "mixed" content model permits the first two
cases but does not exclude the last one. 
 
I have tried to extend a complex type containing complex content from a
complex type containing simple content. XML Spy version 4.0 allows this but
I understand from previous postings in this group that this is not a correct
XML schema construct. 
Is there any other schema specification mechanism that supports this ?
 
thanks for any help you can give on this
 
Kieran Dolan
 
Logica Mobile Networks
250 Brook Drive
Reading
United Kingdom


This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.

Received on Friday, 19 October 2001 10:00:01 UTC