Writer Directives

下面列出了由XML编写器处理的指令。显示的后缀是由当前的前缀in a mapping file. By default, thefor the XML writer isXML

DATASET

必填/可选:Required

This keyword specifies the location for the output XML document.

Workbench Parameter:目的地XML(可扩展标记语言)文件

例子:

xml_dataset c:\ data \ catchases.xml

PRETTY_PRINT

必填/可选:Optional

This directive specifies whether the output XML document should be pretty-printed with indentation. The valid values for this directive are YES and NO. The default value is NO.

XML_PRETTY_PRINT是

Workbench Parameter:Pretty Print

INDENT_SIZE

必填/可选:Optional

This directive takes effect whenPRETTY_PRINT被设置为是。它指定缩进大小。此指令的有效值是数字0到9.此指令的默认值为1。

XML_INDENT_SIZE 3

Workbench Parameter:缩进大小

REPLACE_TABS_WITH_SPACES

必填/可选:Optional

By default the Tab character is used to pretty-print the indentations; set this directive to YES to substitute the Tab character with a Space. The size of a single indentation is controlled by theINDENT_SIZEdirective. The valid values for this directive are YES and NO. The default value is NO.

xml_replace_tabs_with_spaces是

Workbench Parameter:Replace Tabs with Spaces

text_indent.

必填/可选:Optional

text_indent_no.

Workbench Parameter:文本缩进

XSD_DOC

必填/可选

Optional

Specifies the location for the XML Schema document. This keyword is optional. If the keyword is not specified or if it does not contain a path, then the XML Schema document is generated in the same folder as the one specified through theDATASETkeyword. If this keyword is set to a URI, then XSD output will be suppressed.

Note:如果存在任何特殊功能类型XML_ROOT_ELEMENT和XML_FRAGMENT,则适用XSD_DOC指令。

Workbench Parameter:XML Schema Document

例子:

XML_XSD_DOC c:\data\purchases.xsd

TARGET_NS_URI

必填/可选:Optional

This keyword allows the specification of the target namespace URI for the generated XML Schema document. All elements in the XML Schema document will reside in this namespace.

The default value for this keyword is:

http://www.亚搏在线safe.com/xml/xmltables.

Workbench Parameter:Target Namespace URI

例子:

XML_TARGET_NS_URI http://www.mytables.com/purchases.

TARGET_NS_PREFIX

这个指令允许焦油的规范get namespace prefix for the generated XML Schema document.

The default value depends on the value of TARGET_NS_URI. If TARGET_NS_URI is using the default value, the default value for this directive isfme。If TARGET_NS_URI is not using the default value, the default value for this directive becomes the default prefix, which is the empty string.

必填/可选

Optional

映射文件语法

xml_target_ns_prefix ps.

Workbench Parameter

目标命名空间前缀

XML_NAMESPACE_DECLARATIONS

必填/可选

Optional

This keyword specifies additional XML Namespace Declarations for the root element in the output dataset. The values for this directive are white space separated prefix and URIs pairs, no default namespace declarations are allowed with this directive.

例子

XML_NAMESPACE_DECLARATIONS gml http://www.opengis.net/gml xlink http://www.w3.org/1999/xlink

Workbench Parameter

XML Namespace Declarations

TABLES_SEQUENCE

必填/可选

Optional

The sequence order for the rows in the outputDATASETdefaults to following the order of the XMLDEFline specification in the FME mapping file. This keyword allows the user to change the order by specifying a sequence of table names; the sequence must be a subset of the tables defined by theDEF线条。

例子

如果是XMLDEFlines define four tables with names – state, river, city, and road – then theTABLES_SEQUENCE可用于通过指定控制输出序列,以城市,州,河流和道路指定:

XML_Tables_Sequence'City State River Road'

or

XML_TABLES_SEQUENCE ‘city state’

第二种替代方案是有效的,因为未列出的剩余表将按照映射文件XML的顺序输出DEF线条。

Note:The value of the XML_TABLES_SEQUENCE keyword must be enclosed in quotes if more than one table is listed.

TABLES_ROOT_ELEMENT

必填/可选:Optional

允许规范输出的根元素名称DATASET。If it is not specified, the root element name defaults toxml-tables

Workbench Parameter:Tables Root Element Name

例子:

XML_TABLES_ROOT_ELEMENT购物

WRAP_TABLES

必填/可选:Optional

此关键字的有效值是是的andnoWhen this keyword is set to是的, the elements which represent the rows for a particular table within the outputDATASETdocument will be wrapped by a container element. The default value for this keyword is是的

The wrapper element name will be the name of the rows prepended by the value of theTABLE_WRAPPER_PREFIX并提出了所值TABLE_WRAPPER_SUFFIX

Workbench Parameter:包裹表元素

例子:

XML_WRAP_TABLES yes

TABLE_WRAPPER_PREFIX

必填/可选:Optional

此关键字与该关键字结合使用WRAP_TABLESkeyword, and will take effect only if that keyword is set to是的。此关键字的默认值是空字符串。

Workbench Parameter:Table Wrap Prefix

例子:

xml_table_wrapper_prefix前缀 -

TABLE_WRAPPER_SUFFIX

必填/可选:Optional

此关键字与该关键字结合使用WRAP_TABLESkeyword and will take effect only if that keyword is set to是的。The default value for this keyword is-table

Workbench Parameter:表包裹后缀

例子:

XML_TABLE_WRAPPER_SUFFIX -MYTABLE.

suppress_xml_document.

必填/可选:Optional

