W3C home > Mailing lists > Public > public-i18n-its-ig@w3.org > July 2008

Re: ITS rules for OpenDocument

From: Felix Sasaki <fsasaki@w3.org>
Date: Wed, 30 Jul 2008 17:00:01 +0900
Message-ID: <48901F81.9070502@w3.org>
To: Yves Savourel <yves@opentag.com>
CC: public-i18n-its-ig@w3.org

Hi Yves,

Yves Savourel さんは書きました:
> Looking at the rules you are using Felix, I saw:
>
> <its:translateRule selector="//*" translate="no"/>
> <its:translateRule selector="//w:p | //*[ancestor::w:p]" translate="yes"/>
>
> I guess we could get the same results with (I think):
>
> <its:translateRule selector="/w:document" translate="no"/>
> <its:translateRule selector="//w:p" translate="yes"/>
>
> But I wonder what would be the most efficient way? Use the inheritence of translate (solution b) or label the nodes (solution a)? Or
> both are equivalent in term of processing. I would tend to guess that b would be a bit better because some processors may do the
> inheritence as they go rather than as a separate pass. But maybe I'm missing something.
>   

You are right, both solutions are equivalent. I'm not sure if the 2nd 
solution is better since in both cases you need two global rules, and 
I'm not sure about the effect of XPath rewriting Jirka mentioned a while 
ago. But you could have just one global rule like this:

<its:translateRule selector="//*[not(w:p or ancestor::w:p)]" translate="no"/>

which takes advantage of the default that elements are translatable. It 
will be in effect for w:p and it's descendants.

Felix

> -ys
>  
>
> -----Original Message-----
> From: public-i18n-its-ig-request@w3.org [mailto:public-i18n-its-ig-request@w3.org] On Behalf Of Rodolfo M. Raya
> Sent: Tuesday, July 29, 2008 1:17 PM
> To: Felix Sasaki
> Cc: public-i18n-its-ig@w3.org
> Subject: Re: ITS rules for OpenDocument
>
>
> On Tue, 29 Jul 2008 19:13:00 +0900
> Felix Sasaki <fsasaki@w3.org> wrote:
>
> Hi Felix,
>
>   
>>     * an implementation of "within text" which was necessary to get the
>>       OpenDocument segmentation right
>>     
>
> Segmentation is set at paragraph level, not sentence level. Is that correct?
>
>   
>>     * a now worky docx file, please check
>>       
>> http://www.w3.org/International/its/its-translate-decorator/example/al
>> ice-in-wonderland.docx
>>     
>
> It is fine. Word 2007 can open it.
>
>   
>>     * the updated content of that file, see
>>       http://www.w3.org/International/its/its-translate-decorator/example/alice-in-wonderland.xml
>>       . Rodolfo, could you use that file to re-generate your XLIFF file
>>       to make comparison easier?
>>     
>
> I used the .docx file to generate a new XLIFF. You can download it from
>
>    ftp://charmed.maxprograms.com/pub/alice-in-wonderland.docx.xlf
>
>   
>>     * the re-generated XLIFF files
>>       http://www.w3.org/International/its/its-translate-decorator/example/xliff-file-alice.xml
>>       
>> http://www.w3.org/International/its/its-translate-decorator/example/xl
>> iff-file.xml
>>     
>
> Some comments:
>
> 1) the official extension for XLIFF files is ".xlf". Don't use ".xml"
>
> 2) use a real language code in the generated XLIFF files. Set it to "en" (English) or anything else, but not to "tbd". XLIFF editors
> are able to validate language codes and complain if you use an invalid one.
>
> 3) In "xliff-file.xml" you declare source-language="en" in the <file> element and then use "tbd" in all <source> elements. This is
> inconsistent.
>
> 4) There are too many inline tags in "xliff-file-alice.xml".  Tags that contain the whole segment can, in most cases, be excluded.
> For example, if the whole segment is enclosed in <bold> tags, you can put the tags in a skeleton and store clean text in the
> <source> element. Tags that appear before or after the segment and don't affect the text can be exluded from the segment too. 
>
> 5) <ph> element has a required attribute: "id". It is missing in your files.
>
> Best regards,
> Rodolfo
> --
> Rodolfo M. Raya <rmraya@maxprograms.com> http://www.maxprograms.com
>
>
>   
Received on Wednesday, 30 July 2008 08:01:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:00 GMT