ACTION 15: target-pointer

Hi all,

I have the action item to summarize our discussion about target-pointer:

I think our discussion on target-pointer, as far as requirements gathering is pretty much done.
Shaun's input about multi-targets documents as well as multi-paragraphs cases complete what the ITSIG had already before.

The current text in the draft would need to be updated to reflect those aspects.
But after that, I think the requirement is done. It seems we were starting to discuss solutions rather than gather requirements at this point.

So I would propose to update the requirement text to the following:

==== targetPointer ====

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 exmaple 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):<br/> 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 lang='${lang}' selector='../text[@loc='${code}']"/>).

* Some content may be made of multiple paragraph-level elements.

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

 Example B:
 
 <file>
  <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>
  </entry>
 </file>

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

 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 lang='fr' selector='../text[@loc='2']"/>
   <its:targetPointer lang='zh' selector='../text[@loc='3']"/>
   <its:targetPointer lang='nl' selector='../text[@loc='4']"/>
   <its:targetPointer lang='ru' selector='../text[@loc='5']"/>
  </its:translateRule>
 </its:rules>

 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"/>
  </its:translateRule>
 </its:rules>


Cheers,
-yves

Received on Thursday, 31 May 2012 14:41:29 UTC