Java code within XSL
843834Jun 18 2004 — edited Jun 17 2005Good day!
I really have a headache with Localization with XSL.
I use Apache Struts in jsp (the tags like <bean:message key='..'/> - there are not a problem to get message from MessageResources. But I have no idea what to use in XSL.
I tried to do this way:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="java"
version="1.0"
>
But when I call java code:
<xsl:variable name="resources"
select="java:util.ResourceBundle.getBundle('ApplicationResources')"/>
the error message appers: The name space "java" does not contain any functions.
Why the error appears? How can I use Java API in XSL?
Thanks in advance