File type filters use a default set of Parser rules for extracting content from the most important types of XML files. Use the Parser rule settings to define the properties of the XML parser rules. As a result, WorldServer can better sort translatable from non-translatable text and correctly display the extracted content.
- Go to Management > Linguistic Tool Setup > File Types
- Expand the Custom XML (Embedded Content Processor) File Type or Custom XML (Legacy Embedded Content) File Type
- Click Add to create a new filter
- Open the new filter and go to Parser
- Select Add....
- In the Add Rule dialog, select a rule type from the Rule type list. WorldServer uses XPath to specify the applicable nodes. This specification helps WorldServer to identify the rule, and so does not allow you to have two rules with the same XPath location. Provide one of the following:
- Attribute - Provide the element attribute pair, even if you do not know XPath syntax.
- Element - Provide an element name, even if you do not know XPath syntax.
- XPath - Provide the XPath directly.
- Under Properties:
- In the Translate list, assign a translation setting to an XML element:
- Always translatable - The content of the XML element can be edited in the Editor view.
- Not translatable - The content is displayed as locked content and cannot be edited. When a translatable element creates a separate segment, Trados Studio only displays it with the All content filter in the Review tab. This is because you would not normally need to see a segment that only contains locked and not translatable content.
- Translatable (but not in protected content) - Translatable unless the parent element is not translatable. Effectively the same as Not Specified.
- Not specified - The element inherits the parent's translatable setting if there is such a setting. Otherwise, the setting is Translatable.
- Content is translatable if any of the following is true:
- The content is not subject to a Parser rule.
- The content is set in the Parser rule to translatable.
- The content inherits the translatable setting from its ancestor.
- In the Tag Type list, decide how the Parser rule displays an element. WorldServer can force an element to be presented to the translator as a tag. A tag can also have translatable text. A tag can be specified as any of the following:
- Inline with the text - The content is displayed to the translator.
- Structure tag - The element creates a new paragraph unit in the target file.
- Not specified - The element inherits the parent's tag setting if there is such a setting. Otherwise, the setting is Structure.
- In the Whitespace list, Choose whether WorldServer preserves or normalizes any whitespace in your document. Preservation means that whitespace is not modified. Normalization replaces whitespace with a single space. Normalization is done when the file is converted to *.sdlxliff. This setting overrides the setting in the Whitespace page of your XML file type.
- Inherit Parent. Whitespace handling is inherited from the parent element
- Always preserve. Whitespace is not normalized
- Normalize unless xml:space='preserve'. Whitespace is normalized unless the element has xml:space='preserve'
- Always normalize. Whitespace is always replaced with a single space
- In the Formatting section, decide how formatting applies to inline tags and how the contents of an inline tag is displayed. For example, you might want text within an inline tag pair <b> ... </b> to be displayed as bold text. Select Edit and choose one of the following:
- Inherit - Applies the style that is specified for the parent, if there is such a setting.
- Activate - Applies that style to the text.
- Deactivate - Does not apply that style to the text.
- Tip: The Sample box shows a preview of how the text extracted by the rule will look in the Editor.
- In the Structure info section, you can add extra details about the context of a structure element in XML files. You can also use structure information to control how WorldServer displays the content of structure tags in the Browser Workbench. Select Edit next to the Structure info field to change the structural properties for an XML element.
- Restriction: You can only add document structure information for structure tags.
- Select OK.