The parser rules define how the XML-letter file type is handled by the file type support software.
| XML Element | Translatable | Notes |
|---|---|---|
| <letter> | No | This is the root element and represents the letter structure. |
| <title maxlength="50"> | Yes | These elements have been inserted to show how you can handle sections of text that have length restrictions. |
| <title maxlength="40"> | Yes | |
| <salutation> | Yes | "Dear Daniel "should be translated. |
| <text> | Yes | The body of the letter should be translated. |
| <component translate="yes"> | Yes | These elements have been inserted to show how you can handle sections of text that have been tagged translatable or not translatable. |
| <component translate="no"> | No | |
| <emphasis> | Yes | The emphasis tag changes the format of the text, but the text should still be translated. |
| <signature> | No | We do not translate a person's name or address. |
| <address> | No | |
| <weblink> | No | We do not alter the web address. |
| <logo alt> | Yes | The logo alt text should be in the local language. |
| <logo address> | No | We do not change the web address |
The parser rules to achieve that result are as follows:
| Element @attribute=... | XPath | Translate Setting | Tag Type |
|---|---|---|---|
| (any) @translatable="yes" | //*[@translatable = 'yes'] | Translatable | Inline |
| (any) @translatable="no" | //*[@translatable = 'no'] | Not translatable | Inline |
| salutation | //salutation | Translatable | Structure |
| text | //text | Translatable | Structure |
| emphasis | //emphasis | Not specified | Inline |
| signature | //signature | Not translatable | Structure |
| address | //address | Not translatable | Structure |
| weblink | //weblink | Not translatable | Structure |
| logo @alt=... | //logo/@alt | Translatable | Inline |
| logo @address=... | //logo/@address | Not translatable | Structure |
| All other elements are covered by this, the last rule in the rules table. | //* | Not translatable |