Re: Fw: SimpleType, SimpleContent, Redefine

Thanks for this response, 

> >  I would like to know if the following compleType defintion is allowed:
> > 
> >  <xs:complexType name="unit">
> >        <xs:simpleContent>
> >             <xs:extension base="xs:integer"/>
> >        </xs:simpleContent>
> >   </xs:complexType>
> 
> Yes, why not ;=) ?
> 
> >  It seems to be equivalent than :
> > 
> >  <xs:simpleType name="unit">
> >      <xs:restriction  base="xs:integer"/>
> >  <xs:simpleType>
> 
> Not really, simple and complex types are very different beasts (despite 
> similarities which are IMO exagerated in the W3C Recommendation) and the 
> kind of derivations which you will be able to do on those types is 
> different.


My initial understanding of the difference was that simpleType was used
for data (i.e. content of leaf nodes) and complexType for "structured" content
model (including attribute definitions).

So, it means that the way to decide if I use a simpleType or a complexType for
defining "unit" is driven by the usage (in term of derivation) of it ? 
And not by the content model it describes ?

Then imagine that I want to use unit for
1- apply a facet (for example maxExclusive) for defining a particular limited unit
AND
2- define a complexType  in an other schema (importing this one) by redefine
mecanism

I can't do this because :
1- implies to use a simpleType
2- implies to use a complexType


Regards,

-- bruno -- 
Bruno Chatel
Tel : (+33)[0] 4 96 11 14 57
Email : bcha@chadocs.com
http://www.chadocs.com
----------------------------------------

Received on Wednesday, 20 March 2002 14:37:11 UTC