metaf2xml parses and decodes aviation routine weather reports and aerodrome
forecasts (i.e. METAR and TAF messages) and stores the components in XML. They
can then be converted to plain language (text, HTML), or other formats. All
parts of the messages are parsed, some common format errors are corrected or
tolerated.

metaf2xml consists of the following files:

metaf2xml.pl, metaf2xml/*.pm (requires Getopt::Std, IO::File, XML::writer)
    contain the code for parsing METAR and TAF messages and write an XML
    file

    They also contain the code to display the contents of the message in
    nearly the same format as metar_main from the FlightGear project
    does. I used it for testing (comparing the output for many
    messages). This is now obsolete and will be removed soon.

    The structure of the XML file probably needs some comment. There
    were 2 design goals:
    - one should be able to check the contents of an XML file as strict
      as possible but with little effort
    - it should not contain additional data that is not in the METAR/TAF
      message itself.

    For contents checking I used DTD. I know there also is XSD but I
    found it even more cumbersome than XSL and I postponed that work.

    With DTD one can only restrict attributes to have certain values so
    a value is not put between tags but assigned to an empty tag as an
    attribute named 'v' (for "value"). It turned out that it was better
    readable as well:

            usual notation:                     metaf.xml:
            <cloudCover>OVC</cloudCover>        <cloudCover v="OVC" />

    I think additionally it is better to read for humans.

    Each entry also contains the original string from the message as an
    attribute named 's' (for "string"):

       <cloud s="OVC200">
        <cloudBase v="200" />
        <cloudCover v="OVC" />
       </cloud>

    If there can exist several items a "list" is used:

      <cloudList>
       <cloud s="BKN100">
        <cloudBase v="100" />
        <cloudCover v="BKN" />
        <isCeiling v="1" />
       </cloud>
       <cloud s="OVC200">
        <cloudBase v="200" />
        <cloudCover v="OVC" />
       </cloud>
      </cloudList>

    There are 2 exceptions to the "no additional data" goal:
    - if a cloud layer is the ceiling, it will have the "isCeiling" tag
    - if temperature and dewpoint are given it will have 4 tags for the
      humidity (I found 4 different formulars)
    Both items I considered "hard to compute" in XSL though it certainly is
    possible.

metaf-html.xsl, metaf-text.xsl
    two wrapper files for metaf.xsl

    They define the output method (HTML or text) and then include metaf.xsl.

metaf.xsl
    XML style sheet to transform the contents of the generated XML file

    All abbreviations are converted to plain language (language support
    from metaf-lang.xsl). Output format can be text or HTML. The columns
    in text format are separated by tabulators, they are also in the
    HTML, but not displayed because they are between closing and opening
    table field tags.

metaf-lang.xsl
    XML style sheet for language dependend stuff

    Currently german, english, spanish, and russian output is supported.

metaf.dtd
    The DTD for the XML file.

metaf.pl (requires CGI)
    CGI script

    It provides a web interface to metaf2xml. A METAR or TAF message can be
    entered and is then converted to text, HTML. It needs xsltproc.
