ACTION: implement the XSLT-based solution for I18N

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 Wednesday, 23 May 2007 14:38:13 UTC