Xpath query

I have this Xml file:


<trans-unit>
<note>Catch this</note>
</trans-unit>
<trans-unit>
<note>Do not catch this</note>
</trans-unit>

This is my Xpath query: //note[not(contains(text(),'Do not catch this'))]

Which works outside of Studio:

Screenshot of Trados Studio showing an XPath query and the XML file with two trans-unit elements, one being highlighted as a result of the query.

..but not in Studio.

Screenshot of Trados Studio parser settings displaying the XPath rule, its translation setting as 'Always translatable', and the tag type as 'structure'.

Any ideas?

Thanks

Samuel



Generated Image Alt-Text
[edited by: Trados AI at 4:42 AM (GMT 0) on 5 Mar 2024]
emoji
Parents Reply
  • I hope to see the comments in embedded content in future releases.

    I think this is something you should probably add to the ideas site as well along with an explanation of why you would need this?  It could be quite tricky to achieve and if you're the only person who wants it I doubt it'll get a lot of traction.  When we looked at it our thoughts were just about exposing the possibility to extract a comment using XPath.  I don't think we even dreamed about this also containing tagged content we would need to process further!

    Paul Filkin | RWS

    Design your own training!
    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
Children