Re: final and derivation by list or union.

Jeni Tennison writes:
 > >  ><xs:simpleType name="dates">
 > >  >  <xs:list itemType="xs:date" />
 > >  ></xs:simpleType>
 > >  >
 > >  ><xs:simpleType name="fiveToTenDates">
 > >  >  <xs:restriction base="dates">
 > >  >    <xs:minLength value="5" />
 > >  >    <xs:maxLength value="10" />
 > >  >  </xs:restriction>
 > >  ></xs:simpleType>
 >
 > > Such derivation is not only 'derivation by list' but also
 > > 'derivation by restriction' ?

Not precisely.  It is a derivation by restriction from a type that was
derived by list.  There are two derivations, each by a different
means.

 > Um, well technically simple types are all derived by
 > restriction. If an xs:simpleType element has a xs:restriction
 > element inside, the simple type is derived by restriction from the
 > simple type referred to by the base attribute on that
 > xs:restriction. If the xs:simpleType element has a xs:list or
 > xs:union element inside, then it's derived by restriction from the
 > simple ur-type definition.

This is confusing at best, and wrong in my view.  From part 2, section
4.1.2:

    A derived datatype can be derived from a primitive datatype or
    another derived datatype by one of three means: by restriction, by
    list or by union.

The base type of lists and unions, as you imply, is anySimpleType, but
that is not the type from which they derive.

- Roß

---
The art of medicine consists in amusing the patient while nature cures
the disease.				-- Voltaire

Received on Thursday, 15 November 2001 11:15:06 UTC