Re: final and derivation by list or union.

Hi,

> Schema Component Constraint: Simple Type Definition Properties
> Correct (in 3.14.6) says,
>
> 4 If the {base type definition} is not the ?simple ur-type definition?, 
>   all of the following must be true:
> 4.2.1 If the {variety} is list, then the {final} of the {base type
>       definition} must not contain list.
>
> Because {base type definition} of the list type is not simple
> ur-type definition only when derived by restriction from other list
> type, the cluase 4 above will match only such situation.

Yes. 4.2.1 applies when you have a restriction of a list type.

> Does this say I can't derive by restriction from list type which
> have the {final} that contains list ?

Yes. It means that if you have:

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

Then the restriction of dates to fiveToTenDates can only take place if
the dates simple type doesn't have a {final} that includes the value
'list'. For example, the restriction wouldn't be legal if the dates
simple type were defined with:

<xs:simpleType name="dates" final=".. list ...">
  <xs:list itemType="xs:date" />
</xs:simpleType>

or:

<xs:schema ... finalDefault="... list ...">

<xs:simpleType name="dates">
  <xs:list itemType="xs:date" />
</xs:simpleType>

...
</xs:schema>

Or at least that's my interpretation of what it's saying.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

Received on Wednesday, 14 November 2001 07:13:40 UTC