Next / Previous / Contents / Shipman's homepage

22. Testing

Here are some files to be used to test this module.

22.1. Sample XML input file

The file shown below is an example of a notes file in XML form. It exercises most, if not all, of the features of notes files. It is intended to be used to test that the module correctly reads a valid input file. Another useful test is to read the file and then write it back, and compare the output to see if it is equivalent to the input. It is available on the Web as file 2999-01.xml.

2999-01.xml
<note-set period='Septober 2999'>
  <day-notes state='vt' date='2999-09-05'>
    <day-summary default-loc='Mont'>
      <loc code='Mont' name='Montpelier Municipal Parks'/>
      <loc code='PI' name='Padre Island National Seashore'/>
    </day-summary>
    <form ab6='empgoo' gps='461218.5n 855959.9w' q='?'
          fide='Adam Weishaupt'/>
    <form ab6='mallar' rel='^' alt='snogoo' notable='1' count='1'/>
    <form ab6='baleag' loc='PI'>
      <loc-detail>
        Standing on a light stand during filming of
        <cite>Flight of the Coot</cite>.
      </loc-detail>
      <floc age='a' count='2'/>
      <floc age='i' count='1' loc='Mont'>
        <desc>White in the meat part of the wing.</desc>
        <breeding>Building a stick nest.</breeding>
        <voc>Thin yipping noises.</voc>
        <behavior>Standing around looking regal.</behavior>
        <para>
          Would we really have been better off with the turkey as
          our nationable bird?
        </para>
        <photo cat-no='2999-09-05b8047'
url='http://www.nmt.edu/~shipman/aba/photos/2999/2999-09-05b8047.png'>
          View from inside the spleen.
        </photo>
      </floc>
    </form>
  </day-notes>
  <day-notes state='nh' date='2999-09-06' day-loc='Spg'>
    <day-summary default-loc='NH'>
      <loc code='Spg' name='Springfield'>
        <gps waypoint='4306n8206w'/>
        <gps waypoint='4307n8156w'>
          This is not a real waypoint.
        </gps>
        This isn't a real place.
      </loc>
      <loc code='NH' name='Statewide'/>
      <route>
        The route has no internal paragraphs.
      </route>
      <weather>
        Beautiful day, only a few F5 tornadoes.
      </weather>
      <film>
        <para>Roll #8506, Ilford XP1-36.</para>
        <para>
          Roll #8507, Kodak Technical Pan.
        </para>
      </film>
      <missed>No Jabirus today.</missed>
      <para>
        This comment isn't terribly useful either.
      </para>
      <para>I can has two paragraphs?</para>
    </day-summary>
    <form ab6='jabiru' sex='p'/>
  </day-notes>
</note-set>