You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Lars Geldner <lg...@infokom.tu-dresden.de> on 2001/11/21 18:40:07 UTC

Date of Transforming

Hello list!

I'm transforming a XML-document with a XSL-stylesheet into HTML. Is it possible to pass over the date of transforming as a parameter to the stylesheet, so that you can see, when the HTML-output was build?
That meens I need the correct command for XALAN to do this!

xalan -in input.xml -xsl style.xsl -PARAM param_to_get_the_date -out output.html

XSL:

<xsl:param name="param_to_get_the_date"/>

<xsl:value-of select="$param_to_get_the_date" /> <!-- With this, the date of transforming should be outputed.-->

Thank you!

Lars

Re: Date of Transforming

Posted by Guy McArthur <gu...@guymcarthur.com>.

I do it with extensions, dunno if that's the best way.

Here's the relevant fragments from my template:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:java="http://xml.apache.org/xslt/java"
 exclude-result-prefixes="java">

     <xsl:variable name="now" select="java:java.util.Date.new()"/>
     Report generation time was <xsl:value-of select="$now"/>.

</xsl:stylesheet>