<!-- elements -->
<!ELEMENT WMXML (GLOBAL|SCENE)*>
<!ELEMENT GLOBAL (ATOM|BOND|RIBBON|COIL|SHAPE|OBJ3D|LABEL|CAMERA|PROTECT|WHEEL|MATRIX|RADIUS|AUTOSCALE)*>
<!ATTLIST GLOBAL
  light CDATA #IMPLIED
  arrate CDATA #IMPLIED
  framerate CDATA #IMPLIED
  play CDATA #IMPLIED
  playrate CDATA #IMPLIED
  bgread CDATA #IMPLIED
  readbg CDATA #IMPLIED
  readbackground CDATA #IMPLIED
>
<!ELEMENT SCENE (LOCAL|CHAIN|ATOM|BOND|SHAPE|OBJ3D|LABEL)*>
<!ELEMENT LOCAL (ATOM|BOND|RIBBON|COIL|SHAPE|OBJ3D|LABEL|AUTOSCALE)*>
<!ATTLIST LOCAL
  origin CDATA #IMPLIED
  bg CDATA #IMPLIED
  bgcolor CDATA #IMPLIED
  background CDATA #IMPLIED
  backgroundcolor CDATA #IMPLIED
>
<!-- global settings -->
<!ELEMENT CAMERA EMPTY>
<!ATTLIST CAMERA
  z CDATA #IMPLIED
>
<!ELEMENT PROTECT EMPTY> <!-- no attributes -->
<!ELEMENT WHEEL EMPTY>
<!ATTLIST WHEEL
  scale CDATA #IMPLIED
  depth CDATA #IMPLIED
>
<!ELEMENT MATRIX EMPTY>
<!ATTLIST MATRIX
  data CDATA #IMPLIED
>
<!ELEMENT RADIUS EMPTY>
<!ATTLIST RADIUS
  method (absolute|relative) #IMPLIED
  scale CDATA #IMPLIED
>
<!-- hybrid (available both in LOCAL and GLOBAL) settings -->
<!ELEMENT AUTOSCALE EMPTY>
<!ATTLIST AUTOSCALE
  manual CDATA #IMPLIED
  autoscale CDATA #IMPLIED
  manualscale CDATA #IMPLIED
  inherit CDATA #IMPLIED
>
<!-- primitives (used also as a setting; maybe bad format) -->
<!-- there are too many duplications ... -->
<!ELEMENT ATOM EMPTY>
<!ATTLIST ATOM
  w CDATA #IMPLIED
  r CDATA #IMPLIED
  width CDATA #IMPLIED
  radius CDATA #IMPLIED
  c CDATA #IMPLIED
  color CDATA #IMPLIED
  c0 CDATA #IMPLIED
  col0 CDATA #IMPLIED
  color0 CDATA #IMPLIED
  c1 CDATA #IMPLIED
  col1 CDATA #IMPLIED
  color1 CDATA #IMPLIED
  a CDATA #IMPLIED
  alpha CDATA #IMPLIED
  o CDATA #IMPLIED
  offset CDATA #IMPLIED
  q CDATA #IMPLIED
  qua CDATA #IMPLIED
  quality CDATA #IMPLIED
  am CDATA #IMPLIED
  amb CDATA #IMPLIED
  ambient CDATA #IMPLIED
  d CDATA #IMPLIED
  dif CDATA #IMPLIED
  diff CDATA #IMPLIED
  diffuse CDATA #IMPLIED
  s CDATA #IMPLIED
  spe CDATA #IMPLIED
  spec CDATA #IMPLIED
  specular CDATA #IMPLIED
  g CDATA #IMPLIED
  gloss CDATA #IMPLIED
  shade (simple|gouraud|phong) #IMPLIED
  shader (simple|gouraud|phong) #IMPLIED
  shading (simple|gouraud|phong) #IMPLIED
  pos CDATA #IMPLIED
