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

RE: Restrictions and element namespaces

From: Schwarzhoff, Kelly <kelly.schwarzhoff@commerceone.com>
Date: Thu, 6 Sep 2001 12:19:37 -0700
Message-ID: <C1E0143CD365A445A4417083BF6F42CC979EE9@C1plenaexm07.commerceone.com>
To: "'ht@cogsci.ed.ac.uk'" <ht@cogsci.ed.ac.uk>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Yet more comments in KLS tags...

-----Original Message-----
From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk]
Sent: Thursday, September 06, 2001 11:34 AM
To: Schwarzhoff, Kelly
Cc: 'www-xml-schema-comments@w3.org'
Subject: Re: Restrictions and element namespaces


"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."

<KLS>
That part seems quite contradictory. It states:

"For a complex type definition (call it D, for derived) to be validly
derived from a type definition (call this B, for base) given a subset of
{extension, restriction} all of the following must be true:
1 If B and D are not the same type definition, then the {derivation method}
of D must not be in the subset. "

What does that mean? The derivation method, in this case, is extension. So,
yes, "extension" is in the subset of {extension, restriction}. However,
"restriction" is also in the subset of {extension, restriction}. So, if you
follow that logic, you can't use extensions OR restrictions. That means can
can't use any sort of base type/derived type relationships, as the only ones
available are restriction or extension, which doesn't make sense at all.
</KLS>

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 15:17:55 GMT

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