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

SeeK
Local time: 15:45
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


Direct link Reply with quote
 

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


Direct link Reply with quote
 

SeeK
Local time: 15:45
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


Direct link Reply with quote
 

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


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 »

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

Advanced search







Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »
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 »



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