>
<!ELEMENT BOND EMPTY>
<!ATTLIST BOND
  w CDATA #IMPLIED
  r CDATA #IMPLIED
  width CDATA #IMPLIED
  radius CDATA #IMPLIED
  c CDATA #IMPLIED
  color CDATA #IMPLIED
  c0 CDATA #IMPLIED
  col0 CDATA #IMPLIED
  color0 CDATA #IMPLIED
  c1 CDATA #IMPLIED
  col1 CDATA #IMPLIED
  color1 CDATA #IMPLIED
  a CDATA #IMPLIED
  alpha CDATA #IMPLIED
  o CDATA #IMPLIED
  offset CDATA #IMPLIED
  q CDATA #IMPLIED
  qua CDATA #IMPLIED
  quality CDATA #IMPLIED
  am CDATA #IMPLIED
  amb CDATA #IMPLIED
  ambient CDATA #IMPLIED
  d CDATA #IMPLIED
  dif CDATA #IMPLIED
  diff CDATA #IMPLIED
  diffuse CDATA #IMPLIED
  s CDATA #IMPLIED
  spe CDATA #IMPLIED
  spec CDATA #IMPLIED
  specular CDATA #IMPLIED
  g CDATA #IMPLIED
  gloss CDATA #IMPLIED
  shade (simple|gouraud|phong) #IMPLIED
  shader (simple|gouraud|phong) #IMPLIED
  shading (simple|gouraud|phong) #IMPLIED
  pos0 CDATA #IMPLIED
  pos1 CDATA #IMPLIED
  round CDATA #IMPLIED
  rounded CDATA #IMPLIED
  exc CDATA #IMPLIED
  exclude CDATA #IMPLIED
  dash CDATA #IMPLIED
  dashed CDATA #IMPLIED
>
<!ELEMENT RIBBON EMPTY>
<!ATTLIST RIBBON
  w CDATA #IMPLIED
  r CDATA #IMPLIED
  width CDATA #IMPLIED
  radius CDATA #IMPLIED
  c CDATA #IMPLIED
  color CDATA #IMPLIED
  c0 CDATA #IMPLIED
  col0 CDATA #IMPLIED
  color0 CDATA #IMPLIED
  c1 CDATA #IMPLIED
  col1 CDATA #IMPLIED
  color1 CDATA #IMPLIED
  a CDATA #IMPLIED
  alpha CDATA #IMPLIED
  o CDATA #IMPLIED
  offset CDATA #IMPLIED
  q CDATA #IMPLIED
  qua CDATA #IMPLIED
  quality CDATA #IMPLIED
  am CDATA #IMPLIED
  amb CDATA #IMPLIED
  ambient CDATA #IMPLIED
  d CDATA #IMPLIED
  dif CDATA #IMPLIED
  diff CDATA #IMPLIED
  diffuse CDATA #IMPLIED
  s CDATA #IMPLIED
  spe CDATA #IMPLIED
  spec CDATA #IMPLIED
  specular CDATA #IMPLIED
  g CDATA #IMPLIED
  gloss CDATA #IMPLIED
  shade (simple|gouraud|phong) #IMPLIED
  shader (simple|gouraud|phong) #IMPLIED
  shading (simple|gouraud|phong) #IMPLIED
  init CDATA #IMPLIED
  last CDATA #IMPLIED
  thick CDATA #IMPLIED
  thickness CDATA #IMPLIED
>
<!ELEMENT COIL EMPTY>
<!ATTLIST COIL
  w CDATA #IMPLIED
  r CDATA #IMPLIED
  width CDATA #IMPLIED
  radius CDATA #IMPLIED
  c CDATA #IMPLIED
  color CDATA #IMPLIED
  c0 CDATA #IMPLIED
  col0 CDATA #IMPLIED
  color0 CDATA #IMPLIED
  c1 CDATA #IMPLIED
  col1 CDATA #IMPLIED
  color1 CDATA #IMPLIED
  a CDATA #IMPLIED
  alpha CDATA #IMPLIED
  o CDATA #IMPLIED
  offset CDATA #IMPLIED
  q CDATA #IMPLIED
  qua CDATA #IMPLIED
  quality CDATA #IMPLIED
  am CDATA #IMPLIED
  amb CDATA #IMPLIED
  ambient CDATA #IMPLIED
  d CDATA #IMPLIED
  dif CDATA #IMPLIED
  diff CDATA #IMPLIED
  diffuse CDATA #IMPLIED
  s CDATA #IMPLIED
  spe CDATA #IMPLIED
  spec CDATA #IMPLIED
  specular CDATA #IMPLIED
  g CDATA #IMPLIED
  gloss CDATA #IMPLIED
  shade (simple|gouraud|phong) #IMPLIED
  shader (simple|gouraud|phong) #IMPLIED
  shading (simple|gouraud|phong) #IMPLIED
  init CDATA #IMPLIED
  last CDATA #IMPLIED
