Abstract – Chess XML
WORK IN PROGRESS – DO NOT READ YET !!
To be developed.
Purpose
Chess Ex is an record format to record the play of a chess game. The format is a subset of lexical XML, described by an XML schema.
Statement of copying permission
To be developed.
Example
To be developed.
Namespace
Chess Ex will use the following namespace …
xmlns:c="http://seanbdurkin.id.au/pascaliburnus2/archives/243"
Prose description
c:games
Games is the root element of a Chess Ex document and represents a collection of games. It is permissible for a Chess Ex document to be contained within an XML chimera document, so that c:games is not the root element of the containing XML document. c:games contains exactly one child element in this namespace, c:chess.
c:games/@version
Must be present with a value of 1. In future versions of the Chess Ex schema, this might have other values.
c:games/c:chess
c:chess is a container for chess games. Its child elements in this namespace consist of 1 or more c:event, followed by 1 or more related c:chess-game.
c:games/c:chess/c:event
c:event represents an event at which one or more chess games are played. It has zero or one child element in this namespace, c:server.
c:games/c:chess/c:event/c:title
Records the name of the tournament or match event. Data type is xs:string. Required.
c:games/c:chess/c:event/c:id
Records an internal identifier for the event. Data type is xs:ID. Games can be made to relate to events by reference to this identifier. Required.
c:games/c:chess/c:event/c:date
Date and time of the starting moment of the event. This datum must include time-zone. If all the games of event were physically located within a sole time-zone jurisdiction, then this is the one that must be used. Otherwise UTC+00:00 must be used. Data type is xs:date. Required.
c:games/c:chess/c:event/c:site
Location of the event. If there is no physical site, for such reasons as the event was by correspondence or over internet, then this element should be absent. Data type is xs:string. Optional.
c:games/c:chess/c:event/c:server |
c:games/c:chess/c:chess-game/c:server
These elements capture information about the computer program which facilitated the game. The c:server element can occur in two possible positions. When under c:event, c:server records default server information that applies by default to each of the games that relate to that event. When under c:chess-game, c:server overrides the default data attached to the event. c:server has 5 child elements (c:program-name,c:uri,c:vendor,c:host,c:version) which must be present exactly once, and in that order, except in the cases indicated by the description of the ref attribute, below.
c:games/c:chess/c:chess-game/c:server/@ref
This datum specifies how this c:server element applies to the parent game. The data type is enumeration: (nil | inherit | override). The default is override. This attribute is only allowed when the c:server element is parented by c:chess-game (as opposed to c:event parent). The meanings are as follows …
c:games/c:chess/c:chess-game/c:server/@ref=’nil’
There is no server information for this c:chess-game, irrespective of the linked c:games/c:chess/c:event/c:server element. In this case, the 5 child elements of c:server (c:program-name,c:uri,c:vendor,c:host,c:version), must be absent.
c:games/c:chess/c:chess-game/c:server/@ref=’inherit’
The server information for this c:chess-game, is inherited from the linked c:games/c:chess/c:event/c:server element. Such a linked element must exist. In this case, as in the case of @ref=’nil’, the 5 child elements must be absent.
c:games/c:chess/c:chess-game/c:server/@ref=’override’
The server information for this c:chess-game, is fully provided by the child nodes of this c:server. Any linked c:games/c:chess/c:event/c:server element, if it exists, is considered to be overridden.
c:games/c:chess/c:event/c:server/c:program-name |
c:games/c:chess/c:chess-game/c:server/c:program-name
The title of the computer program which is facilitating this game. Data type is xs:string. May be an empty string.
c:games/c:chess/c:event/c:server/c:uri |
c:games/c:chess/c:chess-game/c:server/c:uri
The URI for an informational resource which relates computer program which is facilitating this game. Data type is xs:anyURI. May be empty.
c:games/c:chess/c:event/c:server/c:vendor |
c:games/c:chess/c:chess-game/c:server/c:vendor
The URI for an informational resource which relates computer program which is facilitating this game. Data type is xs:string. May be empty.
c:games/c:chess/c:event/c:server/c:host |
c:games/c:chess/c:chess-game/c:server/c:host
A description of the host server which hosts the computer program which is facilitating this game. Data type is xs:string. May be empty.
c:games/c:chess/c:event/c:server/c:version |
c:games/c:chess/c:chess-game/c:server/c:version
A description of the version of the computer program which is facilitating this game. Data type is xs:string. May be an empty string.
c:games/c:chess/c:chess-game
c:games/c:chess/c:chess-game/@event-id
c:games/c:chess/c:chess-game/c:players
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)/c:name
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)/id
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)/rating
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)/@class
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)/@class=’human’
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)/@class=’artifice’
c:games/c:chess/c:chess-game/c:players/(c:white|c:black)/@class=’other’
c:games/c:chess/c:chess-game/c:controls
c:games/c:chess/c:chess-game/c:plies
c:games/c:chess/c:chess-game/c:plies/c:ply
c:games/c:chess/c:chess-game/c:plies/c:ply/@pro
(), WQ, WB, WN, WR, BQ, BB, BN, BR
c:games/c:chess/c:chess-game/c:result
| Event identifier |
| c:games/c:event/@id |
| xs:token |
| An internal identifier for the tournament or match event. Individual game records will link to this within the same document. |
| Event title |
| c:games/c:event/c:title |
| xs:string |
| Name of the tournament or match event. |
| Event date |
| c:games/c:event/c:date |
| xs:dateTime |
| Date and time of the starting moment of the event. This datum must include time-zone. If all the games of event were physically located within a sole time-zone jurisdiction, then this is the one that must be used. Otherwise UTC+00:00 must be used. |
| Event sponsor |
| c:games/c:event/c:sponsor |
| xs:string |
| Name of the sponsor of the event. |
| Game event reference |
| c:games/c:game/@event |
| xs:token |
Refers to the event in which this game was a part of. With c:game as the focus node, the referenced event has XPath let $id=@event return ../c:event[@id=$id] |
game/section
game/stage
game/board
game/dateTime
game/site
event/site (default)
game/timeControls
/phase
@moves : cardinal or ‘INF’, 1+
@time : cardinal or ‘INF’, seconds
@mode : ‘add’ or ‘set’
players/team/position()=1
players/team/position()=2
players/team/player
/human
/surname & /other-name
/name
/rating /@system
/artifice
/server-prog-name
/platform Win Android iOS OSX Linux
/version
/rating /@system
/client-prog-name
move
/source /destin
/en-passent
/promote
check
annotation
annotation message/xml:lang
result
Schema
Acknowledgements
http://chess.stackexchange.com/questions/12403
http://www.xml.com/pub/a/2004/08/25/tourist.html
PGNXML
http://www.cybercom.net/~zbrad/Chess/pgnxml/
http://www.saremba.de/chessgml/
ChessGML http://www.saremba.de/chessgml/standards/pgn/pgn-complete.htm
chess/tournament/eventinfo/event
chess/tournament/eventinfo/site
chess/tournament/players/player/@id
chess/tournament/players/player/@table-ref
chess/tournament/players/player/person/@cbuf-id
chess/tournament/players/player/person/surname
chess/tournament/players/player/person/firstname
chess/?/moves/sanMoves
[Event “F/S Return Match”]
[Site “Belgrade, Serbia JUG”]
[Date “1992.11.04”]
[Round “29”]
[White “Fischer, Robert J.”]
[Black “Spassky, Boris V.”]
[Result “1/2-1/2”]
1. Event (the name of the tournament or match event)
Site (the location of the event)
Date (the starting date of the game)
Round (the playing round ordinal of the game)
White (the player of the white pieces)
Black (the player of the black pieces)
Result (the result of the game)