W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2001

Re: Restrictions and element namespaces

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 06 Sep 2001 19:34:05 +0100
To: "Schwarzhoff, Kelly" <kelly.schwarzhoff@commerceone.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Message-ID: <f5bsne0f9sy.fsf@cogsci.ed.ac.uk>
"Schwarzhoff, Kelly" <kelly.schwarzhoff@commerceone.com> writes:

> More comments below in KLS tags...
> 
> -----Original Message-----

<snip/>

> 2) Even if you changed to form="unqualified", which would solve _that_ 
>    problem, tns:newShipType is not a restriction of sns:ShipType, it's an 
>    extension, which is not allowed.
> <KLS>
> The spec seems to say otherwise.
> 
> The rules for element restriction are under the section, "Schema Component
> Constraint: Particle Restriction OK (Elt:Elt -- NameAndTypeOK)". In
> particular, the rules for restraining types are:
> "R's {type definition} is validly derived given {extension, list, union}
> from B's {type definition} as defined by Type Derivation OK (Complex)
> (3.4.6) or Type Derivation OK (Simple) (3.14.6), as appropriate. "
> And, following the link for "Type Derivation OK (Complex)", we see it says,
> "2 One of the following must be true:"..."2.2 B must be D's {base type
> definition}. "
> 
> So, in the case below, sns:ShipType is the basetype of tns:newShipType, so
> the "One of the following must be true" is fulfilled, which means the "Type
> Derivation OK" is fulfilled.

But you've skipped the part of [1] where the "given {extension, list, union}" 
is interpreted -- none of the members of that set can figure in the
derivation:

  "1 If B and D are not the same type definition, then the {derivation
     method} of D must not be in the subset."

ht

[1] http://www.w3.org/TR/xmlschema-1/#cos-ct-derived-ok
-- 
  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: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Thursday, 6 September 2001 14:33:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:51 GMT