Custom Esri elements in 51ExportTemplate

Disponible avec une licence Aviation Charting.

Three types of custom Esri defined elements are used in the 51ExportTemplate.xml file: AIS primary table grouping, referenced templates including the basic referenced template and the parameterized template, and Nilreason configuration elements. These elements are used to associated AIS tables with AIXM features and are removed during the export process so they don’t display in the final exported AIXM file.

Attention :

It is recommended that you create backup copies of the outlined configuration files before editing them to avoid data loss.

AIS primary table grouping elements

The root element in the template is used to associate AIS tables with AIXM features. Primary table grouping elements use AIS table names and contain one or more AIXM features. The structure of these elements and AIXM features create a one-to-many mapping of AIS tables to AIXM features. They are the basis for how AIS data tables map to AIXM output. If the root element contains more than one AIXM feature, the subtype_field attribute must be set and the subtype attribute value must be defined for each subfeature in the descendent nodes.

The following example includes the AIS primary table grouping elements and defines the subtype feature:


<template>
  <primarytable_a>
    <aixm:PrimaryFeature_1 gml:id="{primarytable_a.clientkey_id}">
    </aixm:PrimaryFeature_1>
  </primarytable_a>
  <primarytable_b >
    <aixm:PrimaryFeature_2 gml:id="{primarytable_b.clientkey_id}">
    </aixm:PrimaryFeature_2>
  </primarytable_b>
  <primarytable_c subtype_field="subtype_code">
    <aixm:SubtypeFeature_3 gml:id="{primarytable_c.clientkey_id}" subtype="Omega">
    </aixm:SubtypeFeature_3>
    <aixm:SubtypeFeature_4 gml:id="{primarytable_c.clientkey_id}" subtype="Upsilon">
    </aixm:SubtypeFeature_4>
    <aixm:SubtypeFeature_5 gml:id="{primarytable_c.clientkey_id}" subtype="Sigma">
    </aixm:SubtypeFeature_6>
  </primarytable_c>  
</template>

The example below shows how a sample adhpsurfacearea primary table grouping element maps to four potential features: Runway, Runway, Taxiway, and Apron. This element must define the subtype_field attribute to allow the exporter to determine the AIXM feature that will write to the AIXM output file. For a given adhpsufacearea table row, if the adhpsufacearea.subtype_code value is Taxiway, aixmTaxiway will write to the output.


<template>
  <adhp>
    <aixm:AirportHeliport gml:id="{clientkey_id}" />
  </adhp>
  <adhpsurfacearea subtype_field="subtype_code">
    <aixm:Runway gml:id="{clientkey_id}" subtype="Runway" />
    <aixm:Runway gml:id="{clientkey_id}" subtype="fato" />
    <aixm:Taxiway gml:id="{clientkey_id}" subtype="Taxiway" />
    <aixm:Apron gml:id="{clientkey_id}" subtype="Apron" />
  </adhpsurfacearea>
  <atsroute>
    <aixm:RouteSegment gml:id="{clientkey_id}" />
  </atsroute>
</template>

Referenced templates

Referenced templates are reusable pieces of XML code that can be inserted into other parts of the template by placing the <referenced name=”the name of the referenced template”> element in the desired location. There are three types of referenced templates: contact, annotation, and temporality. The basic referenced templates contain two defined templates: contact and temporality. The parameterized referenced template contains the annotation template. These templates are distinguished by the referenced="true" attribute. The export process automatically inserts a referenced template into any place that refers to its name.

Basic referenced templates

Basic referenced templates are reusable pieces of XML that can be substituted into other parts of the template by referring to them. They are distinguished from other elements by the referenced=”true” attribute. The export process automatically inserts a referenced template into any place that references its template name. There are two defined basic referenced templates: contact and temporality.

You must set up the template definition and template reference for a basic referenced template.

The template definition must include the referenced=”true” attribute. The template reference determines where the template is placed in the XML using the referenced element and the name=”the template name” attribute. The reference sets up where the template is placed in other parts of the XML.

The following code sample shows the basic referenced template setup:


<template>

  <primarytable_a>
    <aixm:Feature_1 gml:id="{clientkey_id}">
      <aixm:timeSlice>
        <aixm:Feature_1_TimeSlice gml:id="{guid}">
          <aixm:name>{primarytable_a.name_txt}</aixm:name>
          <referenced name="basic_template_iota" />
        </aixm:Feature_1_TimeSlice>
      </aixm:timeSlice>
    </aixm:Feature_1>
  </primarytable_a>

  <basic_template_iota referenced="true">
    <aixm:Feature_2 duplicate="related_table_a.clientkey_id">
      <aixm:field1>{related_table_a.field_1}</aixm:field1>
      <aixm:field2>{related_table_a.field_2}</aixm:field2>
    </aixm:Feature_2>
  </basic_template_iota>

<template>

In the following example, a template is referenced using basic referenced template elements:


