Its0601TechTransAuth

From W3C Wiki


ITS WG Collaborative editing page

Override translatability information if needed

There are times where in a document instance the content of a given element or the value of a given attribute may need to a treated differently from the other same elements or attributes.

For example, by default attribute values are not translatable. If you XML format has a <pict> element that links to an image, and an attribute desc that hold a textual description of that image, the attribute value is translatable. Since this is generally true for all desc attributes in <pict> elements, this override of the default rule should be done in the schema or in a <documentRules> element. But there are exception in this case itself.

The same goes for element content: By default they are deemed translatable, but in some cases this rule need to be punctually overridden. Here the content of the element must remain the same.


<para>Québec's motto (<q>Je me souviens</q>) 
on the Parliament Building:
 <pict ref="arms.png" desc="je me souviens"/>.
</para>


Use ITS in situ markup

You can override any translatability information by applying ITS in situ markup at the element level.

By default the translate attribute is applied to the content of the element where it is defined. To point to a specific location, within that content, where the property should be applied, you can use the translateSelector attribute.


<para>Québec's motto (<q its:translate="no">Je me souviens</q>)
on the Parliament Building:
 <pict ref="arms.png" its:translate="no" its:translateSelector="./@desc"
desc="Je me souviens"/>.</para>


Note: For various reasons, using translatable attributes is strongly discouraged. This example is just an illustration of the translateSelector capability. See Attribute and Translatable Text for more details on translation and attributes.