- From: Sean Owen <srowen@google.com>
- Date: Fri, 25 May 2007 22:06:25 -0400
- 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 UTC