Re: [Moderator Action] Extending attributes

"Bob Schloss" <> writes:

> On 2001Mar09 04:10AM Henry wrote:
> > "and even in the case of complex types, you can't add back something once
> > you've taken it away".
> Does this mean that if complexType B restricts complexType A (perhaps by
> making the last particle of the sequence maxOccurs="0"), and complexType C
> is derived from complexType B, and complexType D extends from complexType
> C, it cannot change the maxOccurs back to 1 for the particle?
> What section of the spec explains this?

The reference here is to clause 1.5 of [1] and the subsequent note:

  "1.5 It must in principle be possible to derive the complex type
  definition in two steps, the first an extension and the second a
  restriction (possibly vacuous), from that type definition among its
  ancestors whose {base type definition} is the ur-type definition.

   "NOTE: This requirement ensures that nothing removed by a
   restriction is subsequently added back by an extension. It is
   trivial to check if the extension in question is the only extension
   in its derivation, or if there are no restrictions bar the first
   from the ur-type definition.

   "Constructing the intermediate type definition to check this
   constraint is straightforward: simply re-order the derivation to
   put all the extension steps first, then collapse them into a single
   extension. If the resulting definition can be the basis for a valid
   restriction to the desired definition, the constraint is satisfied."

> My concern is that if another schema <include>s the schema with complexType
> C defined, the "effective content model"  for C is not the only thing that
> needs to be thought about before extending it, but also any restrictions
> that have happened in its ancestor types.

Another place where laziness is more-or-less implied, I guess.

Having said that, I'm not convinced the constraint actually has any
teeth.  That is, I can't come up with a case it would rule out, as

Consider e.g. (a,b,c?)

restrict this to (a,b)

now extend to (a,b,c,d)

This is _not_ ruled out, because it's equivalent to

extend to (a,b,c?,d)

restrict to (a,b,c,d).

So can anyone construct a case which the constraint as formulated
actually rules out?


  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail:

Received on Monday, 19 March 2001 08:48:21 UTC