<!-- <!DOCTYPE OMF SYSTEM "OMF.dtd" [ -->
<!--  Weather Observation Definition Format DTD -->
<!--  This is the OMF XML DTD.  It can be referred to using the
formal public identifier 
        -//METNET//OMF 1.0//EN
      For description, see OMF.html

      $Id: OMF.dtd,v 4.1 2000/04/12 19:42:03 oleg Exp oleg $
--> 

<!--  Weather Observation Definition Format      -->

<!--  Basic attributes     -->

<!ENTITY % TStamp-type "NMTOKEN">
<!ENTITY % TRange-type "CDATA">
<!ENTITY % TStamp "TStamp %TStamp-type; #REQUIRED">
<!ENTITY % TRange "TRange %TRange-type; #REQUIRED">
<!ENTITY % LatLon "LatLon CDATA #REQUIRED">
<!ENTITY % LatLons "LatLons CDATA #REQUIRED">
<!ENTITY % BBox-REQD "BBox CDATA #REQUIRED">
<!ENTITY % BBox-OPT "BBox CDATA #IMPLIED">
<!ENTITY % BId "BId NMTOKEN #REQUIRED">
<!ENTITY % SName "SName CDATA #REQUIRED">
<!ENTITY % Elev "Elev NMTOKEN #IMPLIED">

<!--  Basic elements     -->

<!ELEMENT VALID (#PCDATA)>
<!ATTLIST VALID %TRange;>

<!--  A collection of weather observation reports     -->

<!ELEMENT Reports ( METAR | SPECI | UAR | BTSC | SYN )*>
<!ATTLIST Reports %TStamp;>

<!--  Common report attributes     -->
<!ENTITY % ReportAttrs 
    "%TStamp; %LatLon; %BId; %SName; %Elev;
     Vis NMTOKEN  #IMPLIED
     Ceiling NMTOKEN  #IMPLIED
    ">

<!--  METAR and SPECI reports     -->

<!ELEMENT METAR (#PCDATA)>
<!ATTLIST METAR %ReportAttrs;>

<!ELEMENT SPECI (#PCDATA)>
<!ATTLIST SPECI %ReportAttrs;>

<!--  A collection of weather hazard advisories     -->

<!ELEMENT Advisories ( SIGMET | AIRMET | WW )* >
<!ATTLIST Advisories %TStamp;>

<!--  A SIGMET advisory   -->

<!ELEMENT SIGMET (VALID, AFFECTING?, EXTENT, BODY) >
<!ATTLIST SIGMET
        class (CONVECTIVE| OUTLOOK| HOTEL| INDIA| UNIFORM| VICTOR| WHISKEY) #REQUIRED
        id NMTOKEN #REQUIRED
        %TStamp;
        %BBox-OPT;
>

<!ELEMENT AFFECTING (#PCDATA)>

<!ELEMENT EXTENT (#PCDATA)>
<!ATTLIST EXTENT
	Shape (AREA| LINE| POINT) #REQUIRED
	%LatLons;
>

<!ELEMENT BODY (#PCDATA)>


<!--  A collection of weather forecasts     -->

<!ELEMENT Forecasts ( TAF )* >
<!ATTLIST Forecasts %TStamp;>

<!--  A Terminal Aerodrome Forecast   -->

<!ELEMENT TAF ( VALID, PERIOD+ ) >
<!ATTLIST TAF
	%TStamp; %LatLon; %BId; %SName;
>

<!ELEMENT PERIOD ( PREVAILING, VAR* )>
<!ATTLIST PERIOD
	%TRange;
	Title NMTOKEN #IMPLIED
>

<!ELEMENT PREVAILING (#PCDATA)>

<!ELEMENT VAR (#PCDATA)>
<!ATTLIST VAR
	%TRange;
	Title CDATA #REQUIRED
>

<!--  Rawinsonde and Pibal Observation reports     -->

<!ELEMENT UAR ( UAPART+, UAID*, UACODE*, UALEVELS ) >
<!ATTLIST UAR
	%TStamp; %LatLon; %BId; %SName; %Elev;
>

<!ELEMENT UAPART (#PCDATA)>
<!ATTLIST UAPART
	id NMTOKEN #REQUIRED
>
<!ENTITY % UARef "Ref NMTOKEN #REQUIRED">

<!ELEMENT UAID (#PCDATA)>
<!ATTLIST UAID %UARef; >
<!ELEMENT UACODE (#PCDATA)>
<!ATTLIST UACODE %UARef; >


<!ELEMENT UALEVELS (UALEVEL)*>
<!ELEMENT UALEVEL (#PCDATA)>
<!ATTLIST UALEVEL
	%UARef;
	P NMTOKEN #REQUIRED
	H NMTOKEN #IMPLIED
	T NMTOKEN #IMPLIED
	DP NMTOKEN #IMPLIED
	Wind CDATA #IMPLIED
>

<!--  Bathythermal, Salinity and Ocean Currents Observations  -->

<!ELEMENT BTSC ( BTID, BTCODE?, BTLEVELS ) >
<!ATTLIST BTSC
	%TStamp; %LatLon; %BId; %SName;
	Title (JJYY | KKXX | NNXX) #REQUIRED
	Depth NMTOKEN #IMPLIED
>

<!ELEMENT BTID (#PCDATA)>
<!ATTLIST BTID
	DZ (7|8) #IMPLIED
	Rec NMTOKEN #IMPLIED
	WS (0|1|2|3) #IMPLIED
	Curr-s (2|3|4) #IMPLIED
	Curr-d NMTOKEN #IMPLIED
	AV-T (0|1|2|3) #IMPLIED
	AV-Sal (0|1|2|3) #IMPLIED
	AV-Curr (0|1|2|3) #IMPLIED
	Sal (1|2|3) #IMPLIED
>

<!ELEMENT BTCODE (#PCDATA)>
<!ELEMENT BTLEVELS (BTAIR?, (BTLEVEL)*)>

<!ELEMENT BTAIR (#PCDATA)>
<!ATTLIST BTAIR
	T NMTOKEN #IMPLIED
	Wind CDATA #IMPLIED
>

<!ELEMENT BTLEVEL (#PCDATA)>
<!ATTLIST BTLEVEL
	D NMTOKEN #REQUIRED
	T NMTOKEN #IMPLIED
	S NMTOKEN #IMPLIED
	Curr CDATA #IMPLIED
>

<!--  Surface Synoptic Reports from land and sea stations -->

<!ELEMENT SYN ( SYID, SYCODE?, SYG?, SYSEA? ) >
<!ATTLIST SYN
	%TStamp; %LatLon; %BId; %SName; %Elev;
	Title (METAR | SPECI | AAXX | BBXX | ZZYY) #REQUIRED
	SType (AUTO | MANN) "MANN"
>

<!ELEMENT SYID (#PCDATA)>
<!ATTLIST SYID
	WS (0|1|3|4) #IMPLIED
>

<!ELEMENT SYCODE (#PCDATA)>

<!ELEMENT SYG (#PCDATA)>
<!ATTLIST SYG
	T NMTOKEN #IMPLIED
	TD NMTOKEN #IMPLIED
	RH NMTOKEN #IMPLIED
	Tmm CDATA #IMPLIED
	P NMTOKEN #IMPLIED
	AS NMTOKEN #IMPLIED
	P0 NMTOKEN #IMPLIED
	Pd NMTOKENS #IMPLIED
	Vis NMTOKEN  #IMPLIED
	Ceiling NMTOKEN  #IMPLIED
	Wind CDATA #IMPLIED
	WX CDATA #IMPLIED
	Prec CDATA #IMPLIED
	Clouds CDATA #IMPLIED
>

<!ELEMENT SYSEA (#PCDATA)>
<!ATTLIST SYSEA
	T NMTOKEN #IMPLIED
	Wave CDATA #IMPLIED
	SDir CDATA #IMPLIED
>


<!--  Plain-text WMO Meteorological messages  -->

<!ELEMENT Messages ( MSG )* >
<!ATTLIST Messages %TStamp;>

<!ELEMENT MSG ANY >
<!ATTLIST MSG
	id     NMTOKEN #REQUIRED
	Type   NMTOKEN #IMPLIED
	%TStamp; 
	%SName;
	%BBox-OPT;
	BBB    CDATA   #IMPLIED
	Descr  CDATA   #IMPLIED
>

<!-- ]> -->
