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

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

From: Yves Savourel <yves@opentag.com>
Date: Wed, 22 Mar 2006 19:10:03 -0700
To: <public-i18n-its@w3.org>
Message-ID: <002201c64e1e$e80eb060$0300a8c0@Breizh>

Hi Felix, all,

> at http://www.w3.org/TR/its/#selection-defaults-etc , we define 
> "default" selections. I think for translatability this means if 
> the have <p its:translate="..">...</p> the value of the 
> translate attribute is related to "Textual content of element, 
> including content of child elements, but excluding attributes", 
> no matter what the value is.

OK I see now.

> Now, a global rule like <its:dirRule select="//p" its:dir="rtl"/> 
> selects only the <p> elements, not their attributes. The same 
> is true for a global rule like <its:translateRule select="//p" 
> its:translate="..."/> this rule does not say "attributes are not 
> translatable": it just does not talk about attributes.

Actually I could disagree here: as you say we have nothing that specify what the selection is for global rules. I assumed it was the
same as for local rules. There is nothing that says it, but there is nothing that says otherwise either.

It seems logical that the selection of a global rule and a local one be the same.

I would propose to change in 5.1 the column header "default selection in instance document" to "default selection" (or something
equivalent, stating clearly that it is for the data category regardless whether it's a global or local rule.

The only difference is that a selection using a local rule stops when it finds an existing local rule, while the global rule
overrides any global rule already set (and does not assume anything about local rules since they will be processed after the global

As for the 'real mappings' they are basically like a global rule that act like a local one.

Which corresponds to your illustration that the mapping is like a replacement of the native markup by the ITS local markup.

> So here is my proposal:
> 3) to be able to say "existing local markup has the same 
> meaning like ITS local markup" , we have:
> <its:dirRule its:selector="//*" its:dir="ltr"
> its:realized-by="@dir['ltr']"/>
> which means "the data category 'directionality' with the 
> value 'ltr' is realized by @dir['ltr']"
> <its:dirRule its:selector="//*" its:dir="rtl"
> its:realized-by="@dir['rtl']"/>
> which means "the data category 'directionality' with the 
> value 'rtl' is realized by @dir['rtl']"

Having a separate selector and a realize-by value that is relative XPath expression is the same as have the selector with that
relative path added to the absolute root. In other words, your notation simply breaks down the absolute path. But what purpose
breaking the XPath expression serves? I can't think of any.

This means, mapping could (and I think should) have the exact same notation as a normal rule, except that it is a map. So we would
have something like:

<its:dirMap its:dir="rtl" its:selector="//*[@dir='rtl']" />

That would also means the order in which maps are in the documentRules does not matter.

The most difficult part would be to explain to the users what is the difference and when to use one versus the other...

Received on Thursday, 23 March 2006 02:10:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:04:09 UTC