<!ELEMENT level (info, rooms, gates, textures)>

<!ELEMENT info (name, desc, start)>
<!ELEMENT rooms (room)*>
<!ELEMENT gates (gate)*>
<!ELEMENT textures (texture)*>

<!ELEMENT name (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT start EMPTY>
<!ATTLIST start
  x CDATA #REQUIRED
  y CDATA #REQUIRED
  z CDATA #REQUIRED
>

<!ELEMENT room (triangle)*>
<!ATTLIST room
  id ID #REQUIRED
>

<!ELEMENT gate (triangle)*>
<!ATTLIST gate
  room1 IDREF #REQUIRED
  room2 IDREF #REQUIRED
>

<!ELEMENT triangle (vertex, normal?, texcoords?, vertex, normal?, texcoords?, vertex, normal?, texcoords?)>
<!ATTLIST triangle
  visible (true|false) "true"
  texture IDREF        #IMPLIED
>

<!ELEMENT texture EMPTY>
<!ATTLIST texture
  id   ID    #REQUIRED
  name CDATA #REQUIRED
>

<!ELEMENT vertex EMPTY>
<!ATTLIST vertex
  x CDATA #REQUIRED
  y CDATA #REQUIRED
  z CDATA #REQUIRED
>

<!ELEMENT normal EMPTY>
<!ATTLIST normal
  x CDATA #REQUIRED
  y CDATA #REQUIRED
  z CDATA #REQUIRED
>

<!ELEMENT texcoords EMPTY>
<!ATTLIST texcoords
  s CDATA #REQUIRED
  t CDATA #IMPLIED
  r CDATA #IMPLIED
  q CDATA #IMPLIED
>

