Extract notes in XML files

5 views
Skip to first unread message

Manuel Souto Pico

unread,
Jan 5, 2023, 7:57:30 AM1/5/23
to okapi-users
Dear all,

Is it possible to extract notes with the XML filter?

In other words, given something like this:

 <label>
   <note>The respondent is an adult</note>
   <text>Do you agree?</text>
  </label>

to use something like this

<its:translateRule itsx:whiteSpaces="preserve" selector="//note" translate="no"/>
<its:translateRule itsx:whiteSpaces="preserve" selector="//text" translate="yes"/>
<its:translateRule itsx:noteText="parent::label/note" selector="//text" translate="yes"/>

to obtain this:

<trans-unit id="1">
   <source xml:lang="en">Do you agree?</source>
   <note>The respondent is an adult</note>
</trans-unit>

I cannot see that feature in the documentation https://okapiframework.org/wiki/index.php/XML_Filter

Thanks a lot in advance.

Cheers, Manuel
Reply all
Reply to author
Forward
0 new messages