+44-20-8154-3721

+7-831-262-10-70

+7-495-545-46-62

71-75 Shelton Street, Covent Garden, London, WC2H 9JQ

42 B, ul. B. Pokrovskaya, Nizhny Novgorod, Russia, 603000

office 213, 8/1, ul. Nametkina, Moscow, Russia, 117420

Monday to Friday 08:00 to 17:00 (GMT+1)

Using CAT-tools to translate non-standard XML files

The XML language is supported by most modern translation memory systems. Most popular XML-based formats (such as XLIFF) have pre-defined settings. In other cases, a list of elements and attribute values to be translated must be set manually. This can be done with XPath - a query language for selecting elements from an XML document, defined by the W3C.

The basic concept of the logical structure of the XML format is an ‘element.’ Elements can be embedded in each other, forming a tree-like structure. Elements contain attributes with quoted values. XPath can be used to get only required strings from the content of an XML document.

Examples of XPath queries:

//question | //answer Select all the "question" elements and all the "answer" elements. The "|" character is used to combine multiple queries
//* Select any element
//@* Select any attribute
//@level Select all values of the “level” attribute
//question//* Select all the elements nested in the "question" element
//question[@translate='yes'] Select all the "question" elements, which have “translate” attribute value “yes”
//question[not(@translate='no')] Do not select any "question" elements, which have “translate” attribute value “no”

The full description of the XPath query syntax can be found here:
https://www.w3schools.com/xml/xpath_syntax.asp

Using XPath with Memsource

image001

The XPath query value shall be entered into the field "Elements & attributes". Users can also exclude text between the tags inside any line by typing the tag name (without triangular brackets in the "Non-translatable inline elements" field).

The XPath help section on Memsource:
https://help.memsource.com/hc/en-us/articles/360001569871-XPath

Using XPath with SDL Trados Studio

You can create a new file type from the menu File -> Options -> File Types –> New.

image003

Choose the file type "XML (Embedded Content)" . The "XML (Legacy Embedded Content)" is designed to exchange data with SDL Trados Studio 2014 and older versions.

image005

If there is no ready settings file, chose "Create an XML file type based on the default settings" and click on “Next”.

image006

Add the necessary XPath query on the "Parser rules" page.

image007

image008

Notepad++ has XML Tools which can be useful to create and check XPath queries. The plug-in can create queries for the current element or helps to check which elements match the query. ALBA Translation Agency has extensive experience of working with XML files. Our specialists can organize a work process on each job in the most optimal and therefore cost-effective manner for our customers.

ADVANTAGES OF USING ALBA’S SERVICES

More than 10 years in the industry

We have translated almost a million pages, being called upon to solve linguistic problems of varying complexity, often to extremely tight deadline.

We are one of the Top-40 largest translation companies in Russia

This ranking is according to the site https://translationrating.ru using data for 2015.

We work to provide you with the greatest flexibility

We build relations with customers with an individual approach; our desire is to find and fully meet their needs.

Quality and privacy are in accordance with ISO 17100

We understand that high quality and our excellent reputation are our main competitive advantages.

Dynamic innovation

We develop software, participate in projects of professional organizations, and support law-making initiatives.

27/04/2023

ALBA Translating Company hit 24th in the All-Russian Translation Companies Rating

21/07/2021

Alba becomes an exclusive reseller of SubtitleNext and NextTT products within CIS

17/07/2021

Alba Translating Company becomes a partner in organizing Translation Forum Russia 2021 in Nizhny Novgorod