<template>

  <adhp>
    <aixm:AirportHeliport gml:id="{clientkey_id}">
      <aixm:timeSlice>
        <aixm:AirportHeliportTimeSlice gml:id="{guid}">
          <aixm:name>{adhp.name_txt}</aixm:name>
          <referenced name="contact"/>
        </aixm:AirportHeliportTimeSlice>
      </aixm:timeSlice>
    </aixm:AirportHeliport>
  </adhp>

  <contact referenced="true">
    <aixm:contact duplicate="address.clientkey_id">
      <aixm:ContactInformation removeIfOnlyAttributes="true" gml:id="{guid}">
        <aixm:name>{address.name_txt}</aixm:name>
        <aixm:title>{address.title_txt}</aixm:title>
      </aixm:ContactInformation>
    </aixm:contact>
  </contact>
<template>

Parameterized referenced template

Parameterized referenced template elements are reusable blocks of XML code that can be substituted into other parts of the 51ExportTemplate file. They are simular to basic referenced templates, but they allow for further customization of the template using parameter inputs. They are distinguished from other elements by the referenced=”true” attribute and include at least one with-param element. Annotation is the only parameterized referenced template currently defined.

You must set up the template definition with parameters and template reference with passed-in parameters for a parameterized referenced template.

The template definition must have the referenced=”true” attribute and contain at least one param element. Each param element must define a name attribute value and a default attribute value. Each param element can be substituted in the body of the template by referencing the param name prefixed by $.

The template reference is set up using the referenced element name and the name=”the template name” attribute. The reference determines where the template is placed in the XML. The template reference should pass in with-param elements for each defined parameter. Each with-param element must set a name attribute value with a param name that was defined in that template. Also, each with-param element must set the value attribute. If an expected parameter is missing from the template reference, that template param default value is used during the parameter substitution process.

The following sample shows how parameterized referenced template setup:


<template>

  <primarytable_b>
    <aixm:Feature_3 gml:id="{clientkey_id}">
      <aixm:timeSlice>
        <aixm:Feature_3_TimeSlice gml:id="{guid}">
          <aixm:name>{primarytable_b.name_txt}</aixm:name>
          <referenced name="parametereized_template_gamma">
            <with-param name="param_1" value="special_key_1" />
            <with-param name="param_2" value="{primarytable_b.field_1}" />
            <with-param name="param_3" value="{primarytable_b.field_2}" />
          </referenced>
          </aixm:Feature_1_TimeSlice>
      </aixm:timeSlice>
    </aixm:Feature_3>
  </primarytable_b>

  <parametereized_template_gamma referenced="true">
    <param name="param_1" default="default_val_1" />
    <param name="param_2" default="" />
    <param name="param_3" default="" />
    <aixm:feature_4 duplicate="$param_1" attr2="$param_2">
      <aixm:field1>$param_3</aixm:field1>
      <aixm:field2>{related_table_b.field_2}</aixm:field2>
    </aixm:feature_4>
  </parametereized_template_gamma>

</template>

The example below shows the parameterized referenced template elements. It includes the template definition and template reference. The parameterized template annotation value is referenced in two places:

  • VerticalStructurePart/annotation
  • ElevatedPoint/annotation

Each template reference passes in the duplicate, matchXPath, and rowXPath parameters. The template definition substitutes those parameter values into the body of the template where the $ prefix parameter is referenced. A parameter value can be substituted into an attribute such as matchXPath or as element text, for example using the aixm:note element. Refer to the advanced duplicate attribute for an explanation of the matchXPath and rowXpath attributes.


<template>
  <obstaclestructure>
    <aixm:VerticalStructure>
      <timeSlice>
        <aixm:VerticalStructureTimeSlice>
          <part>
            <aixm:VerticalStructurePart>
              <referenced name="annotation">
                <with-param name="duplicate" value="point_notes_oid" />
                <with-param name="matchXPath" value="auto" />
                <with-param name="rowXPath" value="notes.source_xpath" />
              </referenced>
              <aixm:horizontalProjection_location>
                <aixm:ElevatedPoint>
                  <referenced name="annotation">
                    <with-param name="duplicate" value="point_notes_oid" />
                    <with-param name="matchXPath" value="auto" />
                    <with-param name="rowXPath" value="notes.source_xpath" />
                  </referenced>
                </aixm:ElevatedPoint>
              </aixm:horizontalProjection_location>
            </aixm:VerticalStructurePart>
          </part>
        </aixm:VerticalStructureTimeSlice>
      </timeSlice>
    </aixm:VerticalStructure>
  </obstaclestructure>
  <annotation referenced="true">
    <param name="duplicate" default="notes.objectid" />
    <param name="matchXPath" default="" />
    <param name="rowXPath" default="" />
    <param name="noteText" default="{notes.note_txt}" />
    <aixm:annotation duplicate="$duplicate" matchXPath="$matchXPath" rowXPath="$rowXPath">
      <aixm:Note gml:id="{guid}">
        <aixm:propertyName>{notes.a51propname_txt}</aixm:propertyName>
        <aixm:purpose>{notes.type_code}</aixm:purpose>
        <aixm:translatedNote>
          <aixm:LinguisticNote gml:id="{guid}">
            <aixm:note>$noteText</aixm:note>
          </aixm:LinguisticNote>
        </aixm:translatedNote>
      </aixm:Note>
    </aixm:annotation>
  </annotation>
