| source |
<xs:complexType name="GameType">
<xs:annotation>
<xs:documentation>A single chess game.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Info">
<xs:annotation>
<xs:documentation>defines the black and white player contents</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Event">
<xs:annotation>
<xs:documentation>Event related information. At least the name is required.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<xs:element name="Name" type="xs:string">
<xs:annotation>
<xs:documentation>Name of the Event</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Sponsor" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The name of the sponsor of the Event.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Site" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>This includes city and region names along with the IOC standard name for the country.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Round" minOccurs="0">
<xs:annotation>
<xs:documentation>The playing round ordinal of the game</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d+((\.\d)*)"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Stage" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>This is used for the stage of a multi-stage event, such as "preliminary" or "Semifinal".</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Section" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>This is used for the playing section of the event, such as "open" or "reserve".</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Board" type="xs:positiveInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>The board number in a team event or simultaneous exhibition.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Date" type="xs:date" minOccurs="0">
<xs:annotation>
<xs:documentation>This is the starting date of the event.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="Date" type="xs:date" minOccurs="0">
<xs:annotation>
<xs:documentation>Starting date of the game. Note this is not necessarily the same of the starting date of the event.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="White">
<xs:annotation>
<xs:documentation>List of White player or players. At least 1 player is required.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Player" type="ch:PlayerType" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>White player information</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Black">
<xs:annotation>
<xs:documentation>List of Black player or players. At least 1 player is required.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Player" type="ch:PlayerType" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Black player information</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Result" type="ch:EndType"/>
<xs:element name="Opening" minOccurs="0">
<xs:annotation>
<xs:documentation>Opening information is optional.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="xs:string">
<xs:annotation>
<xs:documentation>The name of the opening</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Variation" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>A major variation of the opening</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Eco" minOccurs="0">
<xs:annotation>
<xs:documentation>The Encyclopedia of Chess Openings code. Form is Xdd where X is A-E, and dd is 2 digits.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[A-E]\d\d"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Nic" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The New in Chess code.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TimeControl" minOccurs="0">
<xs:annotation>
<xs:documentation>The types of time controls are: Elapsed, Incremental, SandClock.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice>
<xs:element name="Other" type="xs:string"/>
<xs:element name="Elapsed">
<xs:annotation>
<xs:documentation>This is the list of Time Controls used for this game. Usually there is more than 1, except for blitz games.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Control" type="ch:TimeControlType" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>A specified Time Control for a period</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Incremental">
<xs:annotation>
<xs:documentation>An incremental time period, where an initial time allocation is provided, and then additional time is added for each move.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Time">
<xs:annotation>
<xs:documentation>The initial number of minutes or seconds allocated for the period.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice>
<xs:element name="Minutes" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation>The initial number of minutes allocated.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Seconds" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation>The initial number of seconds allocated.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="Increment" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation>The number of extra seconds added after each move is made.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="SandClock" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation>A SandClock, also called Hourglass. The time control is implemented as if a sandclock were set at the start of the period with an equal amount of sand in each of the two chambers and the players invert the sandclock after each move with a time forfeit indicated by an empty upper chamber. The time is specified in seconds.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="Annotator" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>Identifies the annotator or annotators of the game.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Mode" minOccurs="0">
<xs:annotation>
<xs:documentation>Gives the playing mode of the game.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Over the board"/>
<xs:enumeration value="Paper mail"/>
<xs:enumeration value="Electronic mail"/>
<xs:enumeration value="Internet Chess Server"/>
<xs:enumeration value="General telecommunication"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="PlyCount" type="xs:positiveInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>Gives the number of ply (moves) in the game.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Fen" minOccurs="0">
<xs:annotation>
<xs:documentation>A description of initial board position in Forsyth-Edwards Notation.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="ActiveColor">
<xs:annotation>
<xs:documentation>An enumeration of the color that is on move: white or black.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="white"/>
<xs:enumeration value="black"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CastlingAvailability">
<xs:annotation>
<xs:documentation>Enumeration of the available castling square KQ for white Kingside/Queenside, kq for black Kingside/Queenside.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="KQkq"/>
<xs:enumeration value="KQk"/>
<xs:enumeration value="KQq"/>
<xs:enumeration value="KQ"/>
<xs:enumeration value="Kkq"/>
<xs:enumeration value="Kq"/>
<xs:enumeration value="Kk"/>
<xs:enumeration value="K"/>
<xs:enumeration value="Qkq"/>
<xs:enumeration value="Qq"/>
<xs:enumeration value="Qk"/>
<xs:enumeration value="Q"/>
<xs:enumeration value="kq"/>
<xs:enumeration value="q"/>
<xs:enumeration value="k"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EnPassantTargetSquare" minOccurs="0">
<xs:annotation>
<xs:documentation>The target square, if any, of an EnPassant capture.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a3"/>
<xs:enumeration value="b3"/>
<xs:enumeration value="c3"/>
<xs:enumeration value="d3"/>
<xs:enumeration value="e3"/>
<xs:enumeration value="f3"/>
<xs:enumeration value="g3"/>
<xs:enumeration value="h3"/>
<xs:enumeration value="a6"/>
<xs:enumeration value="b6"/>
<xs:enumeration value="c6"/>
<xs:enumeration value="d6"/>
<xs:enumeration value="e6"/>
<xs:enumeration value="f6"/>
<xs:enumeration value="g6"/>
<xs:enumeration value="h6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DrawCount" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation>This represents the halfmove clock. The number is the count of halfmove (or ply) since the last pawn advance or capturing move. The value is used for the fifty move draw rule.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MoveCount" type="xs:positiveInteger">
<xs:annotation>
<xs:documentation>The halfmove ply count.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Layout">
<xs:annotation>
<xs:documentation>A description of the board contents, encoded in Forsyth notation. White pieces are identified by uppercase piece letter ("PNBRQK"). Black pieces are identified by lowercase piece letter ("pnbrqk"). Empty squares are represented by digits 1 though 8, and a slash ('/') is used to seperate data of adjacent ranks.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[prnbqkPRNBQK12345678/]+"/>
</xs:restriction>
</xs:simpleType> |