[all] Call for consensus on target pointer (related to ISSUE-15)

Hi all,

To follow up on last week's conference call,
here is proposed definition for the Target Pointer data category:


= Target Pointer

== Definition

Some formats, such as those designed for localization or for multilingual resources, hold the same content in different languages inside a single document. The Target Pointer data category is used to associate the node of a given source content (i.e. the content to be translated) and the node of its corresponding target content (i.e. the source content translated into a given target language).

This specification makes no provision regarding the presence of the target nodes or their content: A target node MAY or MAY NOT exist and it MAY or MAY NOT have a content.

This data category can be used for several purposes, including but not limited to:

* Extract the source content to translate and put back the translation at its proper location.

* Compare source and target content for quality verification.

* Re-use existing translations when localizing the new version of an existing document.

* Access aligned bi-lingual content to build memories, or to train machine translation engines.

Note: In general, it is recommended to avoid developing formats where the same content is stored in different languages in the same document, unless for very specific use cases [See http://www.w3.org/TR/xml-i18n-bp/#DevMLDoc].


== Implementation

The Target Pointer data category can be expressed with global rules, or locally on an individual element. The information applies to the textual content of the element, including child elements and attributes. There is no default.

GLOBAL: The localePointerRule element contains the following:

* A required selector attribute. It contains an XPath expression which selects the nodes to which this rule applies (i.e. the source nodes).

* A required targetPointer attribute. It contains a relative XPath expression that points to the node for the target content corresponding to the selected source node.

The source node and the target node may be of different types, but the target node MUST be able to contain the same content of the source node (e.g. an attribute node cannot be the target node of a source node that is an element with children).


Example 1: defining the target location of a source content with the targetPointerRule element.

The targetPointerRule element indicates where to find the target elements corresponding to the <source> elements that contain the text to translate.

<?xml version="1.0"?>
<file>
 <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
  <its:translateRule selector="/file" translate="no"/>
  <its:translateRule selector="//source" translate="yes"/>
  <its:targetPointerRule selector="//source" targerPointer="../target"/>
 </its:rules>
 <entry id="one">
  <source>Remember last folder</source>
  <target></target>
 </entry>
 <entry id="two">
  <source>Custom file filter:</source>
  <target></target>
 </entry>
</file>

[Source file: EX-targetpointer-element-1.xml]


LOCAL: The following markup is available for the Locale Pointer data category:

* A targetPointer attribute that contains a relative XPath expression that points to the node where the target content corresponding to the attribute’s element is located.

Example 2: defining the target location of a source content with the targetPointer attribute.

This document contains mostly monolingual text, except for the <keywords> element which is designed to hold both the original keywords in <original> and their translation in <native>. The attribute targetPointer is used to indicate that <native> is the target node of <original>.

<?xml version="1.0"?>
<section id="45AE6545"
 xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
 <keywords>
  <original its:targetPointer="../native">park information, natural preserve, national park, visitor center</original>
  <native></native>
 </keywords>
 <main>
  <head>Guide to the National Parks</head>
  <par>The Department of National Parks was created ...</par>
 </main>
</section>

[Source file: EX-targetpointer-attribute-1.xml]


Cheers,
-yves

Received on Tuesday, 17 July 2012 05:34:39 UTC