Writer Overview
The SVG writer converts a set of FME features into geometric SVG elements. These elements are output in a document with three sections: the template section, the layer section and the geometric section.
- The template section is composed of a single non-extended SVG document.
- The layer section is embedded in the template section, and is composed of zero to more SVG group elements
- The geometric section is embedded in the layer section, and is composed of zero to more geometric SVG elements.
In the layer section, one SVG group element is produced for each unique feature type in a writer’s feature set. The id attribute on this group element is set equal to the feature type name. The layer is inserted immediately before the template document’s closing root element tag.
The document’s geometric section contains a single SVG element for each FME feature that is sent to the writer. These elements are grouped according to their feature type and embedded under the group element with a matching ID in the layer section.
The SVG writer does not check FME attribute name characters that are invalid XML attribute name characters. FME attribute names are transcoded from the operating system’s local code page to UTF-8 and written directly to the SVG document; the writer does not escape any attribute name characters into character entities. It is the responsibility of the user to ensure the FME attribute names are valid XML attribute names.