- From: Michael Kay <mike@saxonica.com>
- Date: Fri, 13 May 2005 09:50:34 +0100
- To: "'Xiaofeng Wang'" <wangx49931@yahoo.com>, <xmlschema-dev@w3.org>
> Hi All, > > I can define a complexType A with a set of elements > using xs:all, xs:sequence, or xs:choice. I understand > the difference between them. What confuses me is that > if I want to define a new complexType B which extends > complexType A using xs:extension, will xs:all, > xs:sequence, and xs:choice have different impact on > the extension? > If the content model of A is MA, then when you define a new type B as an extension of A, giving it a content model of MB, the combined type is sequence (MA, MB) So if A was a choice of A1 or A2, and B is a choice of B1 or B2, the extended type is sequence (choice(A1, A2), choice(B1, B2)) This doesn't work with xs:all, which (IIRC) doesn't allow extension. Michael Kay http://www.saxonica.com/
Received on Friday, 13 May 2005 08:50:45 UTC