[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: RE: Problem with date:add

Subject: Re: RE: Problem with date:add
From: Mukul Gandhi <gandhi.mukul@xxxxxxxxx>
Date: Thu, 16 Feb 2006 15:41:40 +0530
current date xslt
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)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.