此关键字的有效值是yes和no。此关键字允许抑制实际的XML文档。此关键字的默认值为否。

Workbench Parameter:Suppress XML Document

例子:

XML_SUPPRESS_XML_DOCUMENT no

SUPPRESS_XSD_DOCUMENT

必填/可选:Optional

此关键字的有效值是yes和no。此关键字允许抑制XML模式文档。如果是XSD_DOC关键字设置为URI,无论此值如何,都会抑制XSD输出。此关键字的默认值为否。

Workbench Parameter:Suppress XSD Output

例子:

xml_suppress_xsd_document no.

GENERATE_XFMAP

Note:本指令被推翻为FME 2013。

必填/可选:Optional

此关键字的有效值是是的andno。This keyword allows the generation of a tailored xfMap document that can be used by the XML Reader to read the outputDATASETdocument back to the FME. The default value for this keyword isno

Workbench Parameter:Generate XML Map Document

例子:

XML_GENERATE_XFMAP yes

XFMAP.

Note:本指令被推翻为FME 2013。

必填/可选:Optional

This keyword takes effect only ifGENERATE_XFMAPis set to是的; it specifies the location and filename for the xfMap document to be generated. If it is not specified, then the location defaults to the same folder as the one inDATASET,文件名成为基本名DATASET加上.xmp.extension.

Workbench Parameter:XML地图文档

例子:

xml_xfmap c:\ data \ contaceases.xmp

GENERATE_ROW_ID

必填/可选:Optional

此关键字的有效值是是的andno。When this keyword is set to是的, an ID attribute of XML Schema type ID will be generated for each element that represents a row of a table. The name of the attribute may be set by theROW_ID_ATTR_NAMEkeyword. The values generated for the ID attribute will be unique for the entire outputDATASET。唯一的值只是从1开始的正整数数量生成,因为XML模式ID类型不允许ID以数字开始,因此row_id_prefix.keyword’s value is used to prefix the ID. The default value for this keyword isno

Workbench Parameter:生成行ID属性

例子:

xml_generate_row_id是的

ROW_ID_ATTR_NAME

必填/可选:Optional

This keyword only takes effect ifGENERATE_ROW_IDis set to是的。它指定表示表格一行的每个元素的ID属性的名称。此关键字的默认值是“row-id.”.

Workbench Parameter:Row ID Attribute Name

例子:

XML_ROW_ID_ATTR_NAME myID

row_id_prefix.

必填/可选:Optional

This keyword only takes effect ifGENERATE_ROW_IDis set to是的。It specifies the prefix for the unique positive integers that are generated as the values for the row IDs. This value may not start with a digit and its default value is “ID”.

Workbench Parameter:行ID前缀

例子:

XML_ROW_ID_PREFIX fid

Will generate ID values:FID1,FID2,FID3,。。。。

apply_stylesheet.

必填/可选:Optional

This keyword allows an XSLT style sheet to be applied to the final outputDATASETdocument. TheSTYLESHEET_RESULT关键字可以与此关键字结合使用,以指定生成的转换的位置和文件名。此关键字没有默认值。

Workbench Parameter:XSLT Style Sheet to Apply

例子:

XML_APPLY_STYLESHEET c:\data\myTransform.xsl

STYLESHEET_RESULT

必填/可选:Optional

This keyword only takes effect ifapply_stylesheet.指定了。当不存在此关键字或其值是空字符串时,生成的XSLT转换将具有与输出相同的位置和文件名DATASETwith the exception that the filename will be prefixed withtransformed_

Workbench Parameter:编写样式表文件

例子:

XML_STYLESHEET_RESULT c:\data\myTransformedDoc.xml

output_encoding.

必填/可选:Optional

Specifies the encoding for the outputDATASETdocument. The default value for this keyword isUTF-8

Workbench Parameter:输出数据集编码

例子:

XML_OUTPUT_ENCODING UTF-16

XML_ROOT_ELEMENT_APPEND_PATH

必填/可选:Optional

This keyword specifies a single element, or a path to a single element, in the document specified by theXML_ROOT_ELEMENTfeature type.

Each element in the path is separated by a forward slash, ‘/’, a wildcard, ‘*’, may also be used as the prefix or local-name of the element, e.g., ‘*:e’, ‘p:*’, or just ‘*’, which translates to ‘*:*’.

The keyword default value is the empty string. This will match or select the root element.

Consider the following XML document:

     

To insert fragments after the element, we can either:

  1. SelectXML_ROOT_ELEMENT_APPEND_PATHas “data/initialize”, and
  2. SetAPPEND_XML_FRAGMENTS_ASas成功_siblings.

或者:

  1. SelectXML_ROOT_ELEMENT_APPEND_PATHas “data/finalize”, and
  2. SetAPPEND_XML_FRAGMENTS_ASasPRECEDING_SIBLINGS

例子

XML_XML_ROOT_ELEMENT_APPEND_PATH数据/集合

Workbench Parameter

XML_ROOT_ELEMENT Append Path

APPEND_XML_FRAGMENTS_AS

必填/可选:Optional

This keyword controls how the fragments are inserted into the document in relation to the selected or matched element. The possible values for the parameter are:

  • preceding_children.
  • SUCCEEDING_CHILDREN
  • PRECEDING_SIBLINGS
  • 成功_siblings.

与所选或匹配的元素相关的值应理解。

The default value for this keyword isSUCCEEDING_CHILDREN

Workbench Parameter

附加XML_FRAGMENTS

例子

XML_APPEND_XML_FRAGMENTS_AS PRECEDING_SIBLINGS