XPath to structure information description

Hi,

In XML filters, you can set the description of structure information to be populated dynamically from a relative XPath. So far I'm having limited success with this, though.

This is my (simplified sample) XML:

<XML>
   <Item>
      <Number>xxxxxxxxxxxxxxxxxx</Number>
      <Name SID="XYZ">translatable text</Name>
   </Item>
</XML>

What I manage to do is fetch the SID with this XPath:

@SID

What I'm trying to do is fetch the Number. I have tried this two ways:

preceding-sibling::Number
../Number

But neither seems to work. So the question is, does the description have to be an attribute value of the translatable element itself, or is there a different approach to getting the description from another relative element?

Any pointers are much appreciated! Thanks!

Stephan

Trados Studio Edit Structure Information dialog box with fields for Standard, Purpose, Name, Code, Identifier, and Description. Description field contains XPath 'preceding-sibling::Number'.



Generated Image Alt-Text
[edited by: Trados AI at 3:46 AM (GMT 0) on 5 Mar 2024]
emoji