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

Re: [ACTION-487][ISSUE-97][ISSUE--118] HTML5 Defaults

From: Jirka Kosek <jirka@kosek.cz>
Date: Wed, 17 Apr 2013 08:54:18 +0200
Message-ID: <516E471A.90600@kosek.cz>
To: Yves Savourel <ysavourel@enlaso.com>
CC: public-multilingualweb-lt@w3.org
On 16.4.2013 23:48, Yves Savourel wrote:

> For example, a tool using just the defaults should be able to know that, both @value and @onclick become "translatable" again in the following code when p has translate='yes' (and @type remains un-affected).
> 
> <!doctype html>
> <html lang="en" translate="no">
> <head>
>   <meta charset="utf-8">
>   <title>Example</title>
> </head>
> <body>
>  <p translate="yes">Text with <input type="button" onclick="alert('Hello Felix!')" value="a button"></p>
>  </body>
> </html>
> 
> I guess, the question is also how the ITS processors are suppose to work with HTML5+translate vs the normal ITS translate. If it doesn't take things like @onclick into account it's not really working.

Hi,

probably I'm missing something fundamental, but what's the real problem
here? IMHO it's possible to create ITS rules which will mimick HTML5
defaults in the same way as ITS processing is defined for many other
formats. For example if value on input attribute should be translateable
then following rules will do the trick:

<!-- By default value is translateable -->
<its:translateRule
selector="//h:input[not(ancestor-or-self::*[@translate])]/@value"
translate="yes"/>

<!-- If the closest @translate attribute is yes then it is translateable -->
<its:translateRule
selector="//h:input[ancestor-or-self::*[@translate][1]/@translate='yes']/@value"
translate="yes"/>

<!-- If the closest @translate attribute is no then it is not
translateable -->
<its:translateRule
selector="//h:input[ancestor-or-self::*[@translate][1]/@translate='no']/@value"
translate="no"/>

Yes, similar rules for HTML5 will take some length but they can easily
cover behaviour described in HTML5.

					Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------


Received on Wednesday, 17 April 2013 06:54:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:32:07 UTC