>
<!ELEMENT OBJ3D EMPTY>
<!ATTLIST OBJ3D
  w CDATA #IMPLIED
  r CDATA #IMPLIED
  width CDATA #IMPLIED
  radius CDATA #IMPLIED
  c CDATA #IMPLIED
  color CDATA #IMPLIED
  c0 CDATA #IMPLIED
  col0 CDATA #IMPLIED
  color0 CDATA #IMPLIED
  c1 CDATA #IMPLIED
  col1 CDATA #IMPLIED
  color1 CDATA #IMPLIED
  a CDATA #IMPLIED
  alpha CDATA #IMPLIED
  o CDATA #IMPLIED
  offset CDATA #IMPLIED
  q CDATA #IMPLIED
  qua CDATA #IMPLIED
  quality CDATA #IMPLIED
  am CDATA #IMPLIED
  amb CDATA #IMPLIED
  ambient CDATA #IMPLIED
  d CDATA #IMPLIED
  dif CDATA #IMPLIED
  diff CDATA #IMPLIED
  diffuse CDATA #IMPLIED
  s CDATA #IMPLIED
  spe CDATA #IMPLIED
  spec CDATA #IMPLIED
  specular CDATA #IMPLIED
  g CDATA #IMPLIED
  gloss CDATA #IMPLIED
  shade (simple|gouraud|phong) #IMPLIED
  shader (simple|gouraud|phong) #IMPLIED
  shading (simple|gouraud|phong) #IMPLIED
  pos CDATA #IMPLIED
  dir CDATA #IMPLIED
  x CDATA #IMPLIED
  y CDATA #IMPLIED
  z CDATA #IMPLIED
  type CDATA #IMPLIED
>
<!ELEMENT LABEL EMPTY>
<!ATTLIST LABEL
  w CDATA #IMPLIED
  r CDATA #IMPLIED
  width CDATA #IMPLIED
  radius CDATA #IMPLIED
  c CDATA #IMPLIED
  color CDATA #IMPLIED
  c0 CDATA #IMPLIED
  col0 CDATA #IMPLIED
  color0 CDATA #IMPLIED
  c1 CDATA #IMPLIED
  col1 CDATA #IMPLIED
  color1 CDATA #IMPLIED
  a CDATA #IMPLIED
  alpha CDATA #IMPLIED
  o CDATA #IMPLIED
  offset CDATA #IMPLIED
  q CDATA #IMPLIED
  qua CDATA #IMPLIED
  quality CDATA #IMPLIED
  am CDATA #IMPLIED
  amb CDATA #IMPLIED
  ambient CDATA #IMPLIED
  d CDATA #IMPLIED
  dif CDATA #IMPLIED
  diff CDATA #IMPLIED
  diffuse CDATA #IMPLIED
  s CDATA #IMPLIED
  spe CDATA #IMPLIED
  spec CDATA #IMPLIED
  specular CDATA #IMPLIED
  g CDATA #IMPLIED
  gloss CDATA #IMPLIED
  shade (simple|gouraud|phong) #IMPLIED
  shader (simple|gouraud|phong) #IMPLIED
  shading (simple|gouraud|phong) #IMPLIED
  pos CDATA #IMPLIED
  text CDATA #IMPLIED
  font CDATA #IMPLIED
  fontsize CDATA #IMPLIED
>
<!ELEMENT SHAPE (TRI)*>
<!ATTLIST SHAPE
  w CDATA #IMPLIED
  r CDATA #IMPLIED
  width CDATA #IMPLIED
  radius CDATA #IMPLIED
  c CDATA #IMPLIED
  color CDATA #IMPLIED
  c0 CDATA #IMPLIED
  col0 CDATA #IMPLIED
  color0 CDATA #IMPLIED
  c1 CDATA #IMPLIED
  col1 CDATA #IMPLIED
  color1 CDATA #IMPLIED
  a CDATA #IMPLIED
  alpha CDATA #IMPLIED
  o CDATA #IMPLIED
  offset CDATA #IMPLIED
  q CDATA #IMPLIED
  qua CDATA #IMPLIED
  quality CDATA #IMPLIED
  am CDATA #IMPLIED
  amb CDATA #IMPLIED
  ambient CDATA #IMPLIED
  d CDATA #IMPLIED
  dif CDATA #IMPLIED
  diff CDATA #IMPLIED
  diffuse CDATA #IMPLIED
  s CDATA #IMPLIED
  spe CDATA #IMPLIED
  spec CDATA #IMPLIED
  specular CDATA #IMPLIED
  g CDATA #IMPLIED
  gloss CDATA #IMPLIED
  shade (simple|gouraud|phong) #IMPLIED
  shader (simple|gouraud|phong) #IMPLIED
  shading (simple|gouraud|phong) #IMPLIED
>
<!-- primitive internals -->
<!ELEMENT CHAIN (POINT+|COIL|RIBBON)*>
<!ATTLIST CHAIN
  N CDATA #IMPLIED
>
<!ELEMENT POINT EMPTY>
<!ATTLIST POINT
  pos CDATA #REQUIRED
  index CDATA #REQUIRED
  N CDATA #IMPLIED
  dir CDATA  #IMPLIED
>
<!ELEMENT TRI EMPTY>
<!ATTLIST TRI
  p0 CDATA #REQUIRED
  p1 CDATA #REQUIRED
  p2 CDATA #REQUIRED
>
