- From: Lingzhi Zhang <lzhang@cse.ogi.edu>
- Date: Mon, 22 Sep 2003 11:01:24 -0700 (PDT)
- To: dev xmlschema <xmlschema-dev@w3.org>
Jeni, Thanks for your response. I wish to define a type X which just include type definition of Y and Z, then declare a element which has type X. I understand what you meant. I think it is probably impossible the way I was planning to do. However, using group could do but in the other way. Thanks. Stephen On Mon, 22 Sep 2003, Jeni Tennison wrote: > 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 14:01:25 UTC