<!-- DTD for KEGG Markup Language v0.7.2 -->

<!-- Positive number type -->
<!ENTITY % number.type    "NMTOKEN">

<!-- String type -->
<!ENTITY % string.type    "CDATA">

<!-- ID type -->
<!ENTITY % id.type        "%number.type;">

<!-- IDREF type -->
<!ENTITY % idref.type     "%number.type;">

<!-- URL type -->
<!ENTITY % url.type       "%string.type;">

<!-- KEGGID type 
    KEGG ID form : "[db]:[accession]" 
<!ENTITY % keggid.type    "%string.type;">

<!-- MAPORG type 
    organism prefix or "map" or "enzyme"
<!ENTITY % maporg.type    "%string.type;">

<!-- MAPNUMBER type 
    map number : The five-digit number
<!ENTITY % mapnumber.type "%string.type;">

<!-- Type of Entry -->
<!ENTITY % entry-type.type "(ortholog|enzyme|reaction|gene|group|compound|map|brite|other)">

<!-- Type of graphics shape -->
<!ENTITY % graphics-type.type "(rectangle|circle|roundrectangle|line)">

<!-- Color type of graphics
     this type is a string that represents the color to be used by the Graphic object. 
     The color is a numerical RGB specification.
     ex) #FFFFFF
<!ENTITY % graphics-color.type "%string.type;">

<!-- Type of Relation -->
<!ENTITY % relation-type.type "(ECrel|PPrel|GErel|PCrel|maplink)">

<!-- Name of Subtype 
      indirect effect|state change|binding/association|
      glycosylation|ubiquitination|methylation|missing interaction)
<!ENTITY % subtype-name.type "%string.type;">

<!-- Value of Subtype -->
<!ENTITY % subtype-value.type "%string.type;">

<!-- Type of Reaction -->
<!ENTITY % reaction-type.type "(reversible|irreversible)">

<!ELEMENT pathway (entry*,relation*,reaction*)>
<!ATTLIST pathway name      %keggid.type;          #REQUIRED>
<!ATTLIST pathway number    %mapnumber.type;       #REQUIRED>
<!ATTLIST pathway org       %maporg.type;          #REQUIRED>
<!ATTLIST pathway title     %string.type;          #IMPLIED>
<!ATTLIST pathway image     %url.type;             #IMPLIED>
<!ATTLIST pathway link      %url.type;             #IMPLIED>

<!ELEMENT entry    (graphics*,component*)>
<!ATTLIST entry    id       %id.type;              #REQUIRED>
<!ATTLIST entry    name     %string.type;          #REQUIRED>
<!ATTLIST entry    type     %entry-type.type;      #REQUIRED>
<!ATTLIST entry    link     %url.type;             #IMPLIED>
<!ATTLIST entry    reaction %keggid.type;          #IMPLIED>

<!ELEMENT graphics EMPTY>
<!ATTLIST graphics name     %string.type;          #IMPLIED   >
<!ATTLIST graphics x        %number.type;          #IMPLIED   >
<!ATTLIST graphics y        %number.type;          #IMPLIED   >
<!ATTLIST graphics coords   %string.type;          #IMPLIED   >
<!ATTLIST graphics type     %graphics-type.type;   "rectangle">
<!ATTLIST graphics width    %number.type;          "45"       >
<!ATTLIST graphics height   %number.type;          "17"       >
<!ATTLIST graphics fgcolor  %graphics-color.type;  "#000000"  >
<!ATTLIST graphics bgcolor  %graphics-color.type;  "#FFFFFF"  >

<!ELEMENT component EMPTY>
<!ATTLIST component id     %id.type;               #REQUIRED>

<!ELEMENT relation (subtype*)>
<!ATTLIST relation entry1   %idref.type;           #REQUIRED> <!-- This attribute value indicates 
                                                                 attribute of ID defined in the entry.  -->
<!ATTLIST relation entry2   %idref.type;           #REQUIRED> <!-- This attribute value indicates 
                                                                 attribute of ID defined in the entry.  -->
<!ATTLIST relation type     %relation-type.type;   #REQUIRED>

<!ELEMENT subtype EMPTY>
<!ATTLIST subtype name      %subtype-name.type;    #REQUIRED>
<!ATTLIST subtype value     %subtype-value.type;   #REQUIRED>

<!ELEMENT reaction (substrate*,product*)>
<!ATTLIST reaction id       %id.type;              #REQUIRED>
<!ATTLIST reaction name     %keggid.type;          #REQUIRED>
<!ATTLIST reaction type     %reaction-type.type;   #REQUIRED>

<!ELEMENT substrate (alt?)>
<!ATTLIST substrate id       %id.type;             #REQUIRED>
<!ATTLIST substrate name     %keggid.type;         #REQUIRED>
<!ELEMENT product   (alt?)>
<!ATTLIST product   id       %id.type;             #REQUIRED>
<!ATTLIST product   name     %keggid.type;         #REQUIRED>

<!ATTLIST alt name           %keggid.type;         #REQUIRED>