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:
- 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? - 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]