<?xml version="1.0" encoding="UTF-8"?>
<!--This is a DTD for a map file, which is a file of all values found in a grid object.-->
<!ELEMENT grid (ma_intCodes?, ma_floatCodes?, ma_charCodes?, ma_boolCodes?,
                ma_packageIntCodes?, ma_packageFloatCodes?, ma_packageCharCodes?, ma_packageBoolCodes?,
                ma_plotLenX?, ma_plotLenY?, ma_lengthXCells?, ma_lengthYCells?, ma_v*)>
<!--First attribute - version Code - 8 digit code
    Second attribute - grid name - should equal the namestring of the grid object-->
<!ATTLIST grid fileCode CDATA #IMPLIED
               gridName CDATA #REQUIRED>

<!--This is for the labels for the data members of each type.  There should be a code
for each data member that will be written below.-->
<!ELEMENT ma_intCodes (ma_intCode*)>
<!ELEMENT ma_floatCodes (ma_floatCode*)>
<!ELEMENT ma_charCodes (ma_charCode*)>
<!ELEMENT ma_boolCodes (ma_boolCode*)>

<!--This is for the labels for the package data members, if different from the list
of data members of the grid.-->
<!ELEMENT ma_packageIntCodes (ma_intCode*)>
<!ELEMENT ma_packageFloatCodes (ma_floatCode*)>
<!ELEMENT ma_packageCharCodes (ma_charCode*)>
<!ELEMENT ma_packageBoolCodes (ma_boolCode*)>

<!ELEMENT ma_intCode (#PCDATA)>
<!ATTLIST ma_intCode label CDATA #REQUIRED>
<!ELEMENT ma_floatCode (#PCDATA)>
<!ATTLIST ma_floatCode label CDATA #REQUIRED>
<!ELEMENT ma_charCode (#PCDATA)>
<!ATTLIST ma_charCode label CDATA #REQUIRED>
<!ELEMENT ma_boolCode (#PCDATA)>
<!ATTLIST ma_boolCode label CDATA #REQUIRED>

<!--Plot size - these must be equal to the parameter file's values if this map is to be loaded.-->
<!ELEMENT ma_plotLenX (#PCDATA)>
<!ELEMENT ma_plotLenY (#PCDATA)>

<!--Length of grids in each of the X and Y directions - required if this is
to be used for grid object setup-->
<!ELEMENT ma_lengthXCells (#PCDATA)>
<!ELEMENT ma_lengthYCells (#PCDATA)>

<!--Grid values - the attributes are grid numbers
    Values for data members may be specified by using the appropriate data type of the data
    member.  The number attribute is for the data member's code.  This matches the code above
    in the label list.  Values for each data member are not required.  For bools, the values
    are expected to be "true" or "false".
    Ex:  <ma_v x=10 y=4>
      		<ma_float num=1>23.4</ma_float>
      		<ma_bool num=0>true</ma_bool>
      	 </ma_v>
-->
<!ELEMENT ma_v (int*, fl*, ch*, bl*, pkg*)>
<!ATTLIST ma_v x CDATA #REQUIRED
               y CDATA #REQUIRED>
<!--Packages should be listed in the order that they are in the linked list-->
<!ELEMENT pkg (pint*, pfl*, pch*, pbl*)>

<!--"c" stands for code - I'm cutting out as many characters as I can-->
<!--Commented out as these are already defined in tree
<!ELEMENT fl (#PCDATA)>
<!ATTLIST fl c CDATA #REQUIRED>      
<!ELEMENT int (#PCDATA)>
<!ATTLIST int c CDATA #REQUIRED>      
<!ELEMENT ch (#PCDATA)>
<!ATTLIST ch c CDATA #REQUIRED>      
<!ELEMENT bl (#PCDATA)>
<!ATTLIST bl c CDATA #REQUIRED>-->
 
<!--The reason there are separate package tags is because it's easier
to parse and separate these out in the code.-->    
<!ELEMENT pfl (#PCDATA)>
<!ATTLIST pfl c CDATA #REQUIRED>      
<!ELEMENT pint (#PCDATA)>
<!ATTLIST pint c CDATA #REQUIRED>      
<!ELEMENT pch (#PCDATA)>
<!ATTLIST pch c CDATA #REQUIRED>      
<!ELEMENT pbl (#PCDATA)>
<!ATTLIST pbl c CDATA #REQUIRED> 