Inline FME Schema Features
The xfMap has a mechanism to specify schema features in its content. This is done through the <schema-type> element’s <inline> element.
The <inline> element can contain zero or more <schema-feature> child elements. A <schema-feature> element represents an FME schema feature explicitly; it contains a type attribute that specifies a schema feature’s feature type, and zero or more <schema-attribute> elements that specify the schema feature’s attributes and attribute types.
The <schema-attribute> element has two required attributes, they are the name and type attributes. The value for the type attribute must be an FME attribute type: xml_char(#), xml_int16, xml_int32, xml_real32, xml_real64, xml_decimal(#,#), or xml_boolean.
The following example illustrates the usage of the <inline> element. When the XML Reader is requested for FME schema features and the xfMap below is used, then a schema feature of feature type states having 9 user-defined attributes – AREA, CODE, NAME, POP1990, POP90_SQMI, P_URBAN90, P_ING_LANG, P_EMPL_SEC, and HSE_UNIT90 – and no geometry is returned.
<?xml version="1.0" encoding="UTF-8"?>
<xfMap>
<schema-type>
<inline>
<schema-feature type="states">
<schema-attribute name="AREA" type="xml_decimal(16,3)"/>
<schema-attribute name="CODE" type="xml_char(4)"/>
<schema-attribute name="NAME" type="xml_char(25)"/>
<schema-attribute name="POP1990" type="xml_decimal(11,0)"/>
<schema-attribute name="POP90_SQMI" type="xml_decimal(20,6)"/>
<schema-attribute name="P_URBAN90" type="xml_decimal(20,6)"/>
<schema-attribute name="P_ING_LANG" type="xml_decimal(20,6)"/>
<schema-attribute name="P_EMPL_SEC" type="xml_decimal(20,6)"/>
<schema-attribute name="HSE_UNIT90" type="xml_decimal(11,0)"/>
<schema-attribute name="fme_geometry{0}" type="xml_no_geom"/>
</schema-feature>
</inline>
</schema-type>
...
</xfMap>