W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2007

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


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-McQueen
Received on Thursday, 8 February 2007 13:19:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:11 UTC