Subject: RE: [xsl] RE: problem with date:add From: "Andrew Smith" <andrew.smith@xxxxxxxxxxxxx> Date: Thu, 23 Feb 2006 12:39:45 -0000 |
Nevermind :-) I put in a load of <xsl:value-of /> so I could see what was getting assigned to each variable and saw that $month-days and $days-in-month wasn't being set correctly, so I removed <xsl:variable name="month-days" select="document('')/*/date:month-lengths/date:month"/> and replaced <xsl:variable name="days-in-month"> <xsl:choose> <xsl:when test="$month = 2 and $leap"> <xsl:value-of select="$month-days[number($month)] + 1"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$month-days[number($month)]"/> </xsl:otherwise> </xsl:choose> </xsl:variable> With <xsl:variable name="days-in-month"> <xsl:choose> <xsl:when test="$month = 1 or $month = 3 or $month = 5 or $month = 7 or $month = 8 or $month = 10 or $month = 12">31</xsl:when> <xsl:when test="$month = 2 and $leap">29</xsl:when> <xsl:when test="$month = 2">28</xsl:when> <xsl:otherwise>30</xsl:otherwise> </xsl:choose> </xsl:variable> And now all is working fine :-D (I changed the $days-in-new-month as well with something similar). Thanks for the help before Andy -----Original Message----- From: Andrew Smith [mailto:andrew.smith@xxxxxxxxxxxxx] Sent: 23 February 2006 11:15 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] RE: problem with date:add Hello again, I was going to try and see where the problem that I'm seeing with this template lies (http://www.biglist.com/lists/xsl-list/archives/200602/msg00371.html) and was wondering if there's any advice you could give me about how to narrow down where the problem exactly is. Thanks Andy
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] RE: problem with date:add, Andrew Smith | Thread | [xsl] Returning an element's positi, Cindy Hunt |
Re: [xsl] Re: Does anyone know how , M. David Peterson | Date | Re: [xsl] Re: Does anyone know how , M. David Peterson |
Month |