Format Trait Info (*.fti)
Format Trait Info files end in the .fti extension. Format Trait Info files are located in both the ePublisher Designer Transforms directory, and the format directories of each output target.
Explanation
In every project, the user has a series of format and style options to customize the appearance of his output. In the GUI, these options can be accessed and manipulated through Target Settings and Style Designer on the ePublisher Designer toolbar. For the ePublisher Designer engine, these customization options reside in the Format Trait Info (*.fti) files. Manipulating these files allows for customizing the location of options, creating or deleting options and parameters, or adjusting their values, or choosing a new default value.
Format Trait Info files must have the same base file name (that is, the file name without the file extension) as an XSL file in the current format in order to be processed by ePublisher Designer. The information displayed in the ePublisher GUI represents all Format Trait Info files associated with a given format. So, two or more Format Trait Info files may define a <Setting /> but would only be displayed once in the GUI.
When ePublisher Designer is generating output, the settings specified in Target Settings and Style Designer are consulted, stored in the project file (.wep) and incorporated in the final generation of output.
Components
There are four elements in an Format Trait Info (.fti) file.
<Classes>
The only child element in <Classes> is <Class>. <Class> has a child element of <Item>. See Example 1 for sample code.
To facilitate organization, values for a given option may be grouped together as <Items> in a <Class>. The <Class> element can then be applied in the <Settings> and <RuleTraitsSet> elements to declare the options available for that specific option.
<Classes>
<Class name="boolean">
<Item value="true" stringid="boolean-true" />
<Item value="false" stringid="boolean-false" />
</Class>
<Class name="color-name">
<Item value="transparent" />
<Item value="aqua" />
<Item value="black" />
<Item value="white" />
<Item value="yellow" />
</Class>
</Classes>
Example 1: Sample Code Illustrating Child Elements, Attributes, and Values in the <Classes> Element
<Groups>
The only child element to <Groups> is <Group>. The <Groups> element defines items that can be used to group properties available in the Style Designer. Users can create groups and apply the group element tag in the appropriate location in the <Settings> and <RuleTraitsSet> elements of the Format Trait Info (.fti) file. This will assemble all <Settings> with a similar group together in the appropriate section of the GUI.
<Settings>
The only child element of the <Settings> element is <Setting>. The <Setting> element defines the parameters for the GUI’s Target Settings dialog. A user may customize the target settings by making changes in this portion of the Format Trait Info (.fti) file.
<RuleTraitsSet>
The only child element of the <RuleTraitsSet> element is <Options>. <Options> contains the child element <option>. See Example 2 for sample code.
The <option> element defines the parameters for the GUI’s Properties and Options Tabs in the Style Designer. A user may customize the Style Designer by making changes in this portion of the Format Trait Info (.fti) file.
<RuleTraitsSet>
<RuleTraits category="Graphic">
<Options>
<Option name="file-extension" group="options" default=".jpg">
<OptionClass name="file-extension" />
</Option>
<Option name="format" group="options" default="jpeg">
<OptionClass name="image-format" />
</Option>
<Option name="color-depth" group="options" default="24">
<OptionClass name="color-depth" />
</Option>
</Options>
</RuleTraits>
</RuleTraitsSet>
Example 2: Sample Code Illustrating Child Elements, Attributes, and Values in the <RuleTraitsSet> Element
Relationships
Format Trait Info appears in the ePublisher Designer user interface. When a user effects changes to these setting through the user interface, those changes are written to the project file (*.wep). A format’s XSL transformations then have access to these values by reading the project file.
Was this helpful?
Last modified date: 08/16/2017