XPath for ST4 file: Parsel rules don't react as expected?!

Hi, I have an xml file created in Schema ST4, which has the following structure:

Screenshot of XML code highlighting the procedural-instructions and instruction tags within a text module.

I am not an expert of Xpath, but I have understood enough having been able to use them since quite long time.

1) I would expect to get the text of all instruction tags with theses paths...
//instruction (always translate)
//* (never translate)

But I receive nothing...

Trados Studio interface showing translation rules for XML paths with a preview window displaying file path on user's desktop.

... only if I add all the parent/ancestor elements of instruction I get my instruction texts...

Close-up of Trados Studio translation rules with a focus on the instruction tag path and a preview of the text to be translated.

2)  I would expect to get the text of all instruction tags with theses paths...
//tms/tmsnode/content/texmodule/procedural-instructions/instructions/instruction (always translate)
//* (never translate)

Trados Studio XPath configuration with a floating preview window showing the file path and partial content of the XML file.

But this does not deliver any results neither. I checked the expression online on a XPath Tester and it works fine. I would need this one to exclude some parts from translation, but I don't understand why i doesnt work.

Thnx in advance.
Burim



Generated Image Alt-Text
[edited by: Trados AI at 4:19 AM (GMT 0) on 5 Mar 2024]
emoji
Parents Reply
  • Hi Paul,

    sorry, next time I will provide a file from the start. I didn't think about that being easier, as I wanted to show my problem in the screenshots. But of course I could have added the file next to the screenshots.

    To summarise:

    1) it works with (immer zu übersetzen)
    I just usually use "zu übersetzen (jedoch nicht in geschützem Inhalt)" because in the xml files I have known so far there are "not to translate" tags. There it wouldn't be recommended to put the paths to "immer übersetzen", would it?

    2) //tms/tmsnode/content/textmodule/procedural-instructions/instructions/instruction
    I had a "t" missing in "textmodule" :-(

    It seems, as if you have solved my problem. I will do some tests and if I get stuck again I will provide my questions with the file.

    Thnx a lot.

Children
No Data