Documentation Center

Adding advanced tag settings

When you create or edit an XML Parser rule, you can specify advanced segmentation rules for inline tags. You can also set length restrictions for elements and attributes.

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. In the Advanced Tag Settings dialog, select the Advanced button on the Add Rule or Edit Rule dialog.
  6. Specify the advanced settings for inline tags.
    OptionDescription
    Inside text the tag acts as a word end

    Select this to treat the tag as text when navigating through a document in the Editor view. For example, when you press Ctrl+Left Arrow, the editor moves the cursor to the beginning of the tag.

    Text lines can be wrapped after the tag

    Use this option when a line break after the tag is for formatting purposes, and does not indicate the end of a segment. For example, the following single sentence is broken by a <br> tag:

    The owl set out to sea <br>

    in a beautiful pea green boat

    Tags represent formatting only and can be hidden in the editor

    In the editor, text is formatted correctly but formatting tags are not displayed. The translator can change the editor settings to display the tags

    Tag represents the text

    Only relevant for standalone (placeholder) tags. A tag can have a text equivalent. For example, the entity tag &quot; has the text equivalent " (quotes).

    Segmentation HintThis specifies if the tags are included in the segment for translation or not.
    • Include - The tag will be displayed in the Editor, even if it has no associated text. You would rarely select this option because you would normally not need to see tags with no associated text
    • Include with text - The tag will be displayed in the text when it has associated text. Example: the tag specifies a footnote marker. Where this is the case, the translator needs the ability to attach the marker to another word in the same sentence, so the tag should be included as part of the text.
    • May exclude , Undefined - Tags located at the beginning or the end of a segment are excluded. Otherwise, the tags are always included in the segment for translation.
    • Exclude - The tag will not be displayed in the Editor, even if it has no associated text.
  7. Specify the advanced settings for length restrictions to set limits on the number of Unicode characters that can be used when translating an element or attribute. For example, you could set a restriction on the length of a <title> element in a document or an attribute such as an image description in a file.
    OptionDescription
    Minimum length

    This is the shortest length that a user can enter as the element's translation. RWS recommends entering a relative XPath address. For example, if minlength is the elements's attribute, enter @minlength. However, you can use a constant, such as 40.

    Maximum length

    This is the longest length that a user can enter as the element's translation. RWS recommends entering a relative XPath address. For example, if maxlength is the elements's attribute, enter maxlength. However, you can enter a constant, such as 4096.

  8. Select OK.