Re: SimpleType/restriction ?

"Gregory M. Messner" <gmessner@breezefactor.com> writes:

> Following is the definition of <restriction> on a simpleType (from XML
> Schema Part 1: Structures):
> 
> <restriction 
>   base = QName 
>   id = ID 
>   {any attributes with non-schema namespace . . .}>
>   Content: (annotation?, (simpleType?, (minExclusive | minInclusive |
> maxExclusive | maxInclusive | totalDigits | fractionDigits | length |
> minLength | maxLength | enumeration | whiteSpace | pattern)*))
> </restriction>
> 
> Based on this definition, is the following XML Schema snippet valid?
> 
> <simpleType name="CryptoBinary">
>   <restriction base="base64Binary"></restriction>
> </simpleType>

Yes.

> Notice that the restriction has no content. If this is valid, then is the
> intent to just extend the "base64Binary" builtin type?

I don't see any sign of extension here. 

> Or assign a different name to the "base64Binary" builtin type?

I presume that's the purpose.

> I thought <restriction> was intended to restrict a new datatype to a
> *subset* of an existing type?

{a, b, c} _is_ a subset of {a, b, c}.  In discussing the overall
architecture, the Structures part of the REC says:

  "Any property value identified as a . . . subset of some set may be
   equal to that set, unless a proper . . . subset is explicitly
   called for."

This is the normal usage of these words/phrases in set theory, sorry
if it confused you.

ht
-- 
  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, 14 September 2001 07:51:06 UTC