Subject: Re: RE: Problem with date:add
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Thu, 16 Feb 2006 15:41:40 +0530
|
Given this XML file
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="date_add.xsl"?>
<root CurrentDateTime="2006-02-16T09:42:00">
<something/>
</root>
and this stylesheet
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date">
<xsl:import href="date.add.template.xsl"/>
<xsl:output method="html" />
<xsl:template match="/">
<xsl:call-template name="date:add">
<xsl:with-param name="date-time" select="root/@CurrentDateTime" />
<xsl:with-param name="duration" select="'-P30D'" />
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
I get correct results both with Saxon b 8.6.1 and IE 6.
Regards,
Mukul
On 2/16/06, Andrew Smith <andrew.smith@xxxxxxxxxxxxx> wrote:
> Thanks for the replies, I've changed the XSLT so that the duration is
> inside single quotes, so the new code now looks like this
> (/root/@CurrentDateTime contains the current date and time in the valid
> format, 2006-02-16T09:42:00 at the moment)
|