<!-- CHESSML -->

<![%full;[

<!ELEMENT  classification (#PCDATA)>
<!ATTLIST  classification 
			type    	CDATA		#IMPLIED
                        name            NMTOKENS        #IMPLIED
			key		IDREF		#IMPLIED
                        subkey          IDREF           #IMPLIED
			keylist		IDREF		#IMPLIED>  	<!-- 150600 -->
<!ELEMENT  setup        (position?,fen?)> 				<!-- 180600 -->
<!ELEMENT  fen          (#PCDATA)>
<!ATTLIST  fen 		castle 	        NMTOKENS        #IMPLIED
        		ep 	        NMTOKENS        #IMPLIED
        		party           CDATA           #IMPLIED
                        %lang;
                        extended        (yes|no)        "no">   
<!ELEMENT  position     (#PCDATA|board|piecelist)*>			<!-- 180600 -->
<!ELEMENT  piecelist	(#PCDATA|piece)*>
<!ATTLIST  piecelist	color		CDATA		#REQUIRED
			notationtype    NMTOKEN         "SAN">	        <!-- 180600 -->
<!ELEMENT  piece        (%squares;)*>
<!ATTLIST  piece        square          CDATA           #IMPLIED
                        name            CDATA         	#IMPLIED
                        abbrevation     CDATA           #REQUIRED
			color		CDATA           #REQUIRED
			def		IDREF		#IMPLIED
			mode		CDATA		"add">	        <!-- 180600 -->
<!ELEMENT  moves	(#PCDATA|moves|analysis|m|referto)*> 
<!ATTLIST  moves        ply	        CDATA           #IMPLIED 
        		party           CDATA           #REQUIRED
                        type            CDATA           "mainline"                        
                        position        IDREF           #IMPLIED
        	        %id;
                        notationtype    NMTOKEN         "SAN">   
<!ELEMENT  m	        (#PCDATA|%pieces;|%squares;|comment|referto)*> 
<!ATTLIST  m     	from 	        CDATA           #IMPLIED
                        id              ID              #IMPLIED
                        analysis        IDREF           #IMPLIED
        		to   	        CDATA           #IMPLIED
        		piece	        NMTOKEN         #IMPLIED
        		action	        NMTOKENS        #IMPLIED  
        	        ply	        CDATA           #IMPLIED
			value           CDATA		#IMPLIED
        		party           CDATA           #IMPLIED> 
<!ELEMENT  comment      EMPTY>
<!ATTLIST  comment      style           CDATA           "informant"
                        value           CDATA           #REQUIRED>
<!ELEMENT  K   EMPTY> <!ELEMENT  Q   EMPTY>
<!ELEMENT  R   EMPTY> <!ELEMENT  N   EMPTY>
<!ELEMENT  B   EMPTY> <!ELEMENT  P   EMPTY>
<!ELEMENT  a1  EMPTY> <!ELEMENT  a2  EMPTY> <!ELEMENT  a3  EMPTY> <!ELEMENT  a4  EMPTY>
<!ELEMENT  a5  EMPTY> <!ELEMENT  a6  EMPTY> <!ELEMENT  a7  EMPTY> <!ELEMENT  a8  EMPTY>
<!ELEMENT  b1  EMPTY> <!ELEMENT  b2  EMPTY> <!ELEMENT  b3  EMPTY> <!ELEMENT  b4  EMPTY>
<!ELEMENT  b5  EMPTY> <!ELEMENT  b6  EMPTY> <!ELEMENT  b7  EMPTY> <!ELEMENT  b8  EMPTY>
<!ELEMENT  c1  EMPTY> <!ELEMENT  c2  EMPTY> <!ELEMENT  c3  EMPTY> <!ELEMENT  c4  EMPTY>
<!ELEMENT  c5  EMPTY> <!ELEMENT  c6  EMPTY> <!ELEMENT  c7  EMPTY> <!ELEMENT  c8  EMPTY>
<!ELEMENT  d1  EMPTY> <!ELEMENT  d2  EMPTY> <!ELEMENT  d3  EMPTY> <!ELEMENT  d4  EMPTY>
<!ELEMENT  d5  EMPTY> <!ELEMENT  d6  EMPTY> <!ELEMENT  d7  EMPTY> <!ELEMENT  d8  EMPTY>
<!ELEMENT  e1  EMPTY> <!ELEMENT  e2  EMPTY> <!ELEMENT  e3  EMPTY> <!ELEMENT  e4  EMPTY>
<!ELEMENT  e5  EMPTY> <!ELEMENT  e6  EMPTY> <!ELEMENT  e7  EMPTY> <!ELEMENT  e8  EMPTY>
<!ELEMENT  f1  EMPTY> <!ELEMENT  f2  EMPTY> <!ELEMENT  f3  EMPTY> <!ELEMENT  f4  EMPTY>
<!ELEMENT  f5  EMPTY> <!ELEMENT  f6  EMPTY> <!ELEMENT  f7  EMPTY> <!ELEMENT  f8  EMPTY>
<!ELEMENT  g1  EMPTY> <!ELEMENT  g2  EMPTY> <!ELEMENT  g3  EMPTY> <!ELEMENT  g4  EMPTY>
<!ELEMENT  g5  EMPTY> <!ELEMENT  g6  EMPTY> <!ELEMENT  g7  EMPTY> <!ELEMENT  g8  EMPTY>
<!ELEMENT  h1  EMPTY> <!ELEMENT  h2  EMPTY> <!ELEMENT  h3  EMPTY> <!ELEMENT  h4  EMPTY>
<!ELEMENT  h5  EMPTY> <!ELEMENT  h6  EMPTY> <!ELEMENT  h7  EMPTY> <!ELEMENT  h8  EMPTY>

<!ELEMENT  analysis     (text|moves|fen|pgn|diagram|referto)*>                                   
<!ATTLIST  analysis     %annotator;  
                        %id;
                        compareto      	IDREF           #IMPLIED
                        m               IDREF           #IMPLIED> 		<!--180600-->
<!ELEMENT  pgn          (#PCDATA)>   
<!ATTLIST  pgn          lang            CDATA           #IMPLIED>  	<!-- 150600 -->
<!ELEMENT  diagram      (#PCDATA|fen|position)*> 
<!ATTLIST  diagram 	%title;
                        m               IDREF           #IMPLIED
                        moves           IDREF           #IMPLIED
			outputtype (image|none|text)    "image"
                        %id;>        
<!ELEMENT  board	(#PCDATA|fen)*>
<!ATTLIST  board	dim             CDATA           "2"
                        topology        CDATA           #IMPLIED
                        coord-numbering	NMTOKENS        #IMPLIED>	<!-- 180600 -->
<!ELEMENT  referto      (#PCDATA)>					<!--190600--> 
<!ATTLIST  referto      reference       IDREF           #IMPLIED
                        referencetyp    NMTOKEN         #IMPLIED
                        refpoint        CDATA           #IMPLIED>  	<!--190600-->
]]>

<![%non-lite-cgml;[
<!ELEMENT  sq  (coord)+>
<!ELEMENT  coord        EMPTY>
<!ATTLIST  coord        direction       CDATA           #REQUIRED
                        n               CDATA           #REQUIRED>
]]>

<!-- CHESSMLITE -->

<![%lite;[

<!ELEMENT  classification (#PCDATA)>

<!ELEMENT  setup        (#PCDATA)> 	

<!ELEMENT  moves        (#PCDATA)>

]]>

<!ELEMENT  text         (#PCDATA)>
<!ATTLIST  text         %annotator;
                        %lang;>
