I do not know why the validator on this page ( link ) tells me that I have the wrong XSD document.
The error that gives me concretely is:
Not valid. Error - Line 5, 58: org.xml.sax.SAXParseException;
lineNumber: 5; columnNumber: 58; s4s-elt-invalid-content.1: The content of 'record' is invalid. Element 'element' is invalid, misplaced, or occurs too often.
The XSD document is:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="ficha">
<xs:attribute name="numero" type="xs:decimal"/>
<xs:element name="nombre" type="xs:NMTOKEN"/>
<xs:element name="edad" type="xs:decimal"/>
</xs:complexType>
</xs:schema>
The XML document is:
<?xml version="1.0" encoding="UTF-8"?>
<fichas xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemalLocation="fichas.xsd">
<ficha numero="1">
<nombre>Ana Sanz Tin</nombre>
<edad>22</edad>
</ficha>
<ficha numero="2">
<nombre>Iker Rubio Mol</nombre>
<edad>23</edad>
</ficha>
</fichas>