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

Using either simple or element content

From: Dolan, Kieran <DolanK@logica.com>
Date: Thu, 18 Oct 2001 13:37:26 -0400 (EDT)
Message-ID: <ABDA876D71F9D211B39D0090274EA8E20990ABA2@Floyd.logica.co.uk>
To: xmlschema-dev@w3.org
Is there any way in XML schema to specify that an element can either contain
some text or else contains specific elements. 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 forbid the latter. 
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 mechanism that can support this ?
thanks for any help you can give on this
Kieran Dolan
Logica Mobile Networks
250 Brook Drive
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 Sunday, 21 October 2001 15:55:03 UTC

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