comment_1-input.xml
<?xml version="1.0"?>
<products>
<product
id="p1" stock="4"/>
</products>
comment_1-stylesheet.xsl
<?xml version="1.0"?>
<xsl:stylesheet
version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable
name="x" select="products/product"/>
<xsl:output
indent="yes"/>
<xsl:template
match="/">
<xsl:comment>Transformation: <xsl:value-of
select="current-dateTime()"/></xsl:comment>
<Products>
<xsl:comment>English version starts here</xsl:comment>
<Product>
<xsl:attribute
name="id" select="$x/@id"/>
<xsl:attribute
name="stock" select="$x/@stock"/>
</Product>
</Products>
</xsl:template>
</xsl:stylesheet>
comment_1-output.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--Transformation: 2009-02-17T11:22:18+01:00-->
<Products>
<!--English version starts here-->
<Product
id="p1" stock="4"/>
</Products>
Note that current-dateTime() function is new in XSLT 2.0. In XSLT 2.0 xsl:comment is allowed to use select attribute like: <xsl:comment select="concat('Transformation: ', current-dateTime())"/>.
Updated 2009-03-19