W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

restricting minOccurs on a choice tag

From: Shane Lauf <srl01@uow.edu.au>
Date: Wed, 11 Aug 2004 16:12:42 +1000
To: <xmlschema-dev@w3.org>
Message-ID: <E1BumMt-0002WL-Ui@frink.w3.org>

For the following part of a schema, which defines an AbstractObject which
has two possible child elements AnotherObjectA and AnotherObjectB, is there
a way that I can derive AbstractObject into a concrete element Object where
the minOccurs="0" is no longer on the choice - i.e. forcing (restricting)
Object to have *at least one* of the child objects present? I know I can
derive and restrict when the minOccurs="0" is on a single element, but not
sure about when it is on a choice.

  <element name="AbstractObject" type="did:AbstractObjectType"
  <complexType name="AbstractObjectType">
      <extension base="did:AbstractObjectBaseType">
          <choice minOccurs="0"> <!--***-->
            <element ref="AnotherObjectA"/>
            <element ref="AnotherObjectB"/>


Received on Wednesday, 11 August 2004 06:13:48 UTC

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