xsl-list
[Top] [All Lists]

RE: Problem with date:add

2006-02-17 03:35:46
Hello again,

I've done some more testing and I've no idea what's going on. I've
copied a working template from my computer and uploaded it and it
produces the misbehaviour I've been reporting. I've managed to set up a
testarea at the following URL
http://testarea.itilitycontenthub.net/date_test.aspx it's got the
reported date + 30days as being 2006-02-47T10:17:00.

The link just shows the XSL file used to get that output. The XML is
returned from a database query, but for that page it's just

<root CurrentDateTime="2006-02-17T10:17:00">
        <nothing />
</root>

Or whatever the currentdatetime is. I didn't mention it before, but it
should be using the MSXML parser version 4, so I'm not sure if this has
any problems with it.

Thanks again :-)
Andy
-----Original Message-----
From: Andrew Smith [mailto:andrew(_dot_)smith(_at_)itility(_dot_)co(_dot_)uk] 
Sent: 17 February 2006 09:28
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] RE: xsl-list Digest 17 Feb 2006 06:10:00 -0000 Issue 693

Hi,

Thanks for that, I tried that locally as well and I'm getting the
correct result, it must be something to do with the remote setup... or
something. In that stylesheet though I don't import the template I've
copied it directly into it.

I'm going to have to look a bit deeper into this.

Thanks for your help
Andy
-----Original Message-----
Date: Thu, 16 Feb 2006 15:41:40 +0530
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
From: Mukul Gandhi <gandhi(_dot_)mukul(_at_)gmail(_dot_)com>
Subject: Re: [xsl] RE: Problem with date:add
Message-ID:
<7870f82e0602160211o143cf87ck5f222e98e3d92199(_at_)mail(_dot_)gmail(_dot_)com>

Given this XML file

<?xml version=3D"1.0" encoding=3D"UTF-8"?> <?xml-stylesheet
type=3D"text/xsl" href=3D"date_add.xsl"?> <root
CurrentDateTime=3D"2006-02-16T09:42:00">
  <something/>
</root>

and this stylesheet

<?xml version=3D"1.0" encoding=3D"UTF-8"?> <xsl:stylesheet
version=3D"1.0"
 
xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform";
                       xmlns:date=3D"http://exslt.org/dates-and-times";
                       extension-element-prefixes=3D"date">

<xsl:import href=3D"date.add.template.xsl"/>

<xsl:output method=3D"html" />

<xsl:template match=3D"/">
  <xsl:call-template name=3D"date:add">
    <xsl:with-param name=3D"date-time" select=3D"root/@CurrentDateTime"
/>
    <xsl:with-param name=3D"duration" select=3D"'-P30D'" />
  </xsl:call-template>
</xsl:template>

</xsl:stylesheet>

I get correct results both with Saxon b 8.6.1 and IE 6.

Regards,
Mukul

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>