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

Re: complex type definition

From: Jeni Tennison <jeni@jenitennison.com>
Date: Mon, 22 Sep 2003 15:07:26 +0100
Message-ID: <50241388778.20030922150726@jenitennison.com>
To: Lingzhi Zhang <lzhang@cse.ogi.edu>
Cc: dev xmlschema <xmlschema-dev@w3.org>

Hi Stephen,

> I am wondering how to define this in XML schema.
>
> define type X { type Y, type Z }
>
> That is type X is a combination of complex type Y and complex type
> Z.

This probably isn't possible, at least not in the way you describe it.
In XML Schema, each complex type is derived from a single base complex
type, either restricting it or extending it (by adding extra elements
and attributes).

It might be that you can get the "combination" that you're after by
using model groups rather than (or in combination with) complex types
when you want to achieve this kind of modularity. Perhaps you can
provide an example of how you want the types to combine, and that
would help us help you to find the best way to achieve it.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Monday, 22 September 2003 10:07:36 GMT

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