Re: Restrictions and element namespaces

"Schwarzhoff, Kelly" <kelly.schwarzhoff@commerceone.com> writes:

> Yet more comments in KLS tags...

<snip/>

ht wrote
> 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 replies:

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

I'm sorry this isn't clearer, and there is a (not relevant to the
point at issue) erratum here.  But it does do the job, if you read it
carefully.

Think of this as a function definition  'validly derived from' is the
function.  D (a type definition), B (a type definition) and SS (a
subset of {extension, restriction[, list, union]}.

The function call is back in NameAndTypeOK:

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

so this 'calls' the TDOK 'function' with bindings:

   D -- R
   B -- B
  SS -- {extension, list, union}

Now re-read clause 1 with the bindings inserted:

  1 If B and R are not the same type definition, then the {derivation method}
    of R [extension] must not be in {extension, list, union}.

So the derivation is not OK.

The semantics of the subset argument is "These are derivation methods
which are _not_ allowed for the derivation to be OK".

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 Friday, 7 September 2001 03:34:54 UTC