Re: Directionality Scope/inheritance issue (same as translatability)

Sorry, an error, see below.

Felix Sasaki wrote:
> Yves Savourel wrote:
> 
>> Hi felix, all,
>>
>>> I think there is a way to achieve what you want, just 
>>> by going for 2) and by saying:
>>> <its:documentRules xmlns:its="http://www.w3.org/2005/11/its">
>>> 1 <its:translateRule its:translate="yes" its:selector="//textInCode"/>
>>> 2 <its:translateRule its:translate="no" its:selector="//code"/>
>>> 3 <its:translateRule its:translate="yes"
>>> its:selector="//*[@trans='true']/descendant-or-self::*"/>
>>> 4 <its:translateRule its:translate="no"
>>> its:selector="//*[@trans='false']/descendant-or-self::*"/>
>>> </its:documentRules>
>> My understanding is (was) that when we apply the its:selector expression of a rule, it selects a node, and from that node we apply
>> the data category information to the same scope described for the equivalent locale rule.
> 
> that is what you called 2), right?
>> In http://lists.w3.org/Archives/Public/public-i18n-its/2006JanMar/0290.html you said:
>>
>>> ...In my XQuery implementation, XPath expressions like "//text[@localize='no']"
>>> are interpreted as "//text[@localize='no']/descendant-or-self::*".
>> To me that means its:selector="//code" is really its:selector="//code/descendant-or-self::*", so why would we need to specify it?
> 
> Because I was wrong in that mail :( . we cannot just interpret
> //text[@localize='no']  as //text[@localize='no']/descendant-or-self::*,
> but should say //text[@localize='no'] attaches (virtually)
> its:translate="no" to all nodes //text[@localize='no'] , and then as a
> second step the inheritance comes into play. Only in this way we have
> 100% parallelism with local ITS, that is the functionality you called 2).
> 
> For a document
> 
> <text localize="no">
> <p>...</p>
> </text>
> 
> the rule
> 
> <its:translateRule its:select="//text[@localize='no']" its:translate="no"/>
> 
> would mean
> 
> <text its:global-rule-1="no" localize="no">
> <p>...</p>
> </text>
> 
> whereas
> 
> <its:translateRule
> its:select="//text[@localize='no']/descendant-or-self::*"
> its:translate="no"/>
> 
> would mean
> 
> <text its:global-rule-1="no" localize="no">
> <p its:global-rule-1="no">...</p>
> </text>
> 
> Here it does not make a difference. The difference is in the following:
> 
> global rule 1: <its:translateRule its:select="//p" its:translate="yes"/>
> global rule 2: <its:translateRule its:select="//text[@localize='no']"
> its:translate="no"/>
> 
> In the case above, <p> would be translated, the document would "look" like:
> <text its:global-rule-2="no" localize="no">
> <p its:global-rule-1="yes" its:inherited-translatability="no">...</p>
> </text>
> 
> In the case below, <p> wouldn't be translated:
> 
> <its:translateRule
> its:select="//text[@localize='no']/descendant-or-self::*"
> its:translate="no"/>
> <its:translateRule its:select="//p" its:translate="yes"/>

This should have been

global rule 1: <its:translateRule its:select="//p" its:translate="yes"/>
global rule 2: <its:translateRule
its:select="//text[@localize='no']/descendant-or-self::*"
its:translate="no"/>

- Felix

> 
> The document would look like:
> 
> <text its:global-rule-2="no" localize="no">
> <p its:global-rule-1="yes" its:global-rule-2="no"
> its:inherited-translatability="no">...</p>
> </text>
> 
> Cheers,
> 
> Felix
> 

Received on Monday, 27 March 2006 05:17:26 UTC