Dear all,
I'm trying to match the text node in an XML file as well as its ID as the resname property, e.g.
<label key="THIS_IS_THE_ID">
<text>THIS IS THE TEXT</text>
</label>
I'm using these rules:
<its:translateRule itsx:whiteSpaces="preserve" selector="//text" translate="yes"/>
<its:translateRule itsx:idValue="parent::label/@key" itsx:whiteSpaces="preserve" selector="//text" translate="yes"/>
The xpath `parent::label/@key` seems to work fine with an example like the one above, however it doesn't seem to match the key if the <text> node has other children subnodes (or HTML tags), e.g.
<label key="THIS_IS_THE_ID2">
<text>
<div>
<p>THIS IS THE TEXT</p>
<img src="./whatever" />
</div>
</text>
</label>
I have also tried with `ancestor::label/@key` but to no avail.
I'm using the fprm file as the filter parameters file of the XML filter in an OmegaT project.
Any tips? Am I doing something wrong?
Thanks a lot.
Cheers, Manuel
PS: Files attached...