Generating FME Schema Features
The XML Reader can switch the given xfMap and XML input document when it is requested for schema features. This can be done through the
The
Consider the following input XML document. (It is the samepoints1.xmldocument used earlier and reproduced here for convenience.)
points1.xml
0.324 0.233 0.596 0.874 0.948 0.554
The following xfMap document,generate_points1.xmp, maps the elements in thepoints1.xmldocument into FME features:
generate_points1.xmp
This xfMap document maps elements from the points1.xml document. <generate xfMap="generate_points1_schemas.xmp" document="generate_points1_schemas.xml"/>
When thepoints1.xmlandgenerate_points1.xmpare fed into the XML Reader and FME data features are requested, then the following features are output:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++ ++ ++特征类型:`point'属性(字符串):`color'具有值`0.324,0.233,0.596'属性(String):`fme_geometry'具有值`fme_point'属性(字符串):`number'具有值`0'属性(字符串):`xml_type'有值`xml_point'几何类型:point(1)坐标数:1 - 坐标尺寸:2 - 坐标系:`'(10,0)============================================================+++++++++++++++++++++++++++++++++++++++++++++++!++++++++++++++++++++++++++++++++++++++++功能类型:`点”属性(字符串):“颜色”有值`0.874,0.948,0.554'属性(String):`fme_geometry'有值`fme_point'属性(字符串):`number'具有值`1'属性(字符串):`xml_type'具有值`XML_Point'几何类型:点(1)坐标数:1 - 坐标尺寸:2 - 坐标系:`'(5,5)==================================================================
Notice that thegenerate_points1.xmpxfMap contains a
Thegenerate_points1_schemas.xmldocument contains one
generate_points1_schemas.xml
The usage of the
fme_geometry{0} = “xml_point”
fme_geometry{1} = “xml_line”
fme_geometry{2} = “xml_area”
The type of user attribute, that is, the value of an attribute, must be one of the predefined FME types:xml_char(#),xml_int16,xml_int32,XML_REAL32.,xml_real64,xml_decimal(#,#), orxml_boolean.
The following xfMapgenerate_points1_schemas.xmpmaps the
This xfMap document maps elements from the generate_points1_schema.xml document.
Note:Nothing dictates that the xfMap generate_points1_schemas.xmp and the generate_points1_schemas.xml document should take the form of the example above. What is required when the
The document attribute in the
Example:
<模式类型> <生成xfMap = " schemas.xmp” document=”#dataset”/>
The #self token may be used for the xfMap attribute in the
Example: