<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT tr_treemap (tm_speciesList?, tm_typeList?, tm_plotLenX?, tm_plotLenY?, tm_treeSettings*, tree*)>
<!--This is the 8-digit filecode.  It is not required unless the tree map
is the only thing in a file.-->
<!ATTLIST tr_treemap fileCode CDATA #IMPLIED>

<!--These are the number of data members for each type/species combo - it is expected 
that the values below will match these.  Species should be written as text, like in the
par file.  Types are numbers.-->
<!ELEMENT tm_treeSettings (tm_intCodes?, tm_floatCodes?, tm_charCodes?, tm_boolCodes?)>
<!ATTLIST tm_treeSettings sp CDATA #REQUIRED
                          tp CDATA #REQUIRED>

<!--This is for the code/label matching for the data members.  When data
members are referenced below, it will be by code.-->
<!ELEMENT tm_intCodes (tm_intCode*)>
<!ELEMENT tm_floatCodes (tm_floatCode*)>
<!ELEMENT tm_charCodes (tm_charCode*)>
<!ELEMENT tm_boolCodes (tm_boolCode*)>

<!ELEMENT tm_intCode (#PCDATA)>
<!ATTLIST tm_intCode label CDATA #REQUIRED>
<!ELEMENT tm_floatCode (#PCDATA)>
<!ATTLIST tm_floatCode label CDATA #REQUIRED>
<!ELEMENT tm_charCode (#PCDATA)>
<!ATTLIST tm_charCode label CDATA #REQUIRED>
<!ELEMENT tm_boolCode (#PCDATA)>
<!ATTLIST tm_boolCode label CDATA #REQUIRED>

<!--The plot dimensions must be smaller than or equal to those 
in the parameter file.  If the tree map is included as part of 
a parameter file, the plot dimensions can be ommitted.-->
<!ELEMENT tm_plotLenX (#PCDATA)>
<!ELEMENT tm_plotLenY (#PCDATA)>
<!--The species list must equal or be a valid subset of the list in the parameter file.  If the tree map is included as part of a parameter file, the species list can be ommitted.-->
<!--The species name is the text name of the species, the value inside the tags is the species number,
which will be what the tree attribute for species is below.-->
<!ELEMENT tm_speciesList (tm_species+)*>
<!ELEMENT tm_species (#PCDATA)>
<!ATTLIST tm_species
	speciesName ID #REQUIRED
>

<!--As with species, so too with types.  However, when reading in a tree map, the types will be ignored since it is assumed
that the system types will be used.  These are just as a key to match type numbers with names.-->
<!ELEMENT tm_typeList (tm_type+)*>
<!ELEMENT tm_type (#PCDATA)>
<!ATTLIST tm_type typeName ID #REQUIRED>
<!--The tr_tree holds one tree's data.  For trees, type will be confirmed from the size 
and size will win if it is in conflict with this attribute.-->
<!ELEMENT tree (int*, fl*, ch*, bl*)>
<!--The two attributes of the tree are species and type  - the numbers, not text values-->
<!ATTLIST tree
	sp CDATA #REQUIRED
	tp CDATA #REQUIRED
>

<!--"c" stands for code - I'm cutting out as many characters as I can-->
<!ELEMENT fl (#PCDATA)>
<!ATTLIST fl c CDATA #REQUIRED>      
<!ELEMENT int (#PCDATA)>
<!ATTLIST int c CDATA #REQUIRED>      
<!ELEMENT ch (#PCDATA)>
<!ATTLIST ch c CDATA #REQUIRED>      
<!--Values for bool are "true" and "false"-->
<!ELEMENT bl (#PCDATA)>
<!ATTLIST bl c CDATA #REQUIRED>