XSLT engine Mediator and java functions

I wish to get current date&time in my resulting document while processing XSLT thru Mediator SagTransformer component.

It seems Mediator uses its own XSL engine (?) that does not allow use of java functions like <xsl:value-of select=“java:util.Date.new()”/>

In another context, when using passthru servlet to make XSLT on Tamino outputs, configured with Xalan, it works fine.

Any idea on how to overcome this issue with Mediator. Maybe configure Mediator to use Xalan as XSLT processor ?


Mediator uses Xalan as its XSLT processor. The Mediator version uses Xalan 1.2.2. This is quite old by web standards. Since Mediator the Xalan version 2.4.1 has been in use. I am not sure we still support A lot has changed since that release, in Xalan and in Mediator. I suggest you upgrade to a newer release.

However the java extension mechanism in Xalan was and is fully supported and should work in A possible problem is that the java namespace documented in Xalan 1.2.2 is different than the one documented in Xalan 2.4.1. I don’t know if this is a document error or if the code has changed.

I did try the following stylesheet in Mediator and it worked for me. Perhaps you could compare this to your stylesheet to see if there are differences.

xmlns:xsl=“http://www.w3.org/1999/XSL/Transform” version=“1.0”
<xsl:template match="/">
xsl:commentInsert a date using a java class.</xsl:comment>

<xsl:value-of select=“java:util.Date.new()”/>
<xsl:copy-of select="."/>


I hope this helps
Mike Duffy

JARs are never empty, they contain at least a manifest file