XML Format
Introduction
This document describes the differences between the new XML format of notifications and the existing SGML format.
The motivation of introducing the XML format is the usage of Standards instead of a proprietary format. Usage of XML brings some benefits. There are a lot of tools: browsers, editors, software APIs, etc. which handle well XML format. It resolves as well the encoding issue as it is well described in XML Standard.
TerRaSys software (TerRaNotices, etc.) will be supporting the two formats.
Notification layout
The XML format is quite similar to the existing SGML format. All section names and key names are preserved except the optional key t_char_set in HEAD section which is no longer needed in XML format.
As described in the Table 1, the difference between the two formats is adding the top-level section ENOTICE in the XML format.
Table 1: Notification layout
SGML format | XML format |
---|---|
<HEAD> ... </HEAD> <NOTICE> ... <ANT_HGT> ... </ANT_HGT> </NOTICE> <TAIL> ... </TAIL> | <?xml version="1.0"?> <ENOTICE> <HEAD> ... </HEAD> <NOTICE> ... <ANT_HGT> ... </ANT_HGT> </NOTICE> <TAIL> ... </TAIL> </ENOTICE> |
Keys representation
All the keys in the existing SGML format are preserved in the XML format except the optional key t_char_set in HEAD section.
Table 2 describes keys’ representation in the XML format.
Table 2: keys representation
SGML format | XML format |
---|---|
t_adm = SUI | <t_adm>SUI</t_adm> |
Key with attribute | |
t_eff_hgt@azm000 = 1 | <t_eff_hgt azm="0">1</t_eff_hgt> |
Key with multiple values | |
t_nat_srv = AX t_nat_srv = CO t_nat_srv = CP | <t_nat_srv>AX</t_nat_srv> <t_nat_srv>CO</t_nat_srv> <t_nat_srv>CP</t_nat_srv> |
Encoding (t_char_set)
In the SGML notifications format, encoding is specified under the HEAD section using the optional key t_char_set. The only possible value is ISO-8859-1.
The key t_char_set is no longer needed in the XML format and should not be notified. In XML format, encoding type is included in the prolog section of the XML document.
XML Standard stands that encoding field is optional. If not specified, then the default encoding UTF-8 is considered. This applies to XML format of notifications as well.
The prolog syntax for the UTF-8 default encoding is as follows:
<?xml version="1.0"?>
The prolog syntax for the ISO-8859-1 encoding is as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
Notification example
<?xml version="1.0"?>
<ENOTICE>
<HEAD>
<t_adm>SUI</t_adm>
</HEAD>
<NOTICE>
<t_notice_type>T01</t_notice_type>
<t_fragment>GE84</t_fragment>
<t_action>ADD</t_action>
<t_adm_ref_id>MEILEN-ID</t_adm_ref_id>
<t_freq_assgn>98.6</t_freq_assgn>
<t_long>+0083952</t_long>
<t_lat>+471711</t_lat>
<t_site_name>MEILEN HINTER-PFANNENSTIL</t_site_name>
<t_bdwdth>300</t_bdwdth>
<t_ctry>SUI</t_ctry>
<t_eff_hgtmax>277</t_eff_hgtmax>
<t_ant_dir>ND</t_ant_dir>
<t_erp_v_dbw>23</t_erp_v_dbw>
<t_hgt_agl>11</t_hgt_agl>
<t_polar>V</t_polar>
<t_remarks>Art 4,Art 5</t_remarks>
<t_site_alt>722</t_site_alt>
<t_tran_sys>4</t_tran_sys>
<ANT_HGT>
<t_eff_hgt azm="0">237</t_eff_hgt>
<t_eff_hgt azm="10">247</t_eff_hgt>
<t_eff_hgt azm="20">241</t_eff_hgt>
<t_eff_hgt azm="30">232</t_eff_hgt>
<t_eff_hgt azm="40">214</t_eff_hgt>
<t_eff_hgt azm="50">206</t_eff_hgt>
<t_eff_hgt azm="60">192</t_eff_hgt>
<t_eff_hgt azm="70">197</t_eff_hgt>
<t_eff_hgt azm="80">204</t_eff_hgt>
<t_eff_hgt azm="90">214</t_eff_hgt>
<t_eff_hgt azm="100">218</t_eff_hgt>
<t_eff_hgt azm="110">218</t_eff_hgt>
<t_eff_hgt azm="120">235</t_eff_hgt>
<t_eff_hgt azm="130">265</t_eff_hgt>
<t_eff_hgt azm="140">277</t_eff_hgt>
<t_eff_hgt azm="150">215</t_eff_hgt>
<t_eff_hgt azm="160">208</t_eff_hgt>
<t_eff_hgt azm="170">106</t_eff_hgt>
<t_eff_hgt azm="180">95</t_eff_hgt>
<t_eff_hgt azm="190">95</t_eff_hgt>
<t_eff_hgt azm="200">104</t_eff_hgt>
<t_eff_hgt azm="210">119</t_eff_hgt>
<t_eff_hgt azm="220">180</t_eff_hgt>
<t_eff_hgt azm="230">198</t_eff_hgt>
<t_eff_hgt azm="240">174</t_eff_hgt>
<t_eff_hgt azm="250">170</t_eff_hgt>
<t_eff_hgt azm="260">159</t_eff_hgt>
<t_eff_hgt azm="270">168</t_eff_hgt>
<t_eff_hgt azm="280">200</t_eff_hgt>
<t_eff_hgt azm="290">229</t_eff_hgt>
<t_eff_hgt azm="300">239</t_eff_hgt>
<t_eff_hgt azm="310">231</t_eff_hgt>
<t_eff_hgt azm="320">178</t_eff_hgt>
<t_eff_hgt azm="330">103</t_eff_hgt>
<t_eff_hgt azm="340">147</t_eff_hgt>
<t_eff_hgt azm="350">197</t_eff_hgt>
</ANT_HGT>
<COORD>
<t_adm>AUT</t_adm>
<t_adm>F</t_adm>
<t_adm>I</t_adm>
</COORD>
</NOTICE>
<TAIL>
<t_num_notices>1</t_num_notices>
</TAIL>
</ENOTICE>