Studio uses a default set of Parser rules for extracting content from the most important types of XML documents. When a document does not match the detection rules of any of the default XML file types, Studio processes it with the XML: Any XML file type.
If you do not want Studio to apply the default parser rules for extracting XML content, you can create a new XML file type with custom parser rules. You can also customize the existing parser rules for the XML file types whose Parser rules can be edited.
To add or edit an XML Parser rule:
Use the parser rule settings available on the Add Rule and Edit Rule pages to define the properties of the XML parser rules. These settings help Studio better sort translatable from non-translatable text and correctly display the content extracted from the XML documents.
|
|
The specification of the nodes to which the rule applies. Studio uses XPath to specify the applicable nodes. This specification helps Studio to identify the rule, and so does not allow you to have two rules with the same XPath location. Specify the XPath for the Parser rule by providing one of the following:
|
|
|
Assign one of the following translate setting to an XML element:
|
| Tag type |
A parser rule can force an element to be presented to the translator as a tag. A tag can also have translatable text. A tag can be specified as any of the following:
Note: You cannot set both the Translate setting and the tag type to Not specified. |
| Whitespace |
Choose whether Studio preserves or normalizes any whitespace in your document. Preservation means that whitespace is not modified. Normalization replaces whitespace with a single space. Normalization is done when the file is converted to sdlxliff. This setting overrides the setting in the Whitespace page of your XML file type.
Choose an option from the drop-down list.
|
| Formatting |
Formatting applies to inline tags and specifies how the contents of an inline tag is displayed in the Editor. For example, you might want text within an inline tag pair <b> ... </b> to be displayed as bold text. Click Edit... and select one of the following options for each of the six available styles:
The Sample box shows a preview of how the text extracted by the rule will look in the Editor. |
| Structure info |
Structure information allows you to add additional details about the context of a structure element in the XML documents. You can also use structure information to control how Studio displays the content of structure tags in the Editor view. You can only add document structure information for structure tags. Click Edit next to the Structure info field to change the structural properties for an XML element. You can then view this information in the Editor view, in the Document Structure column and in the Document Structure tree. |