W3C home > Mailing lists > Public > public-i18n-its-ig@w3.org > July 2008

Re: ITS rules for OpenDocument

From: Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
Date: Wed, 30 Jul 2008 09:21:49 +0100
Message-ID: <4890249D.9090508@oucs.ox.ac.uk>
To: Felix Sasaki <fsasaki@w3.org>
CC: Yves Savourel <yves@opentag.com>, public-i18n-its-ig@w3.org

Felix Sasaki wrote:
> Hi Yves,
> Yves Savourel さんは書きました:
>> Looking at the rules you are using Felix, I saw:
>> <its:translateRule selector="//*" translate="no"/>
>> <its:translateRule selector="//w:p | //*[ancestor::w:p]" 
>> translate="yes"/>
>> I guess we could get the same results with (I think):
>> <its:translateRule selector="/w:document" translate="no"/>
>> <its:translateRule selector="//w:p" translate="yes"/>
>> But I wonder what would be the most efficient way? Use the 
>> inheritence of translate (solution b) or label the nodes (solution 
>> a)? Or
>> both are equivalent in term of processing. I would tend to guess that 
>> b would be a bit better because some processors may do the
>> inheritence as they go rather than as a separate pass. But maybe I'm 
>> missing something.
> You are right, both solutions are equivalent. I'm not sure if the 2nd 
> solution is better since in both cases you need two global rules, and 
> I'm not sure about the effect of XPath rewriting Jirka mentioned a 
> while ago. But you could have just one global rule like this:
> <its:translateRule selector="//*[not(w:p or ancestor::w:p)]" 
> translate="no"/>
> which takes advantage of the default that elements are translatable. 
> It will be in effect for w:p and it's descendants.
I think you mean <its:translateRule 
selector="//*[not(ancestor-or-self::w:p)]" translate="no"/> :-}

Personally, I would always favour

<its:translateRule selector="w:document" translate="no"/>
<its:translateRule selector="w:p" translate="yes"/>

because it is more human-readable. Efficiency should be left to 
implementations, not
second-guessed by rule authors, surely?

Sebastian Rahtz      
Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
Received on Wednesday, 30 July 2008 08:22:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:11:27 UTC