- From: Felix Sasaki <fsasaki@w3.org>
- Date: Fri, 11 May 2012 14:26:39 +0200
- To: Yves Savourel <ysavourel@enlaso.com>
- Cc: MultilingualWeb-LT Working Group <public-multilingualweb-lt@w3.org>
- Message-ID: <CAL58czrvvK=U26x1x1CyN=PqhdKFUu0kaUJsGssV+iWXq5yUYA@mail.gmail.com>
Hi Yves, just a comment on example D): following http://www.w3.org/International/questions/qa-when-xmllang.en I think it might make sense not to use xml:lang, e.g. replace <its:targetPointer xml:lang='fr' selector='../text[@loc='2']"/> with <its:targetPointer language='fr' selector='../text[@loc='2']"/> See the best practice for your "own" language attribute "an attribute of a link element (such as a in XHTML) pointing to a version of this document in another language" The usage of pointing might fall under this category. Felix 2012/5/11 Yves Savourel <ysavourel@enlaso.com> > 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> > > > > -- Felix Sasaki DFKI / W3C Fellow
Received on Friday, 11 May 2012 12:27:12 UTC