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

allowing zero to unbounded elements in any order?

From: Sam Carleton <sam@linux-info.net>
Date: Fri, 14 Mar 2003 06:31:56 -0500
To: xmlschema-dev <xmlschema-dev@w3.org>
Message-ID: <20030314113156.GA11611@miltonstreet.com>

I am trying to define a element that contains text and can
optionally contain one or more <b> elements and/or <i> elements in
any order.  How do I define that?  This is what I have so far:

  <xs:complexType name="stringType" mixed="true">
    <xs:all minOccurs="0">
      <xs:element ref="b"/>
      <xs:element ref="i"/>
    </xs:all>
  </xs:complexType>
  <xs:element name="i" type="xs:string"/>
  <xs:element name="b" type="xs:string"/>

Sam
Received on Friday, 14 March 2003 06:31:58 GMT

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