Documentation Center

XML Parser rule settings

The XML parser rules tell SDL Trados Studio how to process the elements found in XML documents. These rules dictate what content is extracted for translation and how this content is displayed in the Editor view.

Opening the Parser page for an XML file type

  • To open the Parser page and change the HTML file type settings for all future projects, go to File > Options > File Types > [XML file type] > Parser.
  • To open the Parser page and change the HTML file type settings for the active project, go to Project Settings > File Types > [XML file type] > Parser.

Settings on the XML Parser page

This page lists the XML parser rules that SDL Trados Studio considers when processing XML documents. You can add, delete or modify these rules by using the Add, Edit or Remove buttons on this page.
OptionDescription
Search for

Type a rule name in this field to search for an existing XML parser rule. SDL Trados Studio automatically jumps to the first rule corresponding to the search criteria.

Use the Previous and the Next arrows to navigate through the rules containing the search keyword.

If you use the same name (but specify different settings) for multiple rules, SDL Trados Studio prioritizes the most general one, with the least conditions assigned. You can use the Prioritize and the De-prioritize arrows to change the order that SDL Trados Studio considers when applying parse rules with the same name.

Rule

The syntax that defines a parser rule. You define this syntax when you fill in the Element, Attribute or XPath fields on the Add Rule or Edit Rule page. When an element or attribute in the XML document matches this rule, SDL Trados Studio applies the settings specified on the Translate, Tag Type, Context and Formatting columns.

Translate

Shows whether the XML elements that match the corresponding rule can be edited for translation in the Editor. Depending on the tag type, untranslatable content might not be displayed in the Editor. Double-click on a rule to open the Edit Rule dialog box and change the Translate property.

Tag Type
Shows how the XML elements will be displayed in the Editor:
  • Inline tags - Shows formatting information and the translatable content extracted from the XML element is available for editing.
  • Structure tags - The element creates a new paragraph unit in the target file. Only translatable attributes inside structure elements are displayed in the Editor.
Context

Shows the Structure Information properties specified for a structure element. Double-click on a rule then click Edit next to the Structure info section to change the information about the context of an element inside an XML document. The information that you specify here is available in the Editor view, in the Document Structure column and the Document Structure tree.

Formatting

Shows the formatting settings for displaying the contents of an inline tag in the Editor.

Import
Select this option to import parser rules settings that were created for a different file. You can also import rules when creating a new XML file type in the Creating a File Type wizard.
Remove

Select a parser rule and select this option to delete this rule from the list of rules that SDL Trados Studio considers when parsing an XML document.

Disable/Enable

Select a parser rule and select this option to disable or enable an existing rule for parsing XML elements. If a rule is disabled, SDL Trados Studio no longer consider it when extracting XML content from your XML files.

Add/Edit

Select this option to display the dialog that allows you to change the XML parser rules and their settings.