I tried to create a XML Schema for a dataset, but I got these errors:
The "Extra content at the end of the document" error appeared when i tried to open the XML file.
The "The markup in the document following the root element must be well-formed" error from the EditiX XML Editor.
The "Multiple possible root nodes found" error from the https://codebeautify.org/xmlvalidator.
The errors 1 and 3 appear at the 129 line and the error 2 at the 128 line, which are under the XML Schema, at the first 2 lines of the dataset.
Here is the code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
<xs:complexType name="Chessdata">
<xs:element name="NumberofGame" type="xs:integer">
<xs:simpleContent>
<xs:restriction base="xs:integer">
<xs:pattern value="([0-9])+"/>
</xs:restriction>
</xs:simpleContent>
</xs:element>
<xs:element name="GameID" type="xs:string">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9][a-zA-Z0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="WhiteRating" type="xs:integer">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:pattern value="([0-9])+"/>
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OpeningECO" type="xs:string">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z][0-9][0-9]"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OpeningPly" type="xs:integer">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="([0-9])+"/>
</xs:restriction>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:complexType>
</xs:schema>
Here is the how the dataset is:
<Records>
<Record>
<Row B="GameID" C="WhiteRating" E="OpeningECO" F="OpeningPly" A="NumberofGame" />
</Record>
<Record>
<Row A="0" B="J7Xvjkte" C="1441" E="C20" F="4" />
</Record>
................................................................................................................
<Record>
<Row A="18636" B="JGfeESug" C="1256" E="C00" F="3" />
</Record>
</Records>
Do you know how can I fix them?
P.S. I am a totally beginner on XSD who learnt the basics in order to make a project for the university and it is my first post on the Stack Overflow so sorry if the issue with the errors is something simple and sorry if I didn't explain something properly.