W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2010

XSD: Conditional type definition

From: Ralph Kutschera <news2010@ecuapac.at>
Date: Wed, 10 Mar 2010 16:44:11 +0100
Message-ID: <4B97BE4B.40904@ecuapac.at>
To: xmlschema-dev@w3.org
Dear list,

   I'm relatively new to XSD and would like to perform the following:


I have an XML-element like this:
<anElement type="ONE">
   <ONEelement />
</anElement>

<anElement type="TWO">
   <TWOelement />
</enElement>

So there is the "anElement" and depending on its type the subelements 
are different. Is there a way to declare this behaviour with XSD?

TIA,
   Ralph
Received on Wednesday, 10 March 2010 16:16:06 GMT

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