Filtering Tags Pre-Translation for XML Files
Thread poster: sophie_jane
sophie_jane
sophie_jane
Local time: 09:37
German to English
Jul 4, 2011

I am looking for a way to filter out certain text so that it does not appear in my source translation text. It is an xml file which contains lots of IDs in it and only some of the text is to be translated. If the file is opened in Trados Studio 2009, all of the tags are automatically hidden. Is there a way, pre-translation, to add a filter before the file is opened so that it only shows certain codes?

e.g. I want all text that has the code < A M=" 8804 " > in front of it to be shown
... See more
I am looking for a way to filter out certain text so that it does not appear in my source translation text. It is an xml file which contains lots of IDs in it and only some of the text is to be translated. If the file is opened in Trados Studio 2009, all of the tags are automatically hidden. Is there a way, pre-translation, to add a filter before the file is opened so that it only shows certain codes?

e.g. I want all text that has the code < A M=" 8804 " > in front of it to be shown but text that has < A M =" 146 " > to be hidden.

The only thing I have found so far is a filter that you can add once the text is open in the text editor, but the problem with this is that all of these tags have already been automatically hidden.




[Edited at 2011-07-04 16:16 GMT]
Collapse


 
Madeleine Chevassus
Madeleine Chevassus  Identity Verified
France
Local time: 09:37
Member (2010)
English to French
SITE LOCALIZER
XML file: I had the same problem.. Jul 4, 2011

hello,

I just translated an XML file. I delivered it to the client; he told me that the text between
comtext and /comtext tags didn't have to be translated (only text /text tags needed). I had to replace some lines of my translation by the same in English!!!!

The problem was that while in Studio double-sided editor I saw no tag at all.

The client gave me also a DTD (supposed to filter) and I tried to have it taken in account by Studio, but I didn't
... See more
hello,

I just translated an XML file. I delivered it to the client; he told me that the text between
comtext and /comtext tags didn't have to be translated (only text /text tags needed). I had to replace some lines of my translation by the same in English!!!!

The problem was that while in Studio double-sided editor I saw no tag at all.

The client gave me also a DTD (supposed to filter) and I tried to have it taken in account by Studio, but I didn't succeed.

I am interested in learning the solution!

Marie



[Edited at 2011-07-04 16:12 GMT]

[Edited at 2011-07-04 16:13 GMT]
Collapse


 
RWS Community
RWS Community
United Kingdom
Local time: 09:37
English
Better if we can see the file Jul 4, 2011

Hi,

To perform this type of task with an XML file you need to be able to prepare the filetype correctly in the first place to make some things translatable and others non-translatable. Having a DTD is no guarantee everything is as you need it either.

If you can share the file I'd be happy to take a look and see if we can do what you need... there's no guarantee we can do that either

Regards... See more
Hi,

To perform this type of task with an XML file you need to be able to prepare the filetype correctly in the first place to make some things translatable and others non-translatable. Having a DTD is no guarantee everything is as you need it either.

If you can share the file I'd be happy to take a look and see if we can do what you need... there's no guarantee we can do that either

Regards

Paul
[email protected]
Collapse


 
RWS Community
RWS Community
United Kingdom
Local time: 09:37
English
Using XPATH Jul 7, 2011

Hi,

I'm not sure if this answers both questions, but for Sophie the solution to the problem was to use an XPATH statement.

Just to clarify, the problem was being able to filter out text in something like this:

<A M="8804"><V>Some text in here for translation</V></A>

where the conditions are always that M="8804", so a similar statement that had M="146" would not return text for translation in the nested element V.

Th
... See more
Hi,

I'm not sure if this answers both questions, but for Sophie the solution to the problem was to use an XPATH statement.

Just to clarify, the problem was being able to filter out text in something like this:

<A M="8804"><V>Some text in here for translation</V></A>

where the conditions are always that M="8804", so a similar statement that had M="146" would not return text for translation in the nested element V.

The solution was to add an XPATH statement as a new parser rule as follows:

//A[@M = '8804']/V

Regards

Paul
Collapse


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Filtering Tags Pre-Translation for XML Files







Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »