Validation XML: "Aucun élément enfant n'est attendu à ce stade"

Je suis en train de développer un XSD grammaire selon un fichier XML. Le fichier XML itemList.xml est comme ci-dessous.

<?xml version="1.0" encoding = "utf-8"?>
<itemList 
    xmlns="http://www.w3schools.com" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://www.w3schools.com  itemList.xsd" >
     <item>spoon</item>  
     <item>knife</item>
     <item>fork</item>  
     <item>cup</item>
</itemList>

La itemList.xsd fichier que j'ai développé est comme ci-dessous.

<schema 
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:co="http://www.w3schools.com"
    targetNamespace="http://www.w3schools.com" 
    elementFormDefault="qualified">
<simpleType name="itemType">
    <restriction base="string"/>
</simpleType>
<complexType name="itemListType">
    <sequence>
        <element name="item" type="co:itemType"/>
    </sequence>
</complexType>
<element name="itemList" type="co:itemListType"/>
</schema>

Quand j'ai valider le XML contre le XSD en utilisant ce validateur XMLj'obtiens l'erreur

Cvc-complex-type.2.4.d: Invalid Content Was Found Starting With Element 'item'. No Child Element Is Expected At This Point.. Line '6', Column '12'.

Il semble que je réécris mon complexType dans itemList.xsdmais je ne suis pas sûr de quoi faire. Un grand merci à celui qui pourrait les aider.

source d'informationauteur goldfrapp04