[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [xliff] ITS rules syntax
For example, we have rules with selectors like this:
But the appliesTo predicate should be on the note, not on the unit.
So it should be something like:
selector="//xlf:source[../../xlf:unit/xlf:notes/xlf:note[appliesTo="source" and @priority=1]]"
Furthermore the priority condition is more complete: priority==1 or no priority (because 1 is the default) means an alert, while priority>=2 means a description.
It seems to me the Localization notes rules need an overhaul and a test file with one example per case.
We are also missing the case of the comment annotation using a @ref instead of a @value.
<its:locNoteRule selector="//xlf:mrk[@type='comment' and @ref]" locNoteRefPointer="@ref" locNoteType="alert"/>
But this needs to be tweaked for the locNoteType: ‘alert’ if the note has a priority of 1 or none, ‘description’ otherwise.
I’m not sure how you would express this though as the priority value is in the referenced <note>.
Maybe Felix or Soroush have ideas?
There is at least one other error in a rule:
<its:locNoteRule selector="//xlf:*[@annotation='comment' and @value]" locNotePointer="@value" locNoteType="description"/>
<its:locNoteRule selector="//xlf:*[@type='comment' and @value]" locNotePointer="@value" locNoteType="description"/>
Or probably even:
<its:locNoteRule selector="//xlf:mrk[@type='comment' and @value]" locNotePointer="@value" locNoteType="description"/>
I’ve started to look at why our okapi ITS processor was getting a null pointer.
It looks like it’s because the rules are have an attribute localizationNotePointer instead of locNotePointer.
So one more typo to correct.
I’m not sure the expressions work though: I get no error, but no notes associated with nodes either (so far).
From: David Filip [mailto:firstname.lastname@example.org]
Yves, Soroush, Felix, all
Are the rules working now? Was it an easy syntax fix attributable to a typo or export error, but no actual ambiguity as to where on the XLIFF tree the rules apply?
Please let us know, it seems to me that the cs01 fate hinges on the answers to the above questions..
Dr. David Filip
OASIS XLIFF OMOS TC Chair
OASIS XLIFF TC Secretary, Editor, Liaison Officer
Spokes Research Fellow
KDEG, Trinity College Dublin
On Mon, Jun 19, 2017 at 12:07 AM, Yves Savourel <email@example.com> wrote: