|
[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Abstract types in substitution groups
From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Thu, 8 Feb 2007 06:19:43 -0700 Message-Id: <BB87A262-3DD0-4E3F-9463-8A1C9CD5EB33@acm.org> Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>, "Michael Kay" <mike@saxonica.com>, <xmlschema-dev@w3.org> To: "Pete Cordell" <petexmldev@tech-know-ware.com> On 8 Feb 2007, at 05:38 , Pete Cordell wrote: > > So does the abstractness of the type become a property of the > element? i.e. > > <xs:element name='myElement' type='abstractType'/> > > is equivalent to: > > > <xs:element name='myElement' type='abstractType' abstract='true'/> > ? Not quite. They do have at least one consequence in common, but they do not produce the same set of schema components. In the one case, it's the type that's marked abstract; in the other, it's the element. And concretely, as Mike Kay's description implies, the two declarations have different consequences for the document instance. Neither allows an element instance like <myElement>...</myElement> but if the schema defines 'concreteType' as a concrete type derived from abstractType, then the first declaration allows <myElement xsi:type="concreteType">...</myElement> to appear in the document -- it is the type which is abstract, not the element. The second declaration, by contrast, does not allow such an element instance. --C. M. Sperberg-McQueenReceived on Thursday, 8 February 2007 13:19:19 GMT |
Subscribe in XML format
|






