W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > July 2012

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

From: Phil Ritchie <philr@vistatec.ie>
Date: Tue, 17 Jul 2012 08:50:48 +0100
To: Yves Savourel <ysavourel@enlaso.com>
Cc: <public-multilingualweb-lt@w3.org>
Message-ID: <OF03F59FF5.2B1A95A0-ON80257A3E.002AB0B3-80257A3E.002B1AAD@vistatec.ie>
This looks good to me.

Yves, sorry to be slow but could you articulate why this is 
straight-forward and the Quality Error is more complex? Is XLIFF 
round-tripping a factor with QA Error?

Phil.





From:   Yves Savourel <ysavourel@enlaso.com>
To:     <public-multilingualweb-lt@w3.org>, 
Date:   17/07/2012 06:35
Subject:        [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





************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender immediately by e-mail.

www.vistatec.com
************************************************************
Received on Tuesday, 17 July 2012 07:51:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:31:47 UTC