Normally, memoQ imports all text and other contents from XML files. If you need to control what is imported as text, or you need to exclude some of the contents from the translation, you need the options on the Tags and attributes tab.
You can set options for each tag and attribute. But before that, memoQ needs to read all the tags and attributes from the files you're importing.
To get the tags and attributes from the source files: Click Populate.
To start over and choose a different set of files for previewing: Click Clear list. Go back to the Encoding and reference files tab. Choose different reference files. Click the Tags and attributes tab again. Click Populate.
In the Tags and attributes tab, 'tags' mean 'elements', parts of the file between specific tags. For example, when you set up translation for the Abstract 'tag', that will belong to the element between the <Abstract> and </Abstract> tags.
While you are setting up the tags and their attributes, you can preview them at the bottom of the Document import settings window.
Under Occurrences, memoQ lists the places where the selected tag occurs in one of the reference documents. Tags are highlighted in red, attributes are highlighted in green.
- File: In this drop-down box, choose a reference file to view.
- Instance: Click a number to view one occurrence of the selected tag in the selected reference file.

To choose if certain tags are translated, or if they break segment, use the settings in the Tags section:
- Handled tags: This list has all the tags that were read from the XML files, as well as the ones you added.
Settings for each tag are abbreviated: In the Info column of the Handled tags list, you see abbreviations of tag settings. These are the following: Str stands for a structural tag (breaks segment); In for an inline tag (doesn't break segment, imported as an inline tag); NT for non-translated; and Req for required. You can set whitespace handling by tag, too: Inh means the tag gets whitespace settings from its parent (the element that contains it), Pres means to preserve whitespaces, and Norm means to normalize whitespaces. Context handling and commenting options: Ctxt measnt that the content of the tag is imported as a context ID. Com means that the content of the tag is imported as comment. All of these types and options are explained below.
To set these options for a tag, click the tag in the Handled tags list. Then use the check boxes to the right to make your choices.
- Inline: Check this check box to make the selected tag an inline tag. Inline tags are markup that are inside segments. They are displayed as inline tags. Other tools may call inline tags internal tags. If you don't check this check box, memoQ will handle the tag as a structural tag. Structural tags mean elements that are blocks of content for translation. Structural tags never appear inside text for translation: they always start a new segment. In other tools, structural tags are called external tags.
In the example: Specify the ref and img tags as inline because they appear inside sentences. All other tags should remain structural tags.
- Not translated: Check this check box exclude the selected tag from translation. These portions of text will not be imported for translation.
If an element isn't translated, neither are its children: If you make an element non-translated, other elements inside it will not be imported either. In the example, do not make the Body or the Main elements non-translated because then nothing will be imported.
- Required: Check this check box to make the selected tag required. Required tags are special inline tags that must be copied to the translation. If a required tag is missing from the translation, memoQ will display an error in the segment, and you won't be able to export the document.
- Whitespace handling: Use this drop-down box to choose how white space is handled in that element. Inherit means that the element will handle whitespace the same way as the parent element. The root element receives the default setting from the General tab. Preserve means that all white space will be retained and imported into the translation document. Normalize means that sequences of white space characters will be replaced with a single space character.
- Tag content is context ID for siblings: If you check this check box, memoQ uses the contents of the selected tag as the context identifier of the next segment imported from the elements that are at the same level in the hierarchy.
Note: This context ID will not be applied to all segments imported from the same level of the hierarchy. Instead, memoQ uses the context ID only for the next suitable segment. Other siblings will remain without a context ID.
- Tag content is comment for siblings: If this check this check box, memoQ uses the contents of the selected tag as a comment for the segment(s) that are imported from the elements at the same level in the hierarchy.
Note: The comment or the context ID is is used in one element only, the one that is after the element used as context or comment.
-
: Click this button to remove the selected tag from the Handled tags list.
-
: Click this button to add the tag entered into the text box to the Handled tags list. If a tag is missing from the list: When memoQ imports an XML file, it may find tags that are not listed in the configuration. These tags will be imported as structural and translatable. They will inherit the white space settings from the parent element. Their content will not be imported as a comment or a context identifier.
Attributes of tags can also be used as context identifiers or comments. But attributes may also contain text to be translated.
To choose what happens to attributes:
- Select a tag in the Handled tags list. Under Tag attributes, memoQ lists the attributes that belong to the selected tag.
- To change the settings of the selected attribute, use the check boxes to the right.
Attribute settings appear as abbreviations: In the Info column of the Tag attributes list, you see the following attributes: Tr stands for translatable; Req for required; and F for filtered. NX and NY mean conditions to import or omit the tag that has the attribute, CxC and CxS stand for context identifier options, while CmC and CmS are commenting options.
The xml:lang attribute is different: You cannot control how the xml:lang attribute is processed. Instead, memoQ processes them automatically. If a structural tag has the xml:lang attribute in or around an imported range, memoQ replaces its value is replaced with the 2-letter code of the document’s target language before exporting the document. This happens regardless of the actual language specified in the attribute. If an inline tag has the xml:lang attribute, it is not imported unless someone manually adds it. You can add the xml:lang attribute to inline tags, but you cannot specify any options there. In addition, memoQ replaces its value with the target language when the document is exported.
The options are:
- Translatable: Check this check box to make the selected attribute translatable. This means that the value of the attribute is imported as normal text.
- Required: Check this check box to make the selected attribute one that must be present in any tag inserted to the translation. A required attribute is not necessarily translatable: memoQ uses it for quality-checking and ensuring the well-formedness of the translation.
- Filtered: Check this check box to hide the selected when you switch to the Show filtered inline tags view in the translation editor.
- Context: Click this button to make the value of the selected attribute context information for the children or the siblings of the selected tag. After clicking this button, the Context settings for attribute window appears with a list of options and their explanation:

In the example: The id attribute of the par element may be used as a context identifier.
- Comment: Click this button to make the value of the selected attribute a comment for the children or the siblings of the selected tag. After clicking this button, the Comment settings for attribute window appears with a list of options and their explanation:

-
: Click this button to remove the selected attribute from the Tag attributes list.
-
: Click this button to add the attribute entered into the text box on the left to the Tag attributes list.If an attribute is missing: If an attribute is not listed in the configuration, memoQ treats it as non-translatable, not required and not filtered. These attributes will not be used for non-translation conditions, nor in context or comment processing.
Conditional translation
You can import or ignore a tag, depending on the value of an attribute. In other words, you can set conditions for importing the contents of a tag (and all its children).
For example, a tag may have an attribute called 'translate'. The value can be either 'translate="no"' or 'translate="yes"'. You don't want to import the tags where it says 'translate="no"'.
To do this:
- Click the General tab. Get the list of tags from the reference documents if necessary, by clicking Populate.
- Select a tag that you want to import conditionally.
- In the Tag attributes list, select the tag that you want to use as condition.
- On the right, click Non-translation to set up the condition.
The Non-translation settings for attribute window appears:
Under Values, list the values that you want to check for. If the tag has one of the values that you list, memoQ will import or ignore the tag contents, depending on the condition you set up at the top.
- To list the values: Type a value in the text box at the bottom. Click the
button. If you need to test for several values, repeat this.If you want to check if the 'translate' attribute is set to 'no', type no at the bottom, and click
.
- To ignore the tag if the attribute has one of the values listed: Click the Do not import if radio button. In the example, you would click this, so that memoQ omits the tags where 'translate="no"' is set.
- To import the tag if the attribute has one of the values listed: Click the Import only if radio button. In the example, you would add 'yes' to the list (instead of 'no'), and click this radio button. This causes memoQ to import the tags where 'translate="yes"' is set.
If the attribute is missing: If you check the Disable rule if attribute is missing check box, memoQ will act as if you selected No condition. If you check the Also if attribute is missing check box, memoQ will act as if the attribute had an empty value.