[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Alternative tags in element?

From: Paul Steckler <Paul.Steckler@nicta.com.au>
Date: Thu, 30 Apr 2009 22:06:33 +1000
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <2EB36A07AAE8C44BBB1986425E7A22D00359D1986B@atp-mbx1.in.nicta.com.au>
Alternative tags in element?
Hi,

  I've just started working with XML Schema, so please forgive me if the answer to 
my question is obvious. 

  I want to create an element, say "Foo" that contains a sequence of elements which 
have different tags, say "Bar" and "Glob".  So these would be legal:

   <Foo><Glob/><Bar/></Foo>

  <Foo><Bar/><Glob/></Foo>

  <Foo><Bar/><Glob/><Bar/></Foo>

In the complexType for Foo elements, can you specify that it contains a sequence 
of alternative elements, in arbitrary order?  Or do I have to create a wrapper element 
for the alternatives and place them in a union?

Any help welcome ...

-- Paul
--
Paul Steckler
National ICT Australia
paul DOT steckler AT nicta.com.au
Received on Sunday, 3 May 2009 02:06:30 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.