LJ Archive

Listing 4. The Vehicle-Definition Section of the DTD for the Traffic Jam Configuration File

<!ELEMENT vehicles ((vehicle)+,colors)>
  <!ATTLIST vehicles numtypes NMTOKEN #REQUIRED>
  <!ELEMENT vehicle EMPTY>
    <!ATTLIST vehicle length       NMTOKEN #REQUIRED
                      maxspeed     NMTOKEN #REQUIRED
                      accel        NMTOKEN #REQUIRED
                      slowdistance NMTOKEN #REQUIRED
                      stopdistance NMTOKEN #REQUIRED
    >
  <!ELEMENT colors (color)+>
    <!ATTLIST colors num NMTOKEN #REQUIRED>
    <!ELEMENT color EMPTY>
      <!ATTLIST color red   NMTOKEN #REQUIRED
                      green NMTOKEN #REQUIRED
                      blue  NMTOKEN #REQUIRED
      >
LJ Archive