- From: Felix Sasaki <felix@sasakiatcf.com>
- Date: Sun, 7 Jan 2018 16:28:54 +0100
- To: Yves Savourel <ysavourel@enlaso.com>
- Cc: public-i18n-its-ig <public-i18n-its-ig@w3.org>
- Message-ID: <CAL58czoJohuQK6G-Akb4WJAJC0P9L_F0=oPPkbs22q2TKhvgSg@mail.gmail.com>
Hi Yves, all, for the selector at locNote one could use /resources/string for the locNotePointer, one could use preceding-sibling::node()[normalize-space()][1]/self::comment() This selects the first preceding sibling node which has content (so it excludes white space only text nodes) and provides the value of the node if itself is of type comment. I hope that this works? Cheers, Felix 2018-01-07 13:27 GMT+01:00 Yves Savourel <ysavourel@enlaso.com>: > Hi all, > > > > I’m wondering if any of you XPath experts has a solution for the use cases > on of Okapi’s ITS users has. > > See the discussion here: > > https://groups.yahoo.com/neo/groups/okapitools/conversations/topics/5488 > > > > Basically, the goal is to associate the comment above the node to > translate as a localization note. > > > > Thanks, > > -yves > > > > *From:* okapitools@yahoogroups.com [mailto:okapitools@yahoogroups.com] > *Sent:* Sunday, January 7, 2018 1:41 AM > *To:* okapitools@yahoogroups.com > *Subject:* [okapitools] Re: Android Strings from comments? > > > Hi all, > > I tried to select //comment() instead of //string like below, but it > doesn't match anything at all. Is this not allowed? I was able to use > similar syntax in oxYgen XML Author's XPATH/XQuery builder. > > <its:locNoteRule locNotePointer="following-sibling::string[1]" > locNoteType="description" selector="//comment()"/> > > thanks, > > Michael > >
Received on Sunday, 7 January 2018 19:27:51 UTC