Filtering Tags Pre-Translation for XML Files
Thread poster: sophie_jane
sophie_jane
Local time: 04:17
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 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]


Direct link Reply with quote
 

Madeleine Chevassus  Identity Verified
France
Local time: 04:17
Member (2010)
English to French
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 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]


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 04:17
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

Paul
pfilkin@sdl.com


Direct link Reply with quote
 

SDL Community  Identity Verified
United Kingdom
Local time: 04:17
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.

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

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

Regards

Paul


Direct link Reply with quote
 


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

Advanced search







PDF Translation - the Easy Way
TransPDF converts your PDFs to XLIFF ready for professional translation.

TransPDF converts your PDFs to XLIFF ready for professional translation. It also puts your translations back into the PDF to make new PDFs. Quicker and more accurate than hand-editing PDF. Includes free use of Infix PDF Editor with your translated PDFs.

More info »
PerfectIt consistency checker
Faster Checking, Greater Accuracy

PerfectIt helps deliver error-free documents. It improves consistency, ensures quality and helps to enforce style guides. It’s a powerful tool for pro users, and comes with the assurance of a 30-day money back guarantee.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search