- 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>
Hi, 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. Cheers, -ys ============================= 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: <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 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']"/> </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>
Received on Friday, 11 May 2012 11:16:03 UTC