Did you find this page useful? Give us feedback.
Did you find the information
on this page useful?

Yes
Somewhat
No
  Tell us more about your choice:
Missing information
Incorrect information
Misleading information
I have a question
Other
  Enter your comment in the box below.
If you need assistance, please contact Support instead.

  Type the letters
simple PHP captcha
 

Working with XML import rules requires some knowledge about XPath expressions. Two examples can be found here.

Click on a node (containing the source) in the XML tree. memoQ will display the corresponding XML path. Choose conditions for the node, e.g. the content of the “language” attribute. memoQ will automatically compute an XPath expression and copy it to the text field on the top right (XPath for selected row).

The large text box on the left contains the XML file (either the input file or the first file specified on the Encoding and reference files tab). Choose a file from the XML file (click on row for its XPath expression) drop-down list. You can change the displayed file by choosing a different file from the drop-down list.

If there are already some import rules, the file is displayed with syntactic coloring. Below the text box is a legend that explains the meaning of the various colored items. Items are: Imported text, Context (ID), Comment, Language, and Length.

Click the Update preview button to update the preview of a file whenever you add new import rules or delete a rule.

Note: After each rule edit, the Update preview button will result in a new preview, so that you can check the new rule before adding it to the rule set.

If you click on a row in the text box, memoQ will automatically compute an XPath expression and copy it to the text field on the top right (XPath for selected row). This field is editable.

Click the Change XML file button to change the XML file to edit the import rules.

 

Content rule section:

The Content rule section contains a content rule. One content rule always specifies an XPath for extracting content (the content that is imported from the multilingual XML file), and the following properties of the content: its language (compulsory), and optionally the context (ID), comment and length restriction. Use the Language XPath for content, Context (ID) XPath for content, Length restriction XPath for content, and Comment XPath for content fields.

You can choose each of these from the file directly (click the File from selected row link), and adjust the XPath if necessary, and copy the XPath from the one on the top of the window.

You can also edit all of the XPaths in these fields. After each edit, the file is updated and you will see a new preview, so that you can check the new rule before adding this rule to the rule set.

The Language XPath for content field will be mapped to a memoQ language. The memoQ language drop-down list contains either all in memoQ supported languages or, if the import was invoked from within a project, the project’s languages.

The Comment XPath for content field will be mapped to a memoQ comment type. The memoQ comment type  drop-down lists contains the values Information, Warning, Error and Other.

Click the Save to rule set button to add the new rule to the rule set, or to update the existing rule if you edit a rule. If you have not specified a language or a content XPath, you cannot save the rule set.

If you try to save a rule set without a context ID, you will get a warning but memoQ will save the rule set.

 

Import rule set section:

The Import rule set section contains the list of import rules which you have added so far. Click the Edit rule link to fill out the text boxes in the Content rule section for editing.

Click the Save to rule set link in the Content rule section to update the rule.

Click the Clone rule to clone a rule. This is useful when you for instance edit an attribute of the rule (e.g. the Language attribute), you can then adapt the rule to different filtering conditions.

Click the Delete rule link to delete a rule.

Navigation

Click OK to apply the rules with the import. Click Cancel to leave the dialog without applying the import rules for the selected file or files.