W3C home > Mailing lists > Public > public-i18n-its@w3.org > January to March 2006

Issue with translatability scope/inheritance

From: Yves Savourel <ysavourel@translate.com>
Date: Mon, 20 Mar 2006 12:30:11 -0700
To: <public-i18n-its@w3.org>
Message-ID: <003a01c64c54$b4ab3200$8f05a8c0@Breizh>
Hi all,

I'm wondering if we don't have a problem with the way translatability inheritance works with global rules...

Here is an example (very similar to DITA):

<myDoc xmlns:its="http://www.w3.org/2005/11/its">
   <its:translateRule its:selector="//*[@trans='yes']" its:translate="yes"/>
   <its:translateRule its:selector="//*[@trans='no']" its:translate="no"/>
  <par trans='no'>This text has some <span trans='yes'>special text</span>.</par>
  <par trans='yes'>This text has some <span trans='no'>special text</span>.</par>

Now, if we take that translatability is inherited and that the last global rule wins (in the absence of local markup) [as we
discussed here http://lists.w3.org/Archives/Public/public-i18n-its/2006JanMar/0309.html], then the trans attribute of the example
cannot work properly with global rules.

- If we keep the rules in the order above the <span trans='yes'> in the first paragraph is not translated, while it should.

- If we reverse the order of the rules, the <span trans='no'> in the second paragraph is translated, while it should not.  

The same content using 'its:translate' instead of 'trans' would result in correct output. The reason is because its:translate does
not overwrite other its:translate in the child elements, while when you apply the global rules you overwrite previous global

It other words: the precedence order we apply for global rules goes against the expected behavior of any markup intended to behave
like our local rules :(

One solution I can think of right now would be to have an additional attribute in the <its:translateRule> element that would
indicate if the selector can be overwritten by following rules or not. But I'm guessing that would have itself some side-effects I
can't think of yet.

Also (before someone proposes it) I don't think 'real mapping' would solve the problem as we could have cases of overwritting markup
not completely equivalent to our its:translate (and therefore not 'mappable').

Any thoughts on how to resolve this?

Received on Monday, 20 March 2006 19:30:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:43:06 UTC