<?xml version="1.0" encoding="UTF-8"?>
<!--This is the document type definition for the tree map file.  
This data can be added into the parameter file or can be entered 
as a separate file.  If this is a separate file it should have
a fileCode; if it is part of the parameter file it doesn't need it.-->
<!ELEMENT trees (tr_speciesList?, tr_sizeClasses?, tr_initialDensities*, 
                 tr_seedlingHeightClass1?, tr_seedlingHeightClass2?,
                 tr_seedDiam10Cm?, tr_minAdultDBH?, tr_maxSeedlingHeight?, 
                 tr_treemap*)>
<!--Version Code - 8 digit code-->
<!ATTLIST trees fileCode CDATA #IMPLIED>

<!ELEMENT tr_speciesList (tr_species+)*>
<!ELEMENT tr_species EMPTY>
<!ATTLIST tr_species
	speciesName ID #REQUIRED
>
<!--DBH Size Classes.  Since ID-type attributes must begin with a letter, 
the size class should be one letter and then the dbh number desired - i.e. 
"s5" or "k20.5".  To enter seeds, create a size class with id 
"seed".  To enter seedlings, create a size class with id "seedling".  Case 
is important!  Size classes are not required but must be included if initial
densities are included.

The value entered is the upper limit of the size class, with the lower limit
being the value in the previous class (or 0, if there is no previous class).-->
<!ELEMENT tr_sizeClasses (tr_sizeClass)*>
<!ELEMENT tr_sizeClass EMPTY>
<!ATTLIST tr_sizeClass
	sizeKey ID #REQUIRED
>

<!--Seed height classes.  These can be used with or without the seedling DBH
class.  The lower bound of the first class is 0, the upper bound the first
parameter.  The second class is between the upper bound of the first class
and the upper bound of the second class.  The third class is between the
upper bound of the first class and 135 cm.-->
<!--Seedling height class 1 upper height value in cm-->
<!ELEMENT tr_seedlingHeightClass1 (#PCDATA)>
<!--Seedling height class 2 upper height value in cm-->
<!ELEMENT tr_seedlingHeightClass2 (#PCDATA)>

<!--Initial Densities.  These are number of trees per hectare.  These are not required.
	The species attribute is "whatSpecies" instead of "species" to avoid messing up 
	automated parsing that relies on "species" to indicate a straight set of 
	species-specific values.
-->
<!ELEMENT tr_initialDensities (tr_idVals)*>
<!ELEMENT tr_idVals (tr_initialDensity)*>
<!ATTLIST tr_idVals
	whatSpecies IDREF #REQUIRED
>
<!ELEMENT tr_initialDensity (#PCDATA)>
<!ATTLIST tr_initialDensity
	sizeClass IDREF #REQUIRED
>

<!--Initial densities for the first height class of seedlings, #/ha-->
<!ELEMENT tr_seedlingHeight1Density (tr_sh1dVal+)*>
<!ELEMENT tr_sh1dVal (#PCDATA)>
<!ATTLIST tr_sh1dVal species IDREF #REQUIRED>

<!--Initial densities for the second height class of seedlings, #/ha-->
<!ELEMENT tr_seedlingHeight2Density (tr_sh2dVal+)*>
<!ELEMENT tr_sh2dVal (#PCDATA)>
<!ATTLIST tr_sh2dVal species IDREF #REQUIRED>

<!--Initial densities for the third height class of seedlings, #/ha-->
<!ELEMENT tr_seedlingHeight3Density (tr_sh3dVal+)*>
<!ELEMENT tr_sh3dVal (#PCDATA)>
<!ATTLIST tr_sh3dVal species IDREF #REQUIRED>

<!ELEMENT tr_seedDiam10Cm (#PCDATA)>

<!--Cutoff DBH (in cm) above which a tree is considered an adult-->
<!ELEMENT tr_minAdultDBH (tr_madVal+)*>
<!ELEMENT tr_madVal (#PCDATA)>
<!ATTLIST tr_madVal	species IDREF #REQUIRED>

<!--Cutoff height (in m) above which a tree is considered a sapling-->
<!ELEMENT tr_maxSeedlingHeight (tr_mshVal+)*>
<!ELEMENT tr_mshVal (#PCDATA)>
<!ATTLIST tr_mshVal	species IDREF #REQUIRED>

<!ENTITY % treeMap SYSTEM "treemap.dtd">
%treeMap;
