Shouldn't this restriction be invalid?

I'm trying to understand what is going on with the following restriction,
which originates in [].
This is valid according to XSV, and invalid according to XML Spy.

>From the documentation, "The SimpleLiteral complexType is defined in
terms of mixed complexContent. However, the cardinality attributes on
the xs:any element dictate that this complexType does not permit child
elements."  Here's the definition of SimpleLiteral:

<xs:complexType name="SimpleLiteral">
  <xs:complexContent mixed="true">
    <xs:restriction base="xs:anyType">
        <xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
      <xs:attribute ref="x:lang" use="optional"/>

The following type, W3CDTF, is defined as a restriction of SimpleLiteral.
Note that it specifies simpleContent instead of complexContent.

<xs:complexType name="W3CDTF">
    <xs:restriction base="SimpleLiteral">
        <xs:union memberTypes="xs:gYear xs:gYearMonth xs:date xs:dateTime"/>
      <xs:attribute ref="x:lang" use="prohibited"/>

Is this a legal derived type?  Why don't the validators agree?
Thanks for any explanations or advice.

Steven Bird

Steven Bird        Email: <>  Web:
A/Prof, Dept of Computer Science, University of Melbourne, Vic 3010, AUSTRALIA
Senior Research Assoc, Linguistic Data Consortium, University of Pennsylvania

Received on Wednesday, 2 October 2002 15:44:29 UTC