Add/Edit Rule

Use the Add Rule and Edit Rule dialog boxes to create and maintain parser rules.

To display this dialog box, click Add or Edit on the Parser Rules page.

Box

Description

Rule Type

This box provides three different ways to specify an XPath location for the rule.

  • XPath. Specify the XPath directly.

  • Attribute. Specify the XPath by providing an element attribute pair.

    If you select Attribute, you must set the Translate property (see next box) to Always translatable, or the rule will not be applied.

  • Element. Specify the XPath by providing an element name.

The idea of the Attribute and Element options is to enable you to specify a rule even if you do not know XPath syntax.

Properties

Click here for more information about specifying the structure of text files.

Box

Description

Translate

Choose from the drop-down list:

  • Always translatable

  • Not translatable.
    The content is displayed to the translator as locked content, which means it cannot be edited.

  • 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.

Tag Type

Choose a tag type from the drop down list:

  • Inline. The element is displayed in the Editor window.

  • Structure. The element creates a new paragraph unit.

  • Not specified. The tag type is set to Structure.

Whitespace

Choose an option from the drop-down list.

  • Inherit from 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.

This setting overrides the setting in the Whitespace handling dialog box for this element of this file type (or for children of this element that have the “Inherit from parent” Whitespace setting).

See Whitespace Normalization for information on how SDL Trados Studio normalizes whitespace.

Formatting

This option is available if the tag type is inline.

Click Edit to specify the formatting of text between inline tag pairs.

The Font Formatting dialog box is displayed.

Structure Info

This option is available if the tag type is structure

Click Edit to edit the tag's structural properties in the document. The Structure Information Properties dialog box is displayed.

Advanced

Click this to specify some segmentation rules for tags and length restrictions for elements and attributes. The Advanced Tag Settings dialog box is displayed.

NOTE

  • SDL Trados Studio does not allow more than one rule with the same XPath.

  • You cannot save a rule if both the Translatable setting and the Tag Type setting are Not specified.

 

 

Related Topics

Parser Rules

Overview: Working with File Types

Finding the Right Set of File Type Options