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

Extending a schema by adding choices

From: Daniel Flippance <DFlippance@mpsbc.com>
Date: Thu, 23 Aug 2001 13:01:34 -0400 (EDT)
Message-ID: <CBD544BC645DD211895800105A11F2CEAD3DF6@MPSNTSERVER1>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
We are trying to define 2 schemas, one which allows 2 options in an
xsd:choice, and one which extends this and allows 3 options.
If one schema defines 2 choices of elements, can this list of choices be
extended in a deriving schema?

<xsd:complexType name="Contact">
      <xsd:element name="Telephone" type="xsd:string" />
      <xsd:element name="Fax" type="xsd:string" />

Allows for example:
  <Telephone>(123) 456 7890</Telephone>
  <Fax>(987) 654 3210</Fax>

I have used the basic xsd:string type for example only.

Is it possible to also allow the following in a deriving schema:


My guess is that this can't be done, but I wonder if the <xsd:extension>
element can be for this type of definition...

Daniel Flippance
Senior Software Engineer
Meridian Project Systems
Received on Friday, 24 August 2001 04:56:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC