W3C logo
slanted W3C logo

Cover page images (keys)

Internationalization and Localization of XML: Introducing "ITS"

WARNING!

However: ...

Promise

Overview

Overview

What's ITS?

i18n and l10n

Targets of ITS

<!ELEMENT p ...>
<!ATTLIST p its:translate (yes|no) #IMPLIED>

Targets of ITS

<resources>
 <section id="Homepage">
[...]
  <keyvalue_pairs>
   <string>Page</string>
   <string>ABC Corporation - Policy Repository</string>
   <string>Footer_Last</string>
   <string>Pages</string>
   <string>bgColor</string>
   <string>NavajoWhite</string>  
   <string>title</string>
   <string>List of Available Policies</string>
  </keyvalue_pairs>
 </section>
</resources>

Overview

User: Schema Developers

User: Schema Developers

<its:rules its:version="1.0" ...>
 <its:ns prefix="myns" uri="http://www.example.com/myschema"/>
 <its:translateRule translate="yes" selector="//myns:p"/>
<!-- All p elements should be translated -->
</its:rules>

Users: Content Producers

<book its:version="1.0" ...>
 <head>...</head>
 <body>
<p>And he said: you need a new
 <quote its:translate="no">T-Model</quote>
</p> 
 </body> 
</book>

Users: Content Producers

<text>
 <head>
 <its:rules xmlns:its="http://www.w3.org/2005/11/its" its:version="1.0">
  <its:translateRule translate="no" selector="//dt"/>
 <its:rules>
 </head>
 <body> ...
  <p> ... <dl><dt>...</dt><dd>...</dd></dl></p>
 </body>
</text>

Overview

Basic Concepts of ITS: Summary

Notion of "Data Categories"

The data category translatability expresses information about
whether the content of an element or attribute should be
translated or not. The values of this data category are "yes" (translatable)
or "no" (not translatable).

Selection of Nodes

<article xmlns="http://docbook.org/ns/docbook"
 ... its:version="1.0"
 its:translate="yes">
 <info id="a001">
  <title>An example article</title>
  <author its:translate="no">
   <personname>
    <firstname>John</firstname>
    <surname>Doe</surname>
   </personname>
   <address>...</address>   
  </author>
 </info>
</article>

Selection of Nodes

<topic id="myTopic" xml:lang="en-us" 
xmlns="myvocabulary.com">
 <title>Using ITS</title>
 <prolog>
  <its:rules ... its:version="1.0">
   <its:ns prefix="my" uri="myvocabulary.com"/>
   <its:translateRule selector="//my:term" translate="no"/>
  </its:rules>
 </prolog>
 <body>
  <p>An <term>ITS namespace</term> definition exists...</p>
 </body>
</topic>

So again: What's this, Selection?

Adding ITS information vs. Pointing

<its:rules its:version="1.0">
 <its:locInfoRule locInfoType="alert" selector="//body/p[1]">
  <its:locInfo>This p element has to be handled carefully"</its:locInfo>
 </its:locInfoRule>
</its:rules>

Adding ITS information vs. Pointing

<its:rules its:version="1.0" ...>
 <its:locInfoRule locInfoType="alert"
  locInfoPointer="@locn-alert" selector="//*"/>
 <its:locInfoRule locInfoType="description"
  locInfoPointer="//@locn-note" selector="//*"/>
</its:rules>

Precedence between Selections

<text> 
 <its:rules its:version="1.0">
  <its:translateRule translate="yes" selector="//p"/>
  <its:translateRule translate="no" selector="//p[@transinfo='no-trans']"/>
 <its:rules>
 <body>
  <p its:translate="no"> ... <dl><dt>...</dt><dd>...</dd></dl></p>
 </body>
</text>

Overview

Overview of ITS Data Categories

Terminology

<its:rules its:version="1.0">
 <its:termRule selector="//body/p[1]/span"
termInfoRef="http://example.com/termdatabase/#x142539"/>
</its:rules>
<its:rules its:version="1.0">
 <its:termRule selector="//body/p[1]/span"
termInfoRefPointer="@myTermRef"/>
</its:rules>

Directionality

<its:rules its:version="1.0">
 <its:dirRule dir="rtl" selector="/body/p[1]/quote[xml:lang='he']"/>
<!-- Some Hebrew quotation -->
</its:rules>

Ruby

<text its:version="1.0">
 <head> ... </head>
 <body>
  <p>This is about the
   <its:ruby>
    <its:rb>W3C</its:rb>
    <its:rt>World Wide Web Consortium</its:rt>
   </its:ruby>
  </p>
 </body>
</text>

Language Information

<its:rules its:version="1.0">
 <its:langRule selector="//p" langPointer="@mylangattribute"/>
</its:rules>

Elements Within Text

<its:rules its:version="1.0">
 <its:withinTextRule withinText="yes" selector="//b | //em | //i"/>
 <its:withinTextRule withinText="no" selector="//p"/>
 <its:withinTextRule withinText="nested" selector="//p/footnote/p"/>
</its:rules>

Overview

Basis: The ODD Language

ODD Layout Localization

Benefit for ITS

ODD Elements

ODD Example: Element Declaration

<elementSpec ident="rules" ns="http://www.w3.org/2005/11/its"> 
 <desc>Container for global rules.</desc>
 <classes>
  <memberOf key="att.xlink"/>
 </classes>
 <content>
  <rng:group>
   <rng:zeroOrMore>
    <rng:ref name="ns"/>
   </rng:zeroOrMore>
   <rng:zeroOrMore>
    <rng:choice>
     <rng:oneOrMore>  
      <rng:ref name="translateRule"/>
      <rng:ref name="locInfoRule"/>
      <rng:ref name="termRule"/>
      <rng:ref name="dirRule"/> ...
     </rng:oneOrMore>
    </rng:choice>
   </rng:zeroOrMore> 
  </rng:group>	 
 </content> ...
</elementSpec>

Transforming ODD

Overview

Questions to the Audience