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

Yves Savourel wrote:
>> I'd see two points: overriding and precedence order. I.e. 
>> the DITA folks want to be able to use @dita:translate 
>> in exact the same way as @its:translate.
>>
>> Of course <mapMarkup> does not solve all problems, but 
>> only the ones of DITA. For the other ones, we need the 
>> "normal" global rules, and have to say: for cases like 
>> trans='false' you are not able to use that markup in the 
>> same way as ITS local markup.
> 
> I don't think we can say that. We must find a way to support the <notrans> or trans='false' cases. And I'm guessing that that
> solution (whatever it will be) will be applicable to solve both dita:translate and <notrans>. I'd rather see both aspects resolved
> with a single solution, if it's possible.
> 
> At least we have reach one conclusion for now: something like <mapMarkup> can't be that solution.

yes :(

O.K., new proposal (last one for today ...):

How about not adding new markup & functionality to ITS, but changing
processing expectations:

Currently, we have "all ITS markup (global and local) fires at the same
time, and precedence descriptions decide who wins".

How about differencing two processing steps instead:

- step 1): global rules are applied to instance documents. result: its
markup is integrated into the document (in memory, or written to a file;
that depends on your implementation). the markup is "flagged" as being
global.

Example input to step 1), from
http://lists.w3.org/Archives/Public/public-i18n-its/2006JanMar/0374.html :
<myDoc xmlns:its="http://www.w3.org/2005/11/its">
 <head>
  <its:documentRules>
   <its:dirRule its:selector="//*[@dir='ltr']" its:dir="ltr"/>
   <its:dirRule its:selector="//*[@dir='rtl']" its:dir="rtl"/>
  </its:documentRules>
 </head>
 <body>
  <par dir='ltr'>LTR text <span dir='rtl'>RTL text</span> LTR text.</par>
  <par dir='rtl'>RTL text <span dir='ltr'>LTR text</span> RTL text.</par>
 </body>
</myDoc>

Example output (the prefix "-global" serves as the "flag"):
<myDoc xmlns:its="http://www.w3.org/2005/11/its">
 <head>...</head>
 <body>
  <par dir='ltr' its:dir-global="ltr">LTR text <span dir='rtl'
its:dir-global="rtl">RTL text</span> LTR text.</par>
  <par dir='rtl' its:dir-global="rtl">RTL text <span dir='ltr'
its:dir-global="ltr">LTR text</span> RTL text.</par>
 </body>
</myDoc>

- step 2): the output is handled with inheritance and default rules for
local markup.


Precedence rules (see sec. 5.2) would also be the same, to handle cases like

<p its:translate="no" its:translate-global="yes">...
(its:translate="no" would win here)

For cases like
<its:dirRule its:selector="//*[@dir='ltr']" its:dir="ltr"/>
<its:dirRule its:selector="//*[@dir='rtl']" its:dir="rtl"/>
we would also still have the same rule as currently: the last rule
encountered wins. However, the problems Yves mentioned at
http://lists.w3.org/Archives/Public/public-i18n-its/2006JanMar/0374.html
don't occur anymore, since we have separated the steps of
- adding its:dir="ltr" or its:dir="rtl" to selected nodes, from
- processing inheritance and defaults.

From an implementation point of view, it would mean: You traverse the
DOM one time to add the its:dir-global attributes. After that, you just
process local markup as usual, but take the difference between e.g.
its:dir and its:dir-global into account.

As for "pointing" or "pass through", I think there is no need to change
anything.

cheers,

Felix

Received on Friday, 24 March 2006 17:44:21 UTC