Re: A complex type cannot be a restriction of a simpleType ??

Anli Shundi <ashundi@tibco.com> writes:

> It is not alright:  
> 
> > >   <xsd:complexType name="ID">
> > >     <xsd:simpleContent>
> > >       <xsd:restriction base="element">
> > >         <xsd:pattern value="[A-Z\d]*"/>
> > >       </xsd:restriction>
> > >     </xsd:simpleContent>
> > >   </xsd:complexType>
> 
> the complexType "ID" should have instead been a simpleType.
> 
> http://www.w3.org/TR/xmlschema-1/#src-ct point 2 is fulfilled but
> point 2 of http://www.w3.org/TR/xmlschema-1/#ct-props-correct is not:
> 
> 2 If the {base type definition} is a simple type definition, the {derivation
> method} must be extension. 

But the base is _not_ a simple type definition, it's a complex type
definition with simple content, and it's perfectly OK to restrict
that.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, 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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]

Received on Monday, 7 October 2002 13:11:44 UTC