<!ELEMENT diagram (diagramdata, (layer)*) >

<!ELEMENT diagramdata (attribute)* >

<!ELEMENT layer (object | group)*>
<!ATTLIST layer
   name CDATA #REQUIRED
   visible (true|false) #REQUIRED >

<!ELEMENT object ((attribute)*, connections?)>
<!ATTLIST object
   type CDATA #REQUIRED
   version NMTOKEN #REQUIRED
   id ID #REQUIRED >

<!ELEMENT connections (connection)*>

<!ELEMENT connection EMPTY>
<!ATTLIST connection
   handle NMTOKEN #REQUIRED
   to IDREF #REQUIRED
   connection NMTOKEN #REQUIRED>

<!ELEMENT group (object | group)*>

<!ELEMENT attribute (composite | int | enum | real | boolean |
                     color | point | rectangle | string | font)*>
<!ATTLIST attribute  name CDATA #REQUIRED >

<!ELEMENT composite (attribute)*>
<!ATTLIST composite  type CDATA #IMPLIED>

<!ELEMENT int EMPTY>
<!ATTLIST int  val NMTOKEN #REQUIRED>

<!ELEMENT enum EMPTY>
<!ATTLIST enum  val NMTOKEN #REQUIRED>

<!ELEMENT real EMPTY>
<!ATTLIST real  val CDATA #REQUIRED>

<!ELEMENT boolean EMPTY>
<!ATTLIST boolean  val (true|false) #REQUIRED>

<!ELEMENT color EMPTY>
<!ATTLIST color  val CDATA #REQUIRED>

<!ELEMENT point EMPTY>
<!ATTLIST point  val CDATA #REQUIRED>

<!ELEMENT rectangle EMPTY>
<!ATTLIST rectangle  val CDATA #REQUIRED>

<!ELEMENT string (#PCDATA)>

<!ELEMENT font EMPTY>
<!ATTLIST font name CDATA #REQUIRED>
