ACTION-43 "Look into sec. 4.1.1., trying to make it more clear"

Hi all,

here is a rewrite proposal for sec. 4.1.1
http://www.w3.org/International/its/techniques/its-techniques.html#GenPrecInherit

It now covers also the role of local markup, inheritance and defaults. I 
think that's necessary to understand to be able to apply global rules.

Felix



ITS 1.0 defines a precedence of information [1] for each data category. 
The precedence order is as follows (starting with the highest 
precedence) and will be explained with the "Translate" data category.

1) ITS local attributes [2] on a specific element, for example the 
its:translate attribute, have the highest precedence.
2) Next are global rules [3], e.g. a set of translateRule elements for 
the "Translate" data category. The order in which these rules are 
declared matters greatly: the last rule has higher precedence than the 
rules before, which have higher precedence than external rules linked 
via an XLink "href" attribute.
3) After local and global ITS information, inherited information [4] is 
being applied. The kind of inheritance is data category specific. For 
example if an element has been specified as being "not translatable" 
using one of the means described via 1) or 2) above, this specification 
is inherited to its child elements, but not to attributes.
4) Finally, data category specific defaults for data categories [4] (if 
available for the data category) come into play. The default for 
"Translate" is that element content is translatable and attribute values 
are not translatable.

The following example shows the usage of local and global ITS markup and 
how the precedence described above comes into play.

Example 32:

In this document, all elements within the <text> element are set as not 
being translatable by the first <its:translateRule> element. However, 
the second and last <its:translateRule> element has higher precedence 
than the one before, so it can be used to describe an exception: all <p> 
elements are still translatable. This shows the interplay between 
different rule elements and demonstrates that the last rule always "wins".

Another exception to the first <its:translateRule> element is expressed 
with the local "its:translate" attribute at the <documentation> element. 
It specifies the content of this element as being translatable. Without 
the "its:translate" attribute, the information from the first 
<its:translateRule> element would be inherited, and this <documentation> 
element would not be translatable.

The content of the <documentation> element within the <head> element is 
also translatable, but not the content of any attributes in the 
document. This demonstrates the role of defaults for the "Translate" 
data category.

<doc xmlns:its="http://www.w3.org/2005/11/its">
 <head>
  <documentation>Some translatable text.</documentation>
  <its:rules version="1.0">
   <its:translateRule selector="//text/*" translate="no"/>
   <its:translateRule selector="//p" translate="yes"/>
  </its:rules>
 </head>
 <text>
  <data>Some data with <b>bolded parts</b> (<documentation 
its:translate="yes"> and translatable text</documentation>).</data>
  <p>Some text with <b>bolded words</b>.</p>
 </text>
</doc>

[1] http://www.w3.org/TR/its/#selection-precedence
[2] http://www.w3.org/TR/its/#selection-local
[3] http://www.w3.org/TR/its/#selection-global
[4] http://www.w3.org/TR/its/#datacategories-defaults-etc

Received on Wednesday, 21 November 2007 04:41:46 UTC