Defining a Parser rule to highlight structure - example

We create a parser rule that causes the translation editor to display the document structure information in yellow.

About this task

This example builds on the topic Example - Creating an XML File type, XML-Letter, and assumes you have created the XML file type XML-Letters.

Procedure

  1. Navigate to the Add Structure Information window.
    1. Open the file type settings for XML-Letters, find the parser rule for the element <salutation> and click Edit.
    2. In the Edit Rule window, click Edit next to the Structure info box.
    3. In the Structure Information Properties window, click Add.
  2. Create structure information with the following properties:
    1. Standard :Custom
    2. Purpose :Information
    3. Name :Salutation
    4. Description: A formal greeting used in a letter. (This text will be displayed when the translator clicks on the document structure column.)
  3. Click OK till you have closed the dialog boxes.

To see the effect:

Procedure

  1. Open the example letter file (example-xml-file-letter.xml in the editor. Look at the entries in the document structure column and note that <salutation> entries are in yellow.
  2. To see all the structure information for that element, click an entry in the document structure column.