W3C home > Mailing lists > Public > public-multilingualweb-lt@w3.org > January 2013

Re: Local Global rules issue

From: Felix Sasaki <fsasaki@w3.org>
Date: Mon, 14 Jan 2013 19:46:42 +0100
Message-ID: <50F45292.1070004@w3.org>
To: public-multilingualweb-lt@w3.org
Hi Philip,

the output you get is different from the expected output at
https://github.com/finnle/ITS-2.0-Testsuite/blob/master/its2.0/expected/translate/xml/translate6xmloutput.txt
I don't know in detail which XSLT Leroy is using (though some parts are 
based on an implementation I did IIRC). But at the end probably Leroy 
needs to take a look, or you use a different implementation (e.g. the 
OKAPI filters).

Best,

Felix

Am 14.01.13 18:45, schrieb Philip:
> Hi All,
>     I'm using the webinar XSLs to apply the its rules, but when I do 
> this to the translate xmls, it seems that the XSLs don't respect the 
> local ITS rules, instead they just apply the global rules.
>
> *Translate6xml.xml below:*
> doc xmlns:its="http://www.w3.org/2005/11/its" its:version="2.0">
>  <head>
>   <its:rules version="2.0">
>    <its:translateRule selector="//*" translate="no"/>
>    <its:translateRule selector="//p" translate="yes"/>
>   </its:rules>
>  </head>
>  <info>
>   <item type="title" its:translate="yes">The Life of a <b>Simple 
> Man</b></item> // Should end up with translate = yes
>   <!-- Note that the contents of <b> and <span> should end up
>        *not* translatable with these settings -->
>   <item type="date-main">Dec-05-2006</item>
>  </info>
>  <content>
>   <p>Everything started when Zebulon discovered that he had
>    a <span>doppelgänger</span> who was a
>    serious baseball <span>aficionado</span>.</p>
>  </content>
> </doc>
>
> *Below is the result I get from translate6:*
> /doc    translate="no"
> /doc/@its:version    translate="no"
> /doc/head[1]    translate="no"
> /doc/head[1]/its:rules[1]    translate="no"
> /doc/head[1]/its:rules[1]/@version    translate="no"
> /doc/head[1]/its:rules[1]/its:translateRule[1]    translate="no"
> /doc/head[1]/its:rules[1]/its:translateRule[1]/@selector  translate="no"
> /doc/head[1]/its:rules[1]/its:translateRule[1]/@translate  translate="no"
> /doc/head[1]/its:rules[1]/its:translateRule[2] 
>  translate="no"                     // applies the global rule and not 
> the local rule
> /doc/head[1]/its:rules[1]/its:translateRule[2]/@selector  translate="no"
> /doc/head[1]/its:rules[1]/its:translateRule[2]/@translate  translate="no"
> /doc/info[1]    translate="no"
> /doc/info[1]/item[1]    translate="no"
> /doc/info[1]/item[1]/@its:translate    translate="no"
> /doc/info[1]/item[1]/@type    translate="no"
> /doc/info[1]/item[1]/b[1]    translate="no"
> /doc/info[1]/item[2]    translate="no"
> /doc/info[1]/item[2]/@type    translate="no"
> /doc/content[1]    translate="no"
> /doc/content[1]/p[1]    translate="yes"
> /doc/content[1]/p[1]/span[1]    translate="no"
> /doc/content[1]/p[1]/span[2]    translate="no"
>
> Can you suggest a way to fix this?
> Thanks,
> Philip
Received on Monday, 14 January 2013 18:47:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:08:26 UTC