Issue with translatability scope/inheritance

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">
 <head>
  <its:documentRules>
   <its:translateRule its:selector="//*[@trans='yes']" its:translate="yes"/>
   <its:translateRule its:selector="//*[@trans='no']" its:translate="no"/>
  </its:documentRules>
 </head>
 <body>
  <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>
 </body>
</myDoc>

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
rules...

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?

-yves

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