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

Re: ITS rules for OpenDocument

From: Felix Sasaki <fsasaki@w3.org>
Date: Wed, 30 Jul 2008 18:16:16 +0900
Message-ID: <48903160.6040207@w3.org>
To: Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
CC: Yves Savourel <yves@opentag.com>, public-i18n-its-ig@w3.org

Hi Sebastian,

Sebastian Rahtz さんは書きました:
>
> 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?

You are right, and from author friendliness the above is for sure 
preferable.

Felix
Received on Wednesday, 30 July 2008 09:17:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:00 GMT