Its0601TechTransDev
ITS WG Collaborative editing page
Indicate the translatability of elements
XML content is often translatable text, while attributes values are most of the time non-translatable metadata. This is the default assumption the ITS translatibility mechanism uses. If not specified otherwise, the content of all elements is translatable, and the values of all attributes is not translatable.
If your XML documents do not correspond to this default assumption, you need to specify what are the exceptions.
This can be done different ways:
Add information within your schema
ITS offers a mechanism to include translatability information within a schema document.
You can use the ITS <schemaRule> element to indicate whether the content of an element or the value of an attribute is translatable or not.
For example, the following <schemaRule> element specifies that the content of the element <headInfo> is not translatable.
<xs:element name="headInfo"> <xs:annotation> <xs:appinfo> <its:schemaRule translate="yes"/> </xs:appinfo> </xs:annotation> ... </xs:element>
You can use this mechanism in both XML Schema and RELAX NG.
Create a list of rules
In the cases where you cannot modify the schemas, or work with DTDs, you can specify the translatability rules of your document type by using the ITS <documentRules> element in a standalone document.
For example, the following document lists two exceptions to the default ITS translatability assumptions. It states that the content of the <headinfo> element is not translatable, and that the value of a desc attribute in a <pict> element is translatable.
<its:documentRules xmlns:its="http://www.w3.org/2005/11/its" xmlns:xyz="myXYZDocumentType"> <its:documentRule translateScope="//xyz:headInfo" translate="no" /> <its:documentRule translateScope="//xyz:pict@desc" translate="yes" /> </its:documentRules>