Defining structure information properties

Use structure information to show the context of a structure element inside an XML document. For example, you can specify that an element is a <title> so that translators can consider this context when translating the content of this element. Titles may need to be translated differently than the text in the body of a document.

About this task

The information that you specify here is visible in the Document Structure column of the Editor view.

Structure information is called Context in the XML Parser dialog.

Procedure

  1. To configure file type settings, go to:
    • Projects view > Home > Project Settings, for the active project.
    • File > Options, for all future projects.
  2. Expand the File Types tree.
  3. Select the XML file type for which you want to specify advanced tag settings.
  4. On the Parser page of your XML file type, select Add or Edit.
  5. Select Add to add an XML Parser rule or Edit to customize it.
  6. In the Add Rule or the Edit Rule dialog, select the Edit button next to the Structure info field, and consult the columns which define the structure information properties:
    OptionDescription
    Name

    This is the name specified for an element. You cannot change these in this dialog. Select Edit and use the Edit Structure Information dialog to change them.

    Code

    This shows the specified abbreviation code for an element. Codes show where the segment text appears in the XML document. When translating, this information can be useful as, for example, heading elements may be translated differently than paragraph elements.

    Description

    This is the description specified for an element. You can set this for Custom elements on the Add Structure Information or Edit Structure Information page.

    This description is displayed in the Additional Information column when you click on the element code in the Editor view.

    Document Explorer
    This specifies the information that is displayed to the translator. Select a cell in the Document Explorer column, and choose an option from the drop-down list:
    • DoNotShow - Structural information is not displayed.
    • ShowDisplayName - The element name is displayed.
    • ShowElementContent - The content of the element is displayed.

    Only one item in the list can have a ShowDisplayName setting. All the other items are automatically set to DoNotShow.

    If every item is DoNotShow, no information for this element is shown to the translator, unless the information is inherited from the parent element.

    Don't inherit Parent

    If set, this disables inheritance from the parent element. When cleared, information is inherited if the Document Explorer column in the Structure Information Properties dialog does not have any items that have been set to ShowDisplayName or ShowElementContent.

  7. Customize the properties of a structure element:
    OptionDescription
    Standard

    This offers a list of standard XML structure elements with predefined context information. Choose Custom if you want to create your own element and customize its context information.

    For example, if you select List, Trados Studio automatically adds default preset structure properties.

    All LI elements in the XML documents processed with your XML file type will be displayed as in the Document Structure column of the Editor view. You can still customize the formatting used for displaying the content of the XML element in the Editor view.

    Choose Custom if you want to add custom Name, Code, Identifier, Description and Color properties for your structure element.

    Purpose

    Choose Match if you want Trados Studio to store the document structure information as additional information in the translation memory. Trados Studio will then use this information to prioritize matches when doing a lookup in the translation memory.

    Choose Information if you do not want to store document structure information when confirming the segments that include the content of your XML element.

    Name

    If you selected Custom in the Standard field, you can give a custom name for your structure element. This is displayed in the Location column when you click on the element code in the Editor view.

    Code

    Code is the abbreviation of an XML element. Codes show where the segment text appears in the XML document.

    Trados Studio displays the code of a structure element in the Document Structurecolumn of the Editor view. For example, a Heading element is displayed as in the Editor view. This information can be useful when translating as you may need to translate heading elements differently than paragraph elements.

    If you selected Custom in the Standard field, you can give a custom code for the structure information of your element.

    A plus sign next to a code indicates that the segment includes more than one document structure information

    IdentifierA unique identifier which Trados Studio can then use for other tasks like processing embedded content.
    DescriptionIf you selected Custom in the Standard field, you can add custom description for your structure element. This is displayed in the Additional Information column when you click on the element code in the Editor view.
    Set description from content of this relative XPath

    If the description is not set, you can use an XPath in this text box to pull out a value from the XML document to use as a description.

    For example, you have the following element: <content description="This content is a car type">Content goes here </content>.

    In this box, you can specify the XPath @description. This pulls the string, This content is a car type, as the description. This means that if the description changes for each <content>...</content> element, a different description for each context associated with that element is used instead of having the same description. Therefore, the XPath is relative to the element it describes.

    Color

    If you selected Custom in the Standard field, you can choose a custom highlighting color for displaying your element in the Document structure column. For example, default List elements are always displayed in light green whereas Heading elements are highlighted with dark green.

    Formatting

    Choose how Trados Studio displays the content of your element in the Editor view.