This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can you help me with a small problem I'm having creating a custom XML filetype in Trados Studio 2022?

Hi,

I have an xml file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
 <xpath>
  <Book>
   <Title lang="en-US" mytitle="An explanation of XPath in SDL Trados Studio" />
   <Text lang="en-US" >XPath helps to <b>navigate</b> through the file.</Text>
   <Text>These <bn lang="en-US" lock="y">brand names</bn> are locked</Text>
   <Text>These <bn lang="en-US" lock="n">brand names</bn> are not</Text>
   <Notes>
    <Text>This should not be extracted.</Text>
   </Notes>
  </Book>
    <Book>
   <Title lang="de-DE" mytitle="An explanation of XPath in SDL Trados Studio" />
   <Text lang="de-DE" >XPath helps to <b>navigate</b> through the file.</Text>
   <Text>These <bn lang="de-DE" lock="y">brand names</bn> are locked</Text>
   <Text>These <bn lang="de-DE" lock="n">brand names</bn> are not</Text>
   <Notes>
    <Text>This should not be extracted.</Text>
   </Notes>
  </Book>
    <Book>
   <Title lang="fr-FR" mytitle="An explanation of XPath in SDL Trados Studio" />
   <Text lang="fr-FR" >XPath helps to <b>navigate</b> through the file.</Text>
   <Text>These <bn lang="fr-FR" lock="y">brand names</bn> are locked</Text>
   <Text>These <bn lang="fr-FR" lock="n">brand names</bn> are not</Text>
   <Notes>
    <Text>This should not be extracted.</Text>
   </Notes>
  </Book>
 </xpath>

I have two problems I'm not able to resolve:

  1. Sometimes I have brandnames that need to be locked, like this:
    <Text>These <bn lang="en-US" lock="y">brand names</bn> are locked</Text>
    How should I write the XPath expression to identify brandnames in the bn element that have the lock="y" atribute?
  2. Sometime I have text that should not be translated in the Text elements.  But sometimes it should.  Based on the sample file I gave you how can identify the specific Text elements that should not be translated?

Thanks.




[locked by: Paul at 7:25 PM (GMT 1) on 31 Mar 2024]
emoji