<!-- P is the Pargraph of HTML -->
<!ELEMENT P (#PCDATA)>

<!-- Each Go file consists of one or several GoGame -->
<!ELEMENT Go (GoGame*)>

<!-- Each GoGame consists of the game Information and the game tree -->
<!ELEMENT GoGame (Information,((Node|Black|White),(Node|Variation|Black|White|Comment)*)?)>
<!ATTLIST GoGame name CDATA #IMPLIED>

<!ELEMENT Information (Application?|BoardSize?|BlackPlayer?|BlackRank?|
	WhitePlayer?|WhiteRank?|Date?|Time?|Komi?|Result?|Handicap?|User?|
	Copyright?|Annotation?|BlackTeam?|WhiteTeam?|Round?|Rules?|Source?)*>
<!ELEMENT Application (#PCDATA)>
<!ATTLIST Application format CDATA #IMPLIED>
<!ELEMENT BoardSize (#PCDATA)>
<!ELEMENT BlackPlayer (#PCDATA)>
<!ELEMENT WhitePlayer (#PCDATA)>
<!ELEMENT BlackRank (#PCDATA)>
<!ATTLIST BlackRank format CDATA #IMPLIED>
<!ELEMENT WhiteRank (#PCDATA)>
<!ATTLIST WhiteRank format CDATA #IMPLIED>
<!ELEMENT Date (#PCDATA)>
<!ATTLIST Date format CDATA #IMPLIED>
<!ELEMENT Time (#PCDATA)>
<!ATTLIST Time format CDATA #IMPLIED>
<!ELEMENT Komi (#PCDATA)>
<!ATTLIST Komi format CDATA #IMPLIED>
<!ELEMENT Handicap (#PCDATA)>
<!ATTLIST Handicap format CDATA #IMPLIED>
<!ELEMENT Result (#PCDATA)>
<!ATTLIST Result format CDATA #IMPLIED>
<!ELEMENT User (#PCDATA)>
<!ELEMENT Copyright (P+)>
<!ELEMENT Annotation (#PCDATA)>
<!ELEMENT BlackTeam (#PCDATA)>
<!ELEMENT WhiteTeam (#PCDATA)>
<!ELEMENT Round (#PCDATA)>
<!ELEMENT Rules (#PCDATA)>
<!ATTLIST Rules format CDATA #IMPLIED>
<!ELEMENT Source (#PCDATA)>
<!ATTLIST Source format CDATA #IMPLIED>

<!ELEMENT Node ((SGF|Comment|Black|White|AddBlack|AddWhite|Mark|Delete)*)>
<!ATTLIST Node name CDATA #IMPLIED>

<!-- Possible content of a node (unordered) -->
<!ELEMENT Comment (P+)>
<!ELEMENT Black (#PCDATA)>
<!ATTLIST Black
	number CDATA #IMPLIED
	timeleft CDATA #IMPLIED
	annotate CDATA #IMPLIED>
<!ELEMENT White (#PCDATA)>
<!ATTLIST White
	number CDATA #IMPLIED
	timeleft CDATA #IMPLIED
	annotate CDATA #IMPLIED>
<!ELEMENT AddBlack (#PCDATA)>
<!ELEMENT AddWhite (#PCDATA)>
<!ELEMENT Delete (#PCDATA)>
<!ELEMENT Mark (#PCDATA)>
<!ATTLIST Mark label CDATA #IMPLIED
	type (square|circle|triangle) #IMPLIED
	territory (black|white) #IMPLIED>
<!ELEMENT BlackToPlay (#PCDATA)>
<!ELEMENT WhiteToPlay (#PCDATA)>
<!ELEMENT Line (#PCDATA)>
<!ATTLIST Line 
	format CDATA #IMPLIED
	type CDATA #IMPLIED>

<!-- This is to take care of SGF tags, which are not translated -->
<!ELEMENT SGF (Arg*)>
<!ATTLIST SGF type CDATA #REQUIRED>
<!ELEMENT Arg (#PCDATA)>

<!-- Note that the Variation are ALTERNATIVES to the current node -->
<!-- This is different from SGF and makes the file easier to read by humans -->
<!ELEMENT Variation ((Node|Variation|White|Black|Comment)*)>