</template>

Nilreason configuration elements

Nilreason configuration elements define values that the exporter uses to populate specified AIXM elements that have missing source AIS data. In such cases, the exporter inserts a special marker nilreason element in the XML output in the locations where the data would have been.

Nilreason configuration elements are set up in the nilreason element. The nilreason element can be defined with any number of reason descendent nodes. Each reason node can contain any number of target paths. Each target path has two parts: the ancestor path and the terminal element (the last element in the target path). Multiple target paths are separated by a new line. The ancestor path should be the sufficiently qualified name to identify the specific terminal element in an AIXM feature. The ancestor path must be sufficiently defined to identify the specific terminal element in an AIXM feature. The target path elements must contain the aixm: prefix as shown.

The current template is set up with four default nilreason elements: withheld, unknown, inapplicable, and otherNOTAM. They are initially empty and must be configured with target paths for the exporter to detect missing elements. Additional reason nodes of any name can be added as shown below:


<nilreason>
  <reason_1>
    aixm:ancestor_alfa:/aixm:ancestor_bravo/aixm:terminal_element_charlie
    aixm:ancestor_delta:/aixm:ancestor_echo/aixm:terminal_element_foxtrot
  </reason_1>
  <reason_2>
    aixm:ancestor_golf/aixm:ancestor_hotel/aixm:terminal_element_kilo
  </reason_2>
</nilreason>

Example template

This example configures the nilreason element for two reasons: withheld and inapplicable. The withheld reason is configured with a target path that detects missing aixm:annotations values under the verticalstructuretimeslice/part/verticalstructurepart locations. The inapplicable reason is configured with a target path that detects missing aixm:annotations values under the aixm:verticalstructuretimeslice location. For nilreason configuration elements to detect missing elements, the target path must be valid in the template. The template entry for obstaclestructure shows that annotation is expected in both of those locations—verticalstructuretimeslice/part/verticalstructurepart and verticalstructuretimeslice—and both target paths are valid.


<template>
  <obstaclestructure>
    <aixm:VerticalStructure gml:id="{clientkey_id}">
      <gml:identifier codeSpace="urn:uuid:">{clientkey_id}</gml:identifier>      
      <aixm:timeSlice>
        <aixm:VerticalStructureTimeSlice gml:id="{guid}">
          <aixm:part duplicate="obstaclepoint.clientkey_id">
            <aixm:VerticalStructurePart>
              <referenced name="annotation">
                <with-param name="duplicate" value="point_notes_oid" />
                <with-param name="matchXPath" value="auto" />
                <with-param name="rowXPath" value="notes.source_xpath" />
              </referenced>
            </aixm:VerticalStructurePart>
          </aixm:part>
          <referenced name="annotation" />
        </aixm:VerticalStructureTimeSlice>
      </aixm:timeSlice>
    </aixm:VerticalStructure>
  </obstaclestructure>

  <nilreason>
    <withheld>
        aixm:verticalstructuretimeslice/aixm:part/aixm:verticalstructurepart/aixm:annotation
    </withheld>
    <unknown></unknown>
    <inapplicable>
        aixm:verticalstructuretimeslice/aixm:annotation
    </inapplicable>
    <otherNOTAM></otherNOTAM>
  </nilreason>
</template>

Example output

This example AIXM output shows a verticalstructure feature in which the note data was missing from both target paths configured above. The exporter detected that note data was missing and inserted a nilreason marker element at each missing path location. The nilreason marker element name is the name of the terminal element annotation and has the nilReason attribute set to the associated reason configured in the template.


<hasMember>
  <aixm:VerticalStructure gml:id="uuid.724F18BF-5F46-456A-A458-CCA5A13F94C4">
    <gml:identifier codeSpace="urn:uuid:">724F18BF-5F46-456A-A458-CCA5A13F94C4</gml:identifier>
    <aixm:timeSlice>
      <aixm:VerticalStructureTimeSlice gml:id="uuid.9A201EFF-A172-4EEA-9DC1-C2AD2280FA8B">
        <aixm:part>
          <aixm:VerticalStructurePart gml:id="uuid.C8E3281E-FA4D-4F3A-9945-CB20B0A60D55">
            <aixm:annotation xsi:nil="true" nilReason="withheld" />
          </aixm:VerticalStructurePart>
          <aixm:annotation xsi:nil="true" nilReason="inapplicable" />
        </aixm:part>
        <aixm:VerticalStructureTimeSlice>
    </aixm:timeSlice>
  </aixm:VerticalStructure>

Rubriques connexes