Schema error: base is ComplexSimple

My schema contains the following:

<!-- ================================================== -->
<schema xmlns="http://www.w3.org/1999/XMLSchema"
        xmlns:my="myNamespace"
        xmlns:xlink="http://www.w3.org/1999/xlink"
        xmlns:xml="http://www.w3.org/XML/1998/namespace"
        targetNamespace="myNamespace"
        xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        xsi:schemaLocation="http://www.w3.org/1999/XMLSchema
                            http://www.w3.org/1999/XMLSchema.xsd"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified">

    <import namespace="http://www.w3.org/XML/1998/namespace"
            schemaLocation="http://www.w3.org/XML/1998/xml.xsd"/>

    <import namespace="http://www.w3.org/1999/xlink"
            schemaLocation="http://localhost/dummyXLink.xsd"/>

    <complexType name="LocalizedText" base="string"
        derivedBy="extension">
        <attribute  ref="xml:lang" use="default" value="en-US"/>
    </complexType>

    <complexType name="Title" base="my:LocalizedText"
        derivedBy="extension">
        <attribute  ref="xlink:type" use="fixed" value="title"/>
    </complexType>

</schema>
<!-- ================================================== -->

When I try to validate a document against this schema using Xerces 1.2.0, I
get the following schema errors:

Schema error: base is ComplexSimple, can't derive by extension in Title.
Schema error: Invalid child 'attribute' in complexType : 'Title', because it
restricts another complexSimpleType.

I have two questions:
(1) What is the real explanation for the error in 'Title', if any? and
(2) What does it mean to "restrict another complexSimpleType"? I am not
deriving by restriction anyway.

TIA,

Ramesh

Received on Wednesday, 18 October 2000 22:54:18 UTC