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

[ISSUE-15] target-pointer

From: Yves Savourel <ysavourel@enlaso.com>
Date: Fri, 11 May 2012 05:15:36 -0600
To: "'MultilingualWeb-LT Working Group'" <public-multilingualweb-lt@w3.org>
Message-ID: <assp.0478a7569b.assp.0478717866.003101cd2f67$63d67b30$2b837190$@com>

To follow up on the discussion about the two cases for targetPointer, here is some proposed text for the wiki.

Note that, while it's nice to think about possible solutions, we should focus on describing the issue(s) since this is a requirement document.



Various proprietary file formats (e.g. software resources, localization formats) store two or more language versions of the same text. Such format cannot be processed easily with a traditional XML filter because there is currently no way in ITS to indicate where the ''target'' text for a given ''source'' is.

There are two distinct cases possible:

* Bilingual documents where source and target are not necessarily labeled with language indicators (See Example A)

* Multilingual documents where the different language versions of the same text have some language indicator (See example B).

=== Data model

to be determined

=== Notes

* Real life use case here: http://tech.groups.yahoo.com/group/okapitools/message/2672

* There is an existing proposal for a targetPointer attribute for the translateRule of ITS 1.0 that may or may not be a solution for the single target case (See Example C): http://www.w3.org/International/its/wiki/IssuesAndProposedFeatures#Proposal:_targetPointer

* For the multiple targets case a potential solution could be a list of elements mapping a give language to an XPath expression relative to the location of the source (See Example D). This could also work for the single target case if the absence of a language code in the <targetPointer> as shown in Example E.

* The case of a single target and the case of multiple targets may need to be addressed separately as they do not correspond exactly to the same criteria (in the first case the language of the target may be undefined).

* A solution for this requirement may benefit from a variable mechanism (e.g. <its:targetPointer xml:lang='${lang}' selector='../text[@loc='${code}']"/>).

 Example A:
  <entry xml:id="one">
   <source>Text one of the source</source>
   <target>Text one of the target</target>
  <entry xml:id="two">
   <source>Text two of the source</source>

 Example B:
  <entry id='1'>
   <text loc='1'>Very important text</text>
   <text loc='2'>Texte très important</text>
   <text loc='3'>非常重要的文本</text>
   <text loc='4'>Zeer belangrijke tekst</text>
   <text loc='5'>Очень важный текст</text>

 Example C (to apply on Example A):
 <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0"
  <its:translateRule translate="no" selector="//file"/>
  <its:translateRule translate="yes" selector="//source"

 Example D (to apply on Example B):
 <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
  <its:translateRule translate="no" selector="//file"/>
  <its:translateRule translate="yes" selector="//text[@loc='1']">
   <its:targetPointer xml:lang='fr' selector='../text[@loc='2']"/>
   <its:targetPointer xml:lang='zh' selector='../text[@loc='3']"/>
   <its:targetPointer xml:lang='nl' selector='../text[@loc='4']"/>
   <its:targetPointer xml:lang='ru' selector='../text[@loc='5']"/>

 Example E (to apply on Example A):
 <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
  <its:translateRule translate="no" selector="//file"/>
  <its:translateRule translate="yes" selector="//source">
   <its:targetPointer selector='../target"/>
Received on Friday, 11 May 2012 11:16:03 UTC

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