W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > May 2007

Re: ACTION: implement the XSLT-based solution for I18N

From: Sean Owen <srowen@google.com>
Date: Fri, 25 May 2007 22:06:25 -0400
Message-ID: <e920a71c0705251906m3d11ec31w5972dd1de50d50a3@mail.gmail.com>
To: "Roland Gülle" <roland@7val.com>
Cc: public-mobileok-checker@w3.org
This looks pretty good to me -- go ahead and convert the rest of the
XSLTs to this convention and delete the Java version?

On 5/23/07, Roland Gülle <roland@7val.com> wrote:
>
> A XSLT-based solution (only for one test) for I18N is in CVS [1] now.
>
> How it works:
> There is a default XML document 'messages.properties.xml' [2] and a
> file for each language.
>
> To use a text/message in XSLT, you have to add the namespace
> xmlns:moki="http://moki.mobi/2007/v0.1" and the include <xsl:include
> href="functions.xsl"/>.
> Now use the new XPath function "moki:msgI18n(KEY, LANGUAGE)".
>
> If the language file is not available, or the key is not defined in
> the language file, the function selects the key from the default
> document 'messages.properties.xml'.
> If the key is there also not available, an error message is returned.
>
> You can test it with the ImageMapsTest [4].
> One value is returned from the language file, one from the default
> XML and one error message.
>
>   Roland
>
> [1] http://dev.w3.org/cvsweb/2007/mobileok-ref/src/org/w3c/mwi/
> mobileok/basic/xslt/ImageMapsTest.xsl
> [2] http://dev.w3.org/cvsweb/2007/mobileok-ref/src/org/w3c/mwi/
> mobileok/basic/xslt/messages.properties.xml
> [3] http://dev.w3.org/cvsweb/2007/mobileok-ref/src/org/w3c/mwi/
> mobileok/basic/xslt/functions.xsl
> [4] cvs/mobileok-ref/src/org/w3c/mwi/mobileok/basic/xslt$ java -
> jar ../../../../../../../lib/saxon8.jar ../../../../../../../test/
> data/ROOT/ImageMapsTest/2/moki.xml ImageMapsTest.xsl language=de
>
>
>
Received on Saturday, 26 May 2007 02:06:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:13:03 GMT