I have problems validating an XML document with a Schema XSD.
The error you give me is the following. I have another document to validate in which I get the same error. I do not understand what I'm missing.
Error at line 19, column 25: content of element declaration must match (annotation ?, (simpleType | complexType) ?, (unique | key | keyref) *)
XML
<?xml version="1.0" encoding="UTF-8"?>
<Videoteca data_creación="24/02/2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="peliculas.xsd">>
<Película id="1">
<Título>El santo</Título>
<TítuloOrixinal>The Saint</TítuloOrixinal>
<Ano>1997</Ano>
<Director>Phillip Noyce</Director>
<Xénero>Acción</Xénero>
<Duración>111</Duración>
<Actor principal="SI" sexo="home">
<Nome>Val Kilmer</Nome>
<DataNacemento>31/12/1959</DataNacemento>
</Actor>
<!-- Elisabeth Shue -->
<Actor principal="NO" id="51"/>
</Película>
<Película id="2">
<Título>¿Teléfono rojo? Volamos hacia Moscú</Título>
<TítuloOrixinal>Dr. Strangelove, or How I Learned to Stop Worrying and Love the Bomb</TítuloOrixinal>
<Ano>1963</Ano>
<Director>Stanley Kubrick</Director>
<Duración>90</Duración>
<Actor principal="SI" sexo="home">
<Nome>Peter Sellers</Nome>
</Actor>
</Película>
<Película id="3">
<Título>Leaving Las Vegas</Título>
<TítuloOrixinal>Leaving Las Vegas</TítuloOrixinal>
<Ano>1995</Ano>
<Director>Mike Figgis</Director>
<Xénero>Drama</Xénero>
<Duración>107</Duración>
<Actor principal="SI" sexo="home">
<Nome>Nicolas Cage</Nome>
<DataNacemento>7/01/1964</DataNacemento>
</Actor>
<!-- Elisabeth Shue -->
<Actor id="51" principal="SI"/>
<Actor sexo="home">
<Nome>Julian Sands</Nome>
</Actor>
</Película>
<Película id="4">
<Título>¿A quién ama Gilbert Grape?</Título>
<TítuloOrixinal>What's Eating Gilbert Grape?</TítuloOrixinal>
<Ano>1993</Ano>
<Director>Lasse Hallström</Director>
<Xénero>Drama</Xénero>
<Duración>118</Duración>
<!-- Johnny Depp -->
<Actor id="139" principal="SI"/>
<Actor sexo="muller">
<Nome>Juliette Lewis</Nome>
</Actor>
</Película>
</Videoteca>
XSD
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="Videoteca">
<xs:complexType>
<xs:sequence>
<xs:element name="Pelicula" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Tïtulo" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="TïtuloOrixinal" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Ano" type="xs:NMTOKEN" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Director" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Xénero" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Duración" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="data_creación" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="id" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType>
<xs:sequence>
<xs:element name="Actor" type="xs:string" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Nome" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="DataNacemento" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="principal" type="xs:string" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="SI"/>
<xs:enumeration value="NO"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="sexo" type="xs:string" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="home"/>
<xs:enumeration value="muller"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>