How is the syntax of Xpath for parser rules in Trados 2009
Thread poster: SeeK

SeeK
Local time: 08:32
Mar 25, 2011

Question goes to:
Advanced Xpath users

Abstract:
Ee are regularly translating XML files from our content management system with Trados 2009, Windows7.
I want to define a parser rule for an attribute. Elements with that attribute shall never be translated.
Who can help with syntax?

Details:
The content management system XML structure is similar to the example below.


structure
block
par
media
/media
/par
par
/par
table
/table
block
/structure


Differrent elements are allowed below the structure-root-element.
Any of this elements can contain the attribute filter="donotpublish".
I'd like to give Trados the information not to translate such elements.

I suppose it is possible to define this via a parser rule with Xpath expressions and tested the following:
//*[@filter="donotpublish"]
while I suppose // is the root element, * are all elements below root and [] is the filter that can be part of any of these elements (see w3.org/TR/Xpath).

But Trados is no longer able to pre-translate a file with this parser rules...

Who knows what went wrong?

Thanks a lot,
SeeK


 

SDL Community  Identity Verified
United Kingdom
Local time: 08:32
English
Try this one Mar 25, 2011

SeeK wrote:
I suppose it is possible to define this via a parser rule with Xpath expressions and tested the following:
//*[@filter="donotpublish"]
while I suppose // is the root element, * are all elements below root and [] is the filter that can be part of any of these elements (see w3.org/TR/Xpath).


Hello SeeK,

I can't see your actual xml code to check this, but perhaps you can use something like this where the attribute donotpublish can contain values yes, or no?

//*[@donotpublish='yes']

What values can your attribute have?

Regards

Paul


 

SeeK
Local time: 08:32
TOPIC STARTER
Attribute has been correct. Mar 25, 2011

Hello Paul,

thank you for your quick response.

I guess my attribute setting has been correct.
The attribute is called filter, the value is exactly 1288268387591.
Together it looks like this: filter="1288268387591"

Do you have any other idea concerning the syntax for locating the path?
//*


Thanks a lot, Christoph alias SeeK


 

SDL Community  Identity Verified
United Kingdom
Local time: 08:32
English
I see... Mar 25, 2011

Hi Christoph,

I see, my mistake... apologies. I think it would be easier if we took this off forum so I could see your file and then you can report back at the end of the day.

Can you share it with me?

Regards

Paul
pfilkin@sdl.com


 


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


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

How is the syntax of Xpath for parser rules in Trados 2009

Advanced search







SDL MultiTerm 2019
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2019 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2019 you can automatically create term lists from your existing documentation to save time.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

More